diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b5001eeb44..dc0298ed9e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,26 @@ jobs: - name: Ensure importable run: | rye run python -c 'import cloudflare' + test: + name: test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Rye + run: | + curl -sSf https://rye-up.com/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: 0.24.0 + RYE_INSTALL_OPTION: '--yes' + + - name: Bootstrap + run: ./scripts/bootstrap + - name: Run tests + run: ./scripts/test examples: name: examples runs-on: ubuntu-latest diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 53302f04da2..4cc6b598c5a 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rye run: | diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index c5195cd8359..e0dcf0f4660 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -10,7 +10,7 @@ jobs: if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check release environment run: | diff --git a/.gitignore b/.gitignore index a4b2f8c0bd3..0f9a66a9764 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ dist .env .envrc codegen.log +Brewfile.lock.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e26e1bb3495..f9ed78f868f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.0.0-beta.8" + ".": "3.0.0-beta.9" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 860345bb66e..b162e099397 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1,2 @@ -configured_endpoints: 1266 +configured_endpoints: 1274 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07ec76fab00de3d6227209faf0af1ed586cde9e2f243c13d3db555da20f13d99.yml diff --git a/Brewfile b/Brewfile new file mode 100644 index 00000000000..492ca37bb07 --- /dev/null +++ b/Brewfile @@ -0,0 +1,2 @@ +brew "rye" + diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e131be0957..d0adbeed795 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,135 @@ # Changelog +## 3.0.0-beta.9 (2024-05-08) + +Full Changelog: [v3.0.0-beta.8...v3.0.0-beta.9](https://github.com/cloudflare/cloudflare-python/compare/v3.0.0-beta.8...v3.0.0-beta.9) + +### Features + +* **api:** OpenAPI spec update via Stainless API ([#361](https://github.com/cloudflare/cloudflare-python/issues/361)) ([e7b1250](https://github.com/cloudflare/cloudflare-python/commit/e7b125032096d691fef698e41d7d15d3fb393ccd)) +* **api:** OpenAPI spec update via Stainless API ([#363](https://github.com/cloudflare/cloudflare-python/issues/363)) ([3e13206](https://github.com/cloudflare/cloudflare-python/commit/3e132068725ab3f2763508a74fe685ecc5275b53)) +* **api:** OpenAPI spec update via Stainless API ([#364](https://github.com/cloudflare/cloudflare-python/issues/364)) ([f07a5ed](https://github.com/cloudflare/cloudflare-python/commit/f07a5ed23f26112ac8bdfde4a4f7c5fde658ffca)) +* **api:** OpenAPI spec update via Stainless API ([#366](https://github.com/cloudflare/cloudflare-python/issues/366)) ([450bcb1](https://github.com/cloudflare/cloudflare-python/commit/450bcb1069cbdae51324d68de101724b4d002b32)) +* **api:** OpenAPI spec update via Stainless API ([#367](https://github.com/cloudflare/cloudflare-python/issues/367)) ([667ea29](https://github.com/cloudflare/cloudflare-python/commit/667ea295f4bd8b9bbc53c67905c8c9e561f42c69)) +* **api:** OpenAPI spec update via Stainless API ([#368](https://github.com/cloudflare/cloudflare-python/issues/368)) ([0f6894c](https://github.com/cloudflare/cloudflare-python/commit/0f6894ca77ca070bb97211c3011e7e5afcfb88e7)) +* **api:** OpenAPI spec update via Stainless API ([#369](https://github.com/cloudflare/cloudflare-python/issues/369)) ([f4bc07d](https://github.com/cloudflare/cloudflare-python/commit/f4bc07dabd2f15a7e4f5fe8d9db6e160ca7969f4)) +* **api:** OpenAPI spec update via Stainless API ([#370](https://github.com/cloudflare/cloudflare-python/issues/370)) ([4462926](https://github.com/cloudflare/cloudflare-python/commit/4462926f062b177c359d197ad4f27f5ec58ff798)) +* **api:** OpenAPI spec update via Stainless API ([#371](https://github.com/cloudflare/cloudflare-python/issues/371)) ([62735a6](https://github.com/cloudflare/cloudflare-python/commit/62735a620988d3c01b621349b80d2a9f0fe70d46)) +* **api:** OpenAPI spec update via Stainless API ([#373](https://github.com/cloudflare/cloudflare-python/issues/373)) ([901076d](https://github.com/cloudflare/cloudflare-python/commit/901076d63bb964e67d6bd745435fcd1530d98147)) +* **api:** OpenAPI spec update via Stainless API ([#374](https://github.com/cloudflare/cloudflare-python/issues/374)) ([4c264e5](https://github.com/cloudflare/cloudflare-python/commit/4c264e57b03dce2363cc5ebd4b21cff9cbef9635)) +* **api:** OpenAPI spec update via Stainless API ([#375](https://github.com/cloudflare/cloudflare-python/issues/375)) ([f47b44d](https://github.com/cloudflare/cloudflare-python/commit/f47b44ddd9844228d13670a5a11c785949ac38d6)) +* **api:** OpenAPI spec update via Stainless API ([#376](https://github.com/cloudflare/cloudflare-python/issues/376)) ([2b05694](https://github.com/cloudflare/cloudflare-python/commit/2b056942ba28478f8d033e6e81fb66f1c918af5d)) +* **api:** OpenAPI spec update via Stainless API ([#377](https://github.com/cloudflare/cloudflare-python/issues/377)) ([0d9658b](https://github.com/cloudflare/cloudflare-python/commit/0d9658b135a43c115677e696e292413ab4ea7313)) +* **api:** OpenAPI spec update via Stainless API ([#378](https://github.com/cloudflare/cloudflare-python/issues/378)) ([1e6baac](https://github.com/cloudflare/cloudflare-python/commit/1e6baac5a2e902d74902d62adc359d603e1ff58b)) +* **api:** OpenAPI spec update via Stainless API ([#379](https://github.com/cloudflare/cloudflare-python/issues/379)) ([50890de](https://github.com/cloudflare/cloudflare-python/commit/50890de604d5de56e07d8cf6798c694d529467ff)) +* **api:** OpenAPI spec update via Stainless API ([#380](https://github.com/cloudflare/cloudflare-python/issues/380)) ([3791b11](https://github.com/cloudflare/cloudflare-python/commit/3791b11de048b1567404f4dc34b5c8495ddceb31)) +* **api:** OpenAPI spec update via Stainless API ([#381](https://github.com/cloudflare/cloudflare-python/issues/381)) ([1b02ff2](https://github.com/cloudflare/cloudflare-python/commit/1b02ff208aa8634d417bf96617c94f0369936690)) +* **api:** OpenAPI spec update via Stainless API ([#383](https://github.com/cloudflare/cloudflare-python/issues/383)) ([bcfd50b](https://github.com/cloudflare/cloudflare-python/commit/bcfd50b1877566d94b0d60e771a0de184d3b329f)) +* **api:** OpenAPI spec update via Stainless API ([#384](https://github.com/cloudflare/cloudflare-python/issues/384)) ([95d2093](https://github.com/cloudflare/cloudflare-python/commit/95d2093af1abad6ca1b1d71f9638d96571a8411c)) +* **api:** OpenAPI spec update via Stainless API ([#385](https://github.com/cloudflare/cloudflare-python/issues/385)) ([e879c41](https://github.com/cloudflare/cloudflare-python/commit/e879c416cca3f2bb8be87f09386946daf22f71e2)) +* **api:** OpenAPI spec update via Stainless API ([#386](https://github.com/cloudflare/cloudflare-python/issues/386)) ([4131fb9](https://github.com/cloudflare/cloudflare-python/commit/4131fb98e9df6d96c814561d6b5ff9577e70c4b7)) +* **api:** OpenAPI spec update via Stainless API ([#387](https://github.com/cloudflare/cloudflare-python/issues/387)) ([0c45514](https://github.com/cloudflare/cloudflare-python/commit/0c455142823215f27bc4f8ce6beee19a90fabe21)) +* **api:** OpenAPI spec update via Stainless API ([#388](https://github.com/cloudflare/cloudflare-python/issues/388)) ([f0d079b](https://github.com/cloudflare/cloudflare-python/commit/f0d079b8df93494c4d609c9e92a107fa85a5d43b)) +* **api:** OpenAPI spec update via Stainless API ([#389](https://github.com/cloudflare/cloudflare-python/issues/389)) ([d480ff6](https://github.com/cloudflare/cloudflare-python/commit/d480ff60e13bf433abedd3a7755fa2c36f427e15)) +* **api:** OpenAPI spec update via Stainless API ([#390](https://github.com/cloudflare/cloudflare-python/issues/390)) ([e9cf58d](https://github.com/cloudflare/cloudflare-python/commit/e9cf58db573c60b4de6a364787290d716dafe429)) +* **api:** OpenAPI spec update via Stainless API ([#391](https://github.com/cloudflare/cloudflare-python/issues/391)) ([4f7262f](https://github.com/cloudflare/cloudflare-python/commit/4f7262f0a98f1784b52929bcccd798c1d037f76c)) +* **api:** OpenAPI spec update via Stainless API ([#392](https://github.com/cloudflare/cloudflare-python/issues/392)) ([6f6d0ee](https://github.com/cloudflare/cloudflare-python/commit/6f6d0eeddb9ac296952b8213fc00334db553f657)) +* **api:** OpenAPI spec update via Stainless API ([#393](https://github.com/cloudflare/cloudflare-python/issues/393)) ([ed813ec](https://github.com/cloudflare/cloudflare-python/commit/ed813ec70cd55a369ff99872ec656f3a9d33f298)) +* **api:** OpenAPI spec update via Stainless API ([#394](https://github.com/cloudflare/cloudflare-python/issues/394)) ([4f2b676](https://github.com/cloudflare/cloudflare-python/commit/4f2b676f34a2299129c10a5ab2461ef10011bd5a)) +* **api:** OpenAPI spec update via Stainless API ([#395](https://github.com/cloudflare/cloudflare-python/issues/395)) ([748f5f6](https://github.com/cloudflare/cloudflare-python/commit/748f5f68a3695989b5932ab72ae7f62972aed658)) +* **api:** OpenAPI spec update via Stainless API ([#396](https://github.com/cloudflare/cloudflare-python/issues/396)) ([e491374](https://github.com/cloudflare/cloudflare-python/commit/e491374ef567842e9be4e6bcb2e8ab0ad5e4984b)) +* **api:** OpenAPI spec update via Stainless API ([#397](https://github.com/cloudflare/cloudflare-python/issues/397)) ([d78d4fd](https://github.com/cloudflare/cloudflare-python/commit/d78d4fd83fab971621f5f82a73e5f2e1bd701c4a)) +* **api:** OpenAPI spec update via Stainless API ([#398](https://github.com/cloudflare/cloudflare-python/issues/398)) ([922ae56](https://github.com/cloudflare/cloudflare-python/commit/922ae56e0ffd0c2642db4aaa1e564f8a045f362e)) +* **api:** OpenAPI spec update via Stainless API ([#399](https://github.com/cloudflare/cloudflare-python/issues/399)) ([6f51237](https://github.com/cloudflare/cloudflare-python/commit/6f512378e9b6ce98fe312f8d82ace9eefc12ad28)) +* **api:** OpenAPI spec update via Stainless API ([#400](https://github.com/cloudflare/cloudflare-python/issues/400)) ([93768ad](https://github.com/cloudflare/cloudflare-python/commit/93768adee051e09cba9571c66d241a39c7f42278)) +* **api:** OpenAPI spec update via Stainless API ([#402](https://github.com/cloudflare/cloudflare-python/issues/402)) ([9d3553e](https://github.com/cloudflare/cloudflare-python/commit/9d3553ea556c4af38cdbd46dfa928b15c2a797e6)) +* **api:** OpenAPI spec update via Stainless API ([#404](https://github.com/cloudflare/cloudflare-python/issues/404)) ([43518fe](https://github.com/cloudflare/cloudflare-python/commit/43518fe42f2513519ae07b0ab5dacd250a8b3dc3)) +* **api:** OpenAPI spec update via Stainless API ([#405](https://github.com/cloudflare/cloudflare-python/issues/405)) ([c63ecd2](https://github.com/cloudflare/cloudflare-python/commit/c63ecd227ad7f60dd749e7a1bc954ec7152a590f)) +* **api:** OpenAPI spec update via Stainless API ([#406](https://github.com/cloudflare/cloudflare-python/issues/406)) ([440ed8c](https://github.com/cloudflare/cloudflare-python/commit/440ed8c9803d3caa7b553a2c2bb547b6f3f9b653)) +* **api:** OpenAPI spec update via Stainless API ([#407](https://github.com/cloudflare/cloudflare-python/issues/407)) ([d710762](https://github.com/cloudflare/cloudflare-python/commit/d7107627d433ca5327ac527e7eadff36054e3dc0)) +* **api:** OpenAPI spec update via Stainless API ([#408](https://github.com/cloudflare/cloudflare-python/issues/408)) ([f4b5236](https://github.com/cloudflare/cloudflare-python/commit/f4b523604583011274363b6eb5373abb2e96ee87)) +* **api:** OpenAPI spec update via Stainless API ([#410](https://github.com/cloudflare/cloudflare-python/issues/410)) ([0bdab77](https://github.com/cloudflare/cloudflare-python/commit/0bdab771c63099b0a4802872beeddcee3fc13e1f)) +* **api:** OpenAPI spec update via Stainless API ([#411](https://github.com/cloudflare/cloudflare-python/issues/411)) ([cc69543](https://github.com/cloudflare/cloudflare-python/commit/cc69543c892d32adb9b05c199f42f7ebf74e1663)) +* **api:** OpenAPI spec update via Stainless API ([#412](https://github.com/cloudflare/cloudflare-python/issues/412)) ([bf03c16](https://github.com/cloudflare/cloudflare-python/commit/bf03c168ec44ed8274ac1c5d71447a9d7c4d7418)) +* **api:** OpenAPI spec update via Stainless API ([#413](https://github.com/cloudflare/cloudflare-python/issues/413)) ([0573515](https://github.com/cloudflare/cloudflare-python/commit/05735158faa2b715c882d7e326287142abf83204)) +* **api:** OpenAPI spec update via Stainless API ([#414](https://github.com/cloudflare/cloudflare-python/issues/414)) ([163b0c6](https://github.com/cloudflare/cloudflare-python/commit/163b0c6507a745dbee1f66ef39e6b24bc60ebcfe)) +* **api:** OpenAPI spec update via Stainless API ([#415](https://github.com/cloudflare/cloudflare-python/issues/415)) ([2c56c7a](https://github.com/cloudflare/cloudflare-python/commit/2c56c7a85da03def8ac5e7fac79836ab5392f31b)) +* **api:** OpenAPI spec update via Stainless API ([#416](https://github.com/cloudflare/cloudflare-python/issues/416)) ([04a6d48](https://github.com/cloudflare/cloudflare-python/commit/04a6d48206450abf71dff92c7afd1d77b0615cd0)) +* **api:** OpenAPI spec update via Stainless API ([#418](https://github.com/cloudflare/cloudflare-python/issues/418)) ([068cc21](https://github.com/cloudflare/cloudflare-python/commit/068cc214aca1500743f82a58b1e7bf332f758233)) +* **api:** OpenAPI spec update via Stainless API ([#420](https://github.com/cloudflare/cloudflare-python/issues/420)) ([e62e98e](https://github.com/cloudflare/cloudflare-python/commit/e62e98e5d89f36dbfe2f3ed440091c8f93c6edec)) +* **api:** OpenAPI spec update via Stainless API ([#421](https://github.com/cloudflare/cloudflare-python/issues/421)) ([d81b910](https://github.com/cloudflare/cloudflare-python/commit/d81b910c0a3647072a5fb52eb53729f02160a975)) +* **api:** OpenAPI spec update via Stainless API ([#422](https://github.com/cloudflare/cloudflare-python/issues/422)) ([251ecc8](https://github.com/cloudflare/cloudflare-python/commit/251ecc83c878483be63c2c57aaad5025bcc43a32)) +* **api:** OpenAPI spec update via Stainless API ([#423](https://github.com/cloudflare/cloudflare-python/issues/423)) ([8d41200](https://github.com/cloudflare/cloudflare-python/commit/8d41200c0c4149a804e66428b7f37de710acc79f)) +* **api:** OpenAPI spec update via Stainless API ([#424](https://github.com/cloudflare/cloudflare-python/issues/424)) ([b642c09](https://github.com/cloudflare/cloudflare-python/commit/b642c0972ef751616640c028488165ac874abed0)) +* **api:** OpenAPI spec update via Stainless API ([#425](https://github.com/cloudflare/cloudflare-python/issues/425)) ([82d2f8f](https://github.com/cloudflare/cloudflare-python/commit/82d2f8f1b57249aadc75a53f2d0010a5abf87424)) +* **api:** OpenAPI spec update via Stainless API ([#426](https://github.com/cloudflare/cloudflare-python/issues/426)) ([aeb756c](https://github.com/cloudflare/cloudflare-python/commit/aeb756c9fcc965e682ebe3a2058dda21f574a760)) +* **api:** OpenAPI spec update via Stainless API ([#427](https://github.com/cloudflare/cloudflare-python/issues/427)) ([36dc827](https://github.com/cloudflare/cloudflare-python/commit/36dc82761f5541f8ef3204985ddfb7d147707994)) +* **api:** OpenAPI spec update via Stainless API ([#428](https://github.com/cloudflare/cloudflare-python/issues/428)) ([745d056](https://github.com/cloudflare/cloudflare-python/commit/745d0567fda8be9a5234aefeee5f2a73d35e5c0f)) +* **api:** OpenAPI spec update via Stainless API ([#429](https://github.com/cloudflare/cloudflare-python/issues/429)) ([d819bba](https://github.com/cloudflare/cloudflare-python/commit/d819bba2ee4d3c3c1d2aeb5aa496848e5bf44323)) +* **api:** OpenAPI spec update via Stainless API ([#430](https://github.com/cloudflare/cloudflare-python/issues/430)) ([b40922a](https://github.com/cloudflare/cloudflare-python/commit/b40922a3cee91afe56ca943c8b2c5d47bd4262b3)) +* **api:** OpenAPI spec update via Stainless API ([#431](https://github.com/cloudflare/cloudflare-python/issues/431)) ([4c49e97](https://github.com/cloudflare/cloudflare-python/commit/4c49e97f611f07749397306899b7a06969fbbec8)) +* **api:** OpenAPI spec update via Stainless API ([#432](https://github.com/cloudflare/cloudflare-python/issues/432)) ([f6889f6](https://github.com/cloudflare/cloudflare-python/commit/f6889f644d1abb69343395b8239ee7320ab29932)) +* **api:** OpenAPI spec update via Stainless API ([#433](https://github.com/cloudflare/cloudflare-python/issues/433)) ([e7fbd5c](https://github.com/cloudflare/cloudflare-python/commit/e7fbd5cb872fdd7cd65492ee505f3d300d8fcf30)) +* **api:** OpenAPI spec update via Stainless API ([#434](https://github.com/cloudflare/cloudflare-python/issues/434)) ([44790eb](https://github.com/cloudflare/cloudflare-python/commit/44790ebc0b78c0377cc58c19407d5dbdf2e53976)) +* **api:** OpenAPI spec update via Stainless API ([#435](https://github.com/cloudflare/cloudflare-python/issues/435)) ([2515c7d](https://github.com/cloudflare/cloudflare-python/commit/2515c7de55d346e495e93ecc1c232c2cf906f081)) +* **api:** OpenAPI spec update via Stainless API ([#436](https://github.com/cloudflare/cloudflare-python/issues/436)) ([00ce34a](https://github.com/cloudflare/cloudflare-python/commit/00ce34a8de1963ba24ff69a4a2008cf3d9f19ac0)) +* **api:** OpenAPI spec update via Stainless API ([#437](https://github.com/cloudflare/cloudflare-python/issues/437)) ([c785026](https://github.com/cloudflare/cloudflare-python/commit/c785026eca14c1f72be5f6a73de3ff1bb24cd69c)) +* **api:** OpenAPI spec update via Stainless API ([#438](https://github.com/cloudflare/cloudflare-python/issues/438)) ([380ae03](https://github.com/cloudflare/cloudflare-python/commit/380ae0356175062bab9177c600b6a0d5979d1811)) +* **api:** OpenAPI spec update via Stainless API ([#439](https://github.com/cloudflare/cloudflare-python/issues/439)) ([32602b7](https://github.com/cloudflare/cloudflare-python/commit/32602b7d45642d439fc0c955c1aea10f49cdd6f3)) +* **api:** OpenAPI spec update via Stainless API ([#440](https://github.com/cloudflare/cloudflare-python/issues/440)) ([3f60ca4](https://github.com/cloudflare/cloudflare-python/commit/3f60ca4a3d8e14f63e277bb601c7f325b1e5a784)) +* **api:** OpenAPI spec update via Stainless API ([#441](https://github.com/cloudflare/cloudflare-python/issues/441)) ([4b0f6de](https://github.com/cloudflare/cloudflare-python/commit/4b0f6dea7a67c0297362681b54801e417b3ec8c6)) +* **api:** OpenAPI spec update via Stainless API ([#442](https://github.com/cloudflare/cloudflare-python/issues/442)) ([9bc4051](https://github.com/cloudflare/cloudflare-python/commit/9bc4051ec140400193b06f9abbe0031c359eabe1)) +* **api:** OpenAPI spec update via Stainless API ([#443](https://github.com/cloudflare/cloudflare-python/issues/443)) ([960003f](https://github.com/cloudflare/cloudflare-python/commit/960003fd58de0baeb535258692775666125f0ec3)) +* **api:** OpenAPI spec update via Stainless API ([#444](https://github.com/cloudflare/cloudflare-python/issues/444)) ([b599852](https://github.com/cloudflare/cloudflare-python/commit/b599852c03cb95a16849a5c36717e08c0fe05bf3)) +* **api:** OpenAPI spec update via Stainless API ([#445](https://github.com/cloudflare/cloudflare-python/issues/445)) ([7dcadc3](https://github.com/cloudflare/cloudflare-python/commit/7dcadc30aa0c435b202dcb490b18ec162dc6b283)) +* **api:** OpenAPI spec update via Stainless API ([#446](https://github.com/cloudflare/cloudflare-python/issues/446)) ([b576950](https://github.com/cloudflare/cloudflare-python/commit/b57695017af6e14802fe769c6428b481a48a3394)) +* **api:** OpenAPI spec update via Stainless API ([#447](https://github.com/cloudflare/cloudflare-python/issues/447)) ([9920201](https://github.com/cloudflare/cloudflare-python/commit/99202012bf896b9056cc08a8ea475cbc8a232613)) +* **api:** OpenAPI spec update via Stainless API ([#448](https://github.com/cloudflare/cloudflare-python/issues/448)) ([38532c0](https://github.com/cloudflare/cloudflare-python/commit/38532c0d8890ea956c17448073d0f4da7fe4dc7e)) +* **api:** OpenAPI spec update via Stainless API ([#449](https://github.com/cloudflare/cloudflare-python/issues/449)) ([91c6d1e](https://github.com/cloudflare/cloudflare-python/commit/91c6d1e462766bad209e6e1c1fbc247ee7bfd94a)) +* **api:** OpenAPI spec update via Stainless API ([#450](https://github.com/cloudflare/cloudflare-python/issues/450)) ([16afaf2](https://github.com/cloudflare/cloudflare-python/commit/16afaf21154a4cd5b8199dc8cedac6d3d0d86bfa)) +* **api:** OpenAPI spec update via Stainless API ([#451](https://github.com/cloudflare/cloudflare-python/issues/451)) ([7522679](https://github.com/cloudflare/cloudflare-python/commit/7522679d40e7e001c0f2910793b6baf9bc29f5e8)) +* **api:** OpenAPI spec update via Stainless API ([#452](https://github.com/cloudflare/cloudflare-python/issues/452)) ([3947c44](https://github.com/cloudflare/cloudflare-python/commit/3947c44b98f3e945d31da8f9611b358dcd30b70f)) +* **api:** OpenAPI spec update via Stainless API ([#453](https://github.com/cloudflare/cloudflare-python/issues/453)) ([52e20a3](https://github.com/cloudflare/cloudflare-python/commit/52e20a3a7288ab77f7f8f724a2019f9b48d4ef9c)) +* **api:** OpenAPI spec update via Stainless API ([#454](https://github.com/cloudflare/cloudflare-python/issues/454)) ([181cc9b](https://github.com/cloudflare/cloudflare-python/commit/181cc9b970a578d7852b0519ce295116597ad746)) +* **api:** OpenAPI spec update via Stainless API ([#455](https://github.com/cloudflare/cloudflare-python/issues/455)) ([64acf4e](https://github.com/cloudflare/cloudflare-python/commit/64acf4e7ac532e25b91f9dd82d446765e2c4c642)) +* **api:** OpenAPI spec update via Stainless API ([#457](https://github.com/cloudflare/cloudflare-python/issues/457)) ([8b0e168](https://github.com/cloudflare/cloudflare-python/commit/8b0e1686a30f9e4cf66d4b224c8018ad1d796112)) +* **api:** OpenAPI spec update via Stainless API ([#458](https://github.com/cloudflare/cloudflare-python/issues/458)) ([6f64262](https://github.com/cloudflare/cloudflare-python/commit/6f642627ebf32e1c9ab48e202dc4ce4c99ed7059)) +* **api:** OpenAPI spec update via Stainless API ([#460](https://github.com/cloudflare/cloudflare-python/issues/460)) ([32e92cf](https://github.com/cloudflare/cloudflare-python/commit/32e92cfeec38b615e48ca8da842365a5e57b0ac2)) +* **api:** OpenAPI spec update via Stainless API ([#461](https://github.com/cloudflare/cloudflare-python/issues/461)) ([16dd159](https://github.com/cloudflare/cloudflare-python/commit/16dd159f786520deb6c01e94f1f91da5f0ef8620)) +* **api:** OpenAPI spec update via Stainless API ([#462](https://github.com/cloudflare/cloudflare-python/issues/462)) ([f1ce7a5](https://github.com/cloudflare/cloudflare-python/commit/f1ce7a5afb79c5b38ce9de77240f85c8c94088aa)) +* **api:** OpenAPI spec update via Stainless API ([#463](https://github.com/cloudflare/cloudflare-python/issues/463)) ([2cb4efb](https://github.com/cloudflare/cloudflare-python/commit/2cb4efb26b0f78b3f5b640bb54e62643c369206c)) +* **api:** OpenAPI spec update via Stainless API ([#464](https://github.com/cloudflare/cloudflare-python/issues/464)) ([7892bb7](https://github.com/cloudflare/cloudflare-python/commit/7892bb7d1630e6973c39dfa313af9526c5b2c744)) +* **api:** update via SDK Studio ([#365](https://github.com/cloudflare/cloudflare-python/issues/365)) ([14b7e5f](https://github.com/cloudflare/cloudflare-python/commit/14b7e5f00f4ac1f2260a2c34b51007dd1841afd8)) +* **api:** update via SDK Studio ([#372](https://github.com/cloudflare/cloudflare-python/issues/372)) ([8c8ac04](https://github.com/cloudflare/cloudflare-python/commit/8c8ac04826c63c25b918fb66ddc0f5132b74a223)) +* **api:** update via SDK Studio ([#382](https://github.com/cloudflare/cloudflare-python/issues/382)) ([271a315](https://github.com/cloudflare/cloudflare-python/commit/271a3159095426cd2083c513430228f4f4faa3f4)) +* **api:** update via SDK Studio ([#403](https://github.com/cloudflare/cloudflare-python/issues/403)) ([c6b3d39](https://github.com/cloudflare/cloudflare-python/commit/c6b3d3981404c17fb94c066dd9e8f2ae5c32d20b)) +* **api:** update via SDK Studio ([#409](https://github.com/cloudflare/cloudflare-python/issues/409)) ([61d3efb](https://github.com/cloudflare/cloudflare-python/commit/61d3efb5ef11b62a616e00fc8249c675f4c58a3e)) +* **api:** update via SDK Studio ([#417](https://github.com/cloudflare/cloudflare-python/issues/417)) ([9312532](https://github.com/cloudflare/cloudflare-python/commit/9312532ca4dd380c1376e54ac184e3c25f968288)) +* **api:** update via SDK Studio ([#419](https://github.com/cloudflare/cloudflare-python/issues/419)) ([2817348](https://github.com/cloudflare/cloudflare-python/commit/2817348bd256ddb155a745d01d5908955c36c950)) +* **api:** update via SDK Studio ([#456](https://github.com/cloudflare/cloudflare-python/issues/456)) ([cc6768e](https://github.com/cloudflare/cloudflare-python/commit/cc6768e4ad310b4dcf439cdf6afa647d13d0d5ea)) +* **api:** update via SDK Studio ([#459](https://github.com/cloudflare/cloudflare-python/issues/459)) ([89bb6c5](https://github.com/cloudflare/cloudflare-python/commit/89bb6c5f8c2e49e53a6847a963cdd4b28d818a76)) +* **api:** update via SDK Studio ([#465](https://github.com/cloudflare/cloudflare-python/issues/465)) ([a7900a2](https://github.com/cloudflare/cloudflare-python/commit/a7900a2a5f3edb854a5773a04675cab0c0682f39)) +* **api:** update via SDK Studio ([#466](https://github.com/cloudflare/cloudflare-python/issues/466)) ([8f7435e](https://github.com/cloudflare/cloudflare-python/commit/8f7435e210ddd68ae8aff9af04863a6aca5bbdd3)) +* **api:** update via SDK Studio ([#467](https://github.com/cloudflare/cloudflare-python/issues/467)) ([bce1bf4](https://github.com/cloudflare/cloudflare-python/commit/bce1bf4e6cd3736b4d2f354e9b76ad688a3a26a8)) +* **api:** update via SDK Studio ([#468](https://github.com/cloudflare/cloudflare-python/issues/468)) ([a6c4b4b](https://github.com/cloudflare/cloudflare-python/commit/a6c4b4bc9fde79df3b027ed8599dd85cee217b9b)) +* **api:** update via SDK Studio ([#469](https://github.com/cloudflare/cloudflare-python/issues/469)) ([37db74d](https://github.com/cloudflare/cloudflare-python/commit/37db74ddacb5adc258985c22b5e27b605b7f3e64)) +* **api:** update via SDK Studio ([#470](https://github.com/cloudflare/cloudflare-python/issues/470)) ([6b8c3c3](https://github.com/cloudflare/cloudflare-python/commit/6b8c3c32276b4db1e24941a120eaf09de69460bb)) +* **api:** update via SDK Studio ([#471](https://github.com/cloudflare/cloudflare-python/issues/471)) ([7fc60d8](https://github.com/cloudflare/cloudflare-python/commit/7fc60d8c253a50ff314228ef650a22e58417f745)) +* **api:** update via SDK Studio ([#472](https://github.com/cloudflare/cloudflare-python/issues/472)) ([b8e303b](https://github.com/cloudflare/cloudflare-python/commit/b8e303bc9a9f8af90160f0953513afebf781ac97)) +* **api:** update via SDK Studio ([#473](https://github.com/cloudflare/cloudflare-python/issues/473)) ([535bdb6](https://github.com/cloudflare/cloudflare-python/commit/535bdb63517125b81a1d1ddbafeccbeb579581fe)) +* **api:** update via SDK Studio ([#474](https://github.com/cloudflare/cloudflare-python/issues/474)) ([dbf1fc7](https://github.com/cloudflare/cloudflare-python/commit/dbf1fc7a0b71db898130e45727cf0322f44619b6)) +* **api:** update via SDK Studio ([#475](https://github.com/cloudflare/cloudflare-python/issues/475)) ([52fc220](https://github.com/cloudflare/cloudflare-python/commit/52fc220fc3d0b067ea743583e2c1c1802fbcb820)) +* **api:** update via SDK Studio ([#476](https://github.com/cloudflare/cloudflare-python/issues/476)) ([ab74d84](https://github.com/cloudflare/cloudflare-python/commit/ab74d847efc696796cef40e387d8e1bc23adff16)) +* **api:** update via SDK Studio ([#477](https://github.com/cloudflare/cloudflare-python/issues/477)) ([2dc376e](https://github.com/cloudflare/cloudflare-python/commit/2dc376ed1effac78c98bf1f781ea86f368f931ab)) +* **api:** update via SDK Studio ([#478](https://github.com/cloudflare/cloudflare-python/issues/478)) ([cbd5196](https://github.com/cloudflare/cloudflare-python/commit/cbd51962761922a5efdadc90efbb084aba01a12d)) +* **api:** update via SDK Studio ([#479](https://github.com/cloudflare/cloudflare-python/issues/479)) ([18505d8](https://github.com/cloudflare/cloudflare-python/commit/18505d808f5e430ee974b4200bfbffc12204c876)) +* **api:** update via SDK Studio ([#480](https://github.com/cloudflare/cloudflare-python/issues/480)) ([72ff19a](https://github.com/cloudflare/cloudflare-python/commit/72ff19adb0d96a481850856aa9fd6f0e9a8ed2f7)) + + +### Chores + +* rebuild project due to oas spec rename ([#401](https://github.com/cloudflare/cloudflare-python/issues/401)) ([4f30fd4](https://github.com/cloudflare/cloudflare-python/commit/4f30fd4c1e09811c7dd3904e9d7179cfd4ceebe5)) + ## 3.0.0-beta.8 (2024-04-24) Full Changelog: [v3.0.0-beta.7...v3.0.0-beta.8](https://github.com/cloudflare/cloudflare-python/compare/v3.0.0-beta.7...v3.0.0-beta.8) diff --git a/README.md b/README.md index 38e63c79e14..9e5395a7053 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ client = Cloudflare( ) # Override per-request: -client.with_options(timeout=5 * 1000).zones.edit( +client.with_options(timeout=5.0).zones.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) ``` @@ -312,7 +312,7 @@ The context manager is required so that the response will reliably be closed. ### Making custom/undocumented requests -This library is typed for convenient access the documented API. +This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used. diff --git a/api.md b/api.md index c71a3bef468..5fca9d1aeaa 100644 --- a/api.md +++ b/api.md @@ -4,6 +4,8 @@ from cloudflare.types import ( ASN, AuditLog, + CertificateCA, + CertificateRequestType, CloudflareTunnel, ErrorData, Identifier, @@ -15,6 +17,7 @@ from cloudflare.types import ( ResponseInfo, Result, Role, + SortDirection, ) ``` @@ -42,7 +45,12 @@ Methods: Types: ```python -from cloudflare.types.accounts import UserWithInviteCode, MemberListResponse, MemberDeleteResponse +from cloudflare.types.accounts import ( + Status, + UserWithInviteCode, + MemberListResponse, + MemberDeleteResponse, +) ``` Methods: @@ -50,7 +58,7 @@ Methods: - client.accounts.members.create(\*, account_id, \*\*params) -> UserWithInviteCode - client.accounts.members.update(member_id, \*, account_id, \*\*params) -> Member - client.accounts.members.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[MemberListResponse] -- client.accounts.members.delete(member_id, \*, account_id, \*\*params) -> Optional +- client.accounts.members.delete(member_id, \*, account_id) -> Optional - client.accounts.members.get(member_id, \*, account_id) -> Member ## Roles @@ -81,10 +89,10 @@ from cloudflare.types.origin_ca_certificates import ( Methods: -- client.origin_ca_certificates.create(\*\*params) -> OriginCACertificateCreateResponse +- client.origin_ca_certificates.create(\*\*params) -> Optional - client.origin_ca_certificates.list(\*\*params) -> SyncSinglePage[OriginCACertificate] -- client.origin_ca_certificates.delete(certificate_id, \*\*params) -> OriginCACertificateDeleteResponse -- client.origin_ca_certificates.get(certificate_id) -> OriginCACertificateGetResponse +- client.origin_ca_certificates.delete(certificate_id) -> Optional +- client.origin_ca_certificates.get(certificate_id) -> Optional # IPs @@ -115,7 +123,7 @@ Methods: - client.memberships.update(membership_id, \*\*params) -> MembershipUpdateResponse - client.memberships.list(\*\*params) -> SyncV4PagePaginationArray[Membership] -- client.memberships.delete(membership_id, \*\*params) -> MembershipDeleteResponse +- client.memberships.delete(membership_id) -> MembershipDeleteResponse - client.memberships.get(membership_id) -> MembershipGetResponse # User @@ -188,7 +196,7 @@ from cloudflare.types.user import Organization, OrganizationDeleteResponse, Orga Methods: - client.user.organizations.list(\*\*params) -> SyncV4PagePaginationArray[Organization] -- client.user.organizations.delete(organization_id, \*\*params) -> OrganizationDeleteResponse +- client.user.organizations.delete(organization_id) -> OrganizationDeleteResponse - client.user.organizations.get(organization_id) -> OrganizationGetResponse ## Subscriptions @@ -211,7 +219,7 @@ from cloudflare.types.user import ( Methods: - client.user.subscriptions.update(identifier, \*\*params) -> SubscriptionUpdateResponse -- client.user.subscriptions.delete(identifier, \*\*params) -> SubscriptionDeleteResponse +- client.user.subscriptions.delete(identifier) -> SubscriptionDeleteResponse - client.user.subscriptions.edit(identifier, \*\*params) -> SubscriptionEditResponse - client.user.subscriptions.get() -> Optional @@ -238,7 +246,7 @@ Methods: - client.user.tokens.create(\*\*params) -> TokenCreateResponse - client.user.tokens.update(token_id, \*\*params) -> TokenUpdateResponse - client.user.tokens.list(\*\*params) -> SyncV4PagePaginationArray[object] -- client.user.tokens.delete(token_id, \*\*params) -> Optional +- client.user.tokens.delete(token_id) -> Optional - client.user.tokens.get(token_id) -> TokenGetResponse - client.user.tokens.verify() -> TokenVerifyResponse @@ -271,7 +279,7 @@ Methods: Types: ```python -from cloudflare.types.zones import Zone, ZoneDeleteResponse +from cloudflare.types.zones import Type, Zone, ZoneDeleteResponse ``` Methods: @@ -1036,7 +1044,9 @@ from cloudflare.types.load_balancers import ( OriginSteering, RandomSteering, Rules, + SessionAffinity, SessionAffinityAttributes, + SteeringPolicy, LoadBalancerDeleteResponse, ) ``` @@ -1046,7 +1056,7 @@ Methods: - client.load_balancers.create(\*, zone_id, \*\*params) -> LoadBalancer - client.load_balancers.update(load_balancer_id, \*, zone_id, \*\*params) -> LoadBalancer - client.load_balancers.list(\*, zone_id) -> SyncSinglePage[LoadBalancer] -- client.load_balancers.delete(load_balancer_id, \*, zone_id, \*\*params) -> LoadBalancerDeleteResponse +- client.load_balancers.delete(load_balancer_id, \*, zone_id) -> LoadBalancerDeleteResponse - client.load_balancers.edit(load_balancer_id, \*, zone_id, \*\*params) -> LoadBalancer - client.load_balancers.get(load_balancer_id, \*, zone_id) -> LoadBalancer @@ -1063,7 +1073,7 @@ Methods: - client.load_balancers.monitors.create(\*, account_id, \*\*params) -> Monitor - client.load_balancers.monitors.update(monitor_id, \*, account_id, \*\*params) -> Monitor - client.load_balancers.monitors.list(\*, account_id) -> SyncSinglePage[Monitor] -- client.load_balancers.monitors.delete(monitor_id, \*, account_id, \*\*params) -> MonitorDeleteResponse +- client.load_balancers.monitors.delete(monitor_id, \*, account_id) -> MonitorDeleteResponse - client.load_balancers.monitors.edit(monitor_id, \*, account_id, \*\*params) -> Monitor - client.load_balancers.monitors.get(monitor_id, \*, account_id) -> Monitor @@ -1104,7 +1114,7 @@ Methods: - client.load_balancers.pools.create(\*, account_id, \*\*params) -> Pool - client.load_balancers.pools.update(pool_id, \*, account_id, \*\*params) -> Pool - client.load_balancers.pools.list(\*, account_id, \*\*params) -> SyncSinglePage[Pool] -- client.load_balancers.pools.delete(pool_id, \*, account_id, \*\*params) -> PoolDeleteResponse +- client.load_balancers.pools.delete(pool_id, \*, account_id) -> PoolDeleteResponse - client.load_balancers.pools.edit(pool_id, \*, account_id, \*\*params) -> Pool - client.load_balancers.pools.get(pool_id, \*, account_id) -> Pool @@ -1190,6 +1200,7 @@ Types: from cloudflare.types.cache import ( CacheReserve, CacheReserveClear, + State, CacheReserveClearResponse, CacheReserveEditResponse, CacheReserveGetResponse, @@ -1218,7 +1229,7 @@ from cloudflare.types.cache import ( Methods: -- client.cache.smart_tiered_cache.delete(\*, zone_id, \*\*params) -> SmartTieredCacheDeleteResponse +- client.cache.smart_tiered_cache.delete(\*, zone_id) -> SmartTieredCacheDeleteResponse - client.cache.smart_tiered_cache.edit(\*, zone_id, \*\*params) -> SmartTieredCacheEditResponse - client.cache.smart_tiered_cache.get(\*, zone_id) -> SmartTieredCacheGetResponse @@ -1237,7 +1248,7 @@ from cloudflare.types.cache import ( Methods: -- client.cache.variants.delete(\*, zone_id, \*\*params) -> CacheVariant +- client.cache.variants.delete(\*, zone_id) -> CacheVariant - client.cache.variants.edit(\*, zone_id, \*\*params) -> VariantEditResponse - client.cache.variants.get(\*, zone_id) -> VariantGetResponse @@ -1270,7 +1281,7 @@ from cloudflare.types.ssl import AnalyzeCreateResponse Methods: -- client.ssl.analyze.create(\*, zone_id, \*\*params) -> AnalyzeCreateResponse +- client.ssl.analyze.create(\*, zone_id, \*\*params) -> Optional ## CertificatePacks @@ -1279,6 +1290,9 @@ Types: ```python from cloudflare.types.ssl import ( Host, + RequestValidity, + Status, + ValidationMethod, CertificatePackListResponse, CertificatePackDeleteResponse, CertificatePackEditResponse, @@ -1289,9 +1303,9 @@ from cloudflare.types.ssl import ( Methods: - client.ssl.certificate_packs.list(\*, zone_id, \*\*params) -> SyncSinglePage[object] -- client.ssl.certificate_packs.delete(certificate_pack_id, \*, zone_id, \*\*params) -> CertificatePackDeleteResponse -- client.ssl.certificate_packs.edit(certificate_pack_id, \*, zone_id, \*\*params) -> CertificatePackEditResponse -- client.ssl.certificate_packs.get(certificate_pack_id, \*, zone_id) -> CertificatePackGetResponse +- client.ssl.certificate_packs.delete(certificate_pack_id, \*, zone_id) -> Optional +- client.ssl.certificate_packs.edit(certificate_pack_id, \*, zone_id, \*\*params) -> Optional +- client.ssl.certificate_packs.get(certificate_pack_id, \*, zone_id) -> Optional ### Order @@ -1303,7 +1317,7 @@ from cloudflare.types.ssl.certificate_packs import OrderCreateResponse Methods: -- client.ssl.certificate_packs.order.create(\*, zone_id, \*\*params) -> OrderCreateResponse +- client.ssl.certificate_packs.order.create(\*, zone_id, \*\*params) -> Optional ### Quota @@ -1315,7 +1329,7 @@ from cloudflare.types.ssl.certificate_packs import QuotaGetResponse Methods: -- client.ssl.certificate_packs.quota.get(\*, zone_id) -> QuotaGetResponse +- client.ssl.certificate_packs.quota.get(\*, zone_id) -> Optional ## Recommendations @@ -1341,8 +1355,8 @@ from cloudflare.types.ssl.universal import UniversalSSLSettings Methods: -- client.ssl.universal.settings.edit(\*, zone_id, \*\*params) -> UniversalSSLSettings -- client.ssl.universal.settings.get(\*, zone_id) -> UniversalSSLSettings +- client.ssl.universal.settings.edit(\*, zone_id, \*\*params) -> Optional +- client.ssl.universal.settings.get(\*, zone_id) -> Optional ## Verification @@ -1354,7 +1368,7 @@ from cloudflare.types.ssl import Verification, VerificationEditResponse, Verific Methods: -- client.ssl.verification.edit(certificate_pack_id, \*, zone_id, \*\*params) -> VerificationEditResponse +- client.ssl.verification.edit(certificate_pack_id, \*, zone_id, \*\*params) -> Optional - client.ssl.verification.get(\*, zone_id, \*\*params) -> Optional # Subscriptions @@ -1375,7 +1389,7 @@ Methods: - client.subscriptions.create(identifier, \*\*params) -> SubscriptionCreateResponse - client.subscriptions.update(subscription_identifier, \*, account_identifier, \*\*params) -> SubscriptionUpdateResponse - client.subscriptions.list(account_identifier) -> SyncSinglePage[Subscription] -- client.subscriptions.delete(subscription_identifier, \*, account_identifier, \*\*params) -> SubscriptionDeleteResponse +- client.subscriptions.delete(subscription_identifier, \*, account_identifier) -> SubscriptionDeleteResponse - client.subscriptions.get(identifier) -> SubscriptionGetResponse # ACM @@ -1385,13 +1399,13 @@ Methods: Types: ```python -from cloudflare.types.acm import TotalTLSCreateResponse, TotalTLSGetResponse +from cloudflare.types.acm import CertificateAuthority, TotalTLSCreateResponse, TotalTLSGetResponse ``` Methods: -- client.acm.total_tls.create(\*, zone_id, \*\*params) -> TotalTLSCreateResponse -- client.acm.total_tls.get(\*, zone_id) -> TotalTLSGetResponse +- client.acm.total_tls.create(\*, zone_id, \*\*params) -> Optional +- client.acm.total_tls.get(\*, zone_id) -> Optional # Argo @@ -1463,8 +1477,8 @@ from cloudflare.types.certificate_authorities import ( Methods: -- client.certificate_authorities.hostname_associations.update(\*, zone_id, \*\*params) -> HostnameAssociationUpdateResponse -- client.certificate_authorities.hostname_associations.get(\*, zone_id, \*\*params) -> HostnameAssociationGetResponse +- client.certificate_authorities.hostname_associations.update(\*, zone_id, \*\*params) -> Optional +- client.certificate_authorities.hostname_associations.get(\*, zone_id, \*\*params) -> Optional # ClientCertificates @@ -1476,11 +1490,11 @@ from cloudflare.types.client_certificates import ClientCertificate Methods: -- client.client_certificates.create(\*, zone_id, \*\*params) -> ClientCertificate +- client.client_certificates.create(\*, zone_id, \*\*params) -> Optional - client.client_certificates.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[ClientCertificate] -- client.client_certificates.delete(client_certificate_id, \*, zone_id) -> ClientCertificate -- client.client_certificates.edit(client_certificate_id, \*, zone_id) -> ClientCertificate -- client.client_certificates.get(client_certificate_id, \*, zone_id) -> ClientCertificate +- client.client_certificates.delete(client_certificate_id, \*, zone_id) -> Optional +- client.client_certificates.edit(client_certificate_id, \*, zone_id) -> Optional +- client.client_certificates.get(client_certificate_id, \*, zone_id) -> Optional # CustomCertificates @@ -1490,6 +1504,7 @@ Types: from cloudflare.types.custom_certificates import ( CustomCertificate, GeoRestrictions, + Status, CustomCertificateCreateResponse, CustomCertificateDeleteResponse, CustomCertificateEditResponse, @@ -1499,11 +1514,11 @@ from cloudflare.types.custom_certificates import ( Methods: -- client.custom_certificates.create(\*, zone_id, \*\*params) -> CustomCertificateCreateResponse +- client.custom_certificates.create(\*, zone_id, \*\*params) -> Optional - client.custom_certificates.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[CustomCertificate] -- client.custom_certificates.delete(custom_certificate_id, \*, zone_id, \*\*params) -> CustomCertificateDeleteResponse -- client.custom_certificates.edit(custom_certificate_id, \*, zone_id, \*\*params) -> CustomCertificateEditResponse -- client.custom_certificates.get(custom_certificate_id, \*, zone_id) -> CustomCertificateGetResponse +- client.custom_certificates.delete(custom_certificate_id, \*, zone_id) -> Optional +- client.custom_certificates.edit(custom_certificate_id, \*, zone_id, \*\*params) -> Optional +- client.custom_certificates.get(custom_certificate_id, \*, zone_id) -> Optional ## Prioritize @@ -1537,11 +1552,11 @@ from cloudflare.types.custom_hostnames import ( Methods: -- client.custom_hostnames.create(\*, zone_id, \*\*params) -> CustomHostnameCreateResponse +- client.custom_hostnames.create(\*, zone_id, \*\*params) -> Optional - client.custom_hostnames.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[CustomHostnameListResponse] -- client.custom_hostnames.delete(custom_hostname_id, \*, zone_id, \*\*params) -> CustomHostnameDeleteResponse -- client.custom_hostnames.edit(custom_hostname_id, \*, zone_id, \*\*params) -> CustomHostnameEditResponse -- client.custom_hostnames.get(custom_hostname_id, \*, zone_id) -> CustomHostnameGetResponse +- client.custom_hostnames.delete(custom_hostname_id, \*, zone_id) -> CustomHostnameDeleteResponse +- client.custom_hostnames.edit(custom_hostname_id, \*, zone_id, \*\*params) -> Optional +- client.custom_hostnames.get(custom_hostname_id, \*, zone_id) -> Optional ## FallbackOrigin @@ -1557,9 +1572,9 @@ from cloudflare.types.custom_hostnames import ( Methods: -- client.custom_hostnames.fallback_origin.update(\*, zone_id, \*\*params) -> FallbackOriginUpdateResponse -- client.custom_hostnames.fallback_origin.delete(\*, zone_id, \*\*params) -> FallbackOriginDeleteResponse -- client.custom_hostnames.fallback_origin.get(\*, zone_id) -> FallbackOriginGetResponse +- client.custom_hostnames.fallback_origin.update(\*, zone_id, \*\*params) -> Optional +- client.custom_hostnames.fallback_origin.delete(\*, zone_id) -> Optional +- client.custom_hostnames.fallback_origin.get(\*, zone_id) -> Optional # CustomNameservers @@ -1571,17 +1586,15 @@ from cloudflare.types.custom_nameservers import ( CustomNameserverDeleteResponse, CustomNameserverAvailabiltyResponse, CustomNameserverGetResponse, - CustomNameserverVerifyResponse, ) ``` Methods: -- client.custom_nameservers.create(\*, account_id, \*\*params) -> CustomNameserver -- client.custom_nameservers.delete(custom_ns_id, \*, account_id, \*\*params) -> Optional +- client.custom_nameservers.create(\*, account_id, \*\*params) -> Optional +- client.custom_nameservers.delete(custom_ns_id, \*, account_id) -> Optional - client.custom_nameservers.availabilty(\*, account_id) -> Optional - client.custom_nameservers.get(\*, account_id) -> Optional -- client.custom_nameservers.verify(\*, account_id, \*\*params) -> Optional # DNS @@ -1634,7 +1647,7 @@ Methods: - client.dns.records.create(\*, zone_id, \*\*params) -> Optional - client.dns.records.update(dns_record_id, \*, zone_id, \*\*params) -> Optional - client.dns.records.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[Record] -- client.dns.records.delete(dns_record_id, \*, zone_id, \*\*params) -> Optional +- client.dns.records.delete(dns_record_id, \*, zone_id) -> Optional - client.dns.records.edit(dns_record_id, \*, zone_id, \*\*params) -> Optional - client.dns.records.export(\*, zone_id) -> str - client.dns.records.get(dns_record_id, \*, zone_id) -> Optional @@ -1685,12 +1698,18 @@ Methods: - client.dns.firewall.create(\*, account_id, \*\*params) -> Firewall - client.dns.firewall.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[Firewall] -- client.dns.firewall.delete(dns_firewall_id, \*, account_id, \*\*params) -> FirewallDeleteResponse +- client.dns.firewall.delete(dns_firewall_id, \*, account_id) -> FirewallDeleteResponse - client.dns.firewall.edit(dns_firewall_id, \*, account_id, \*\*params) -> Firewall - client.dns.firewall.get(dns_firewall_id, \*, account_id) -> Firewall ### Analytics +Types: + +```python +from cloudflare.types.dns.firewall import Delta +``` + #### Reports Methods: @@ -1713,7 +1732,7 @@ from cloudflare.types.dnssec import DNSSEC, DNSSECDeleteResponse Methods: -- client.dnssec.delete(\*, zone_id, \*\*params) -> Optional +- client.dnssec.delete(\*, zone_id) -> Optional - client.dnssec.edit(\*, zone_id, \*\*params) -> Optional - client.dnssec.get(\*, zone_id) -> Optional @@ -1727,9 +1746,9 @@ from cloudflare.types.email_routing import Settings Methods: -- client.email_routing.disable(zone_identifier, \*\*params) -> Settings -- client.email_routing.enable(zone_identifier, \*\*params) -> Settings -- client.email_routing.get(zone_identifier) -> Settings +- client.email_routing.disable(zone_identifier, \*\*params) -> Optional +- client.email_routing.enable(zone_identifier, \*\*params) -> Optional +- client.email_routing.get(zone_identifier) -> Optional ## DNS @@ -1753,11 +1772,11 @@ from cloudflare.types.email_routing import Action, EmailRoutingRule, Matcher Methods: -- client.email_routing.rules.create(zone_identifier, \*\*params) -> EmailRoutingRule -- client.email_routing.rules.update(rule_identifier, \*, zone_identifier, \*\*params) -> EmailRoutingRule +- client.email_routing.rules.create(zone_identifier, \*\*params) -> Optional +- client.email_routing.rules.update(rule_identifier, \*, zone_identifier, \*\*params) -> Optional - client.email_routing.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[EmailRoutingRule] -- client.email_routing.rules.delete(rule_identifier, \*, zone_identifier) -> EmailRoutingRule -- client.email_routing.rules.get(rule_identifier, \*, zone_identifier) -> EmailRoutingRule +- client.email_routing.rules.delete(rule_identifier, \*, zone_identifier) -> Optional +- client.email_routing.rules.get(rule_identifier, \*, zone_identifier) -> Optional ### CatchAlls @@ -1774,8 +1793,8 @@ from cloudflare.types.email_routing.rules import ( Methods: -- client.email_routing.rules.catch_alls.update(zone_identifier, \*\*params) -> CatchAllUpdateResponse -- client.email_routing.rules.catch_alls.get(zone_identifier) -> CatchAllGetResponse +- client.email_routing.rules.catch_alls.update(zone_identifier, \*\*params) -> Optional +- client.email_routing.rules.catch_alls.get(zone_identifier) -> Optional ## Addresses @@ -1787,10 +1806,10 @@ from cloudflare.types.email_routing import Address Methods: -- client.email_routing.addresses.create(account_identifier, \*\*params) -> Address +- client.email_routing.addresses.create(account_identifier, \*\*params) -> Optional - client.email_routing.addresses.list(account_identifier, \*\*params) -> SyncV4PagePaginationArray[Address] -- client.email_routing.addresses.delete(destination_address_identifier, \*, account_identifier) -> Address -- client.email_routing.addresses.get(destination_address_identifier, \*, account_identifier) -> Address +- client.email_routing.addresses.delete(destination_address_identifier, \*, account_identifier) -> Optional +- client.email_routing.addresses.get(destination_address_identifier, \*, account_identifier) -> Optional # Filters @@ -1805,7 +1824,7 @@ Methods: - client.filters.create(zone_identifier, \*\*params) -> Optional - client.filters.update(id, \*, zone_identifier, \*\*params) -> FirewallFilter - client.filters.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[FirewallFilter] -- client.filters.delete(id, \*, zone_identifier, \*\*params) -> FirewallFilter +- client.filters.delete(id, \*, zone_identifier) -> FirewallFilter - client.filters.get(id, \*, zone_identifier) -> FirewallFilter # Firewall @@ -1830,7 +1849,7 @@ Methods: - client.firewall.lockdowns.create(zone_identifier, \*\*params) -> Lockdown - client.firewall.lockdowns.update(id, \*, zone_identifier, \*\*params) -> Lockdown - client.firewall.lockdowns.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[Lockdown] -- client.firewall.lockdowns.delete(id, \*, zone_identifier, \*\*params) -> Optional +- client.firewall.lockdowns.delete(id, \*, zone_identifier) -> Optional - client.firewall.lockdowns.get(id, \*, zone_identifier) -> Lockdown ## Rules @@ -1852,7 +1871,7 @@ Methods: - client.firewall.rules.create(zone_identifier, \*\*params) -> Optional - client.firewall.rules.update(id, \*, zone_identifier, \*\*params) -> FirewallRule - client.firewall.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[FirewallRule] -- client.firewall.rules.delete(id, \*, zone_identifier, \*\*params) -> FirewallRule +- client.firewall.rules.delete(id, \*, zone_identifier) -> FirewallRule - client.firewall.rules.edit(id, \*, zone_identifier, \*\*params) -> Optional - client.firewall.rules.get(zone_identifier, \*, path_id, \*\*params) -> FirewallRule @@ -1879,7 +1898,7 @@ Methods: - client.firewall.access_rules.create(\*, account_id, zone_id, \*\*params) -> AccessRuleCreateResponse - client.firewall.access_rules.list(\*, account_id, zone_id, \*\*params) -> SyncV4PagePaginationArray[object] -- client.firewall.access_rules.delete(identifier, \*, account_id, zone_id, \*\*params) -> Optional +- client.firewall.access_rules.delete(identifier, \*, account_id, zone_id) -> Optional - client.firewall.access_rules.edit(identifier, \*, account_id, zone_id, \*\*params) -> AccessRuleEditResponse - client.firewall.access_rules.get(identifier, \*, account_id, zone_id) -> AccessRuleGetResponse @@ -1902,7 +1921,7 @@ Methods: - client.firewall.ua_rules.create(zone_identifier, \*\*params) -> UARuleCreateResponse - client.firewall.ua_rules.update(id, \*, zone_identifier, \*\*params) -> UARuleUpdateResponse - client.firewall.ua_rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[UARuleListResponse] -- client.firewall.ua_rules.delete(id, \*, zone_identifier, \*\*params) -> UARuleDeleteResponse +- client.firewall.ua_rules.delete(id, \*, zone_identifier) -> UARuleDeleteResponse - client.firewall.ua_rules.get(id, \*, zone_identifier) -> UARuleGetResponse ## WAF @@ -1926,7 +1945,7 @@ Methods: - client.firewall.waf.overrides.create(zone_identifier, \*\*params) -> Override - client.firewall.waf.overrides.update(id, \*, zone_identifier, \*\*params) -> Override - client.firewall.waf.overrides.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[Override] -- client.firewall.waf.overrides.delete(id, \*, zone_identifier, \*\*params) -> Optional +- client.firewall.waf.overrides.delete(id, \*, zone_identifier) -> Optional - client.firewall.waf.overrides.get(id, \*, zone_identifier) -> Override ### Packages @@ -1996,7 +2015,7 @@ Methods: - client.healthchecks.create(\*, zone_id, \*\*params) -> Healthcheck - client.healthchecks.update(healthcheck_id, \*, zone_id, \*\*params) -> Healthcheck - client.healthchecks.list(\*, zone_id, \*\*params) -> SyncSinglePage[Healthcheck] -- client.healthchecks.delete(healthcheck_id, \*, zone_id, \*\*params) -> HealthcheckDeleteResponse +- client.healthchecks.delete(healthcheck_id, \*, zone_id) -> HealthcheckDeleteResponse - client.healthchecks.edit(healthcheck_id, \*, zone_id, \*\*params) -> Healthcheck - client.healthchecks.get(healthcheck_id, \*, zone_id) -> Healthcheck @@ -2011,7 +2030,7 @@ from cloudflare.types.healthchecks import PreviewDeleteResponse Methods: - client.healthchecks.previews.create(\*, zone_id, \*\*params) -> Healthcheck -- client.healthchecks.previews.delete(healthcheck_id, \*, zone_id, \*\*params) -> PreviewDeleteResponse +- client.healthchecks.previews.delete(healthcheck_id, \*, zone_id) -> PreviewDeleteResponse - client.healthchecks.previews.get(healthcheck_id, \*, zone_id) -> Healthcheck # KeylessCertificates @@ -2028,11 +2047,11 @@ from cloudflare.types.keyless_certificates import ( Methods: -- client.keyless_certificates.create(\*, zone_id, \*\*params) -> KeylessCertificate +- client.keyless_certificates.create(\*, zone_id, \*\*params) -> Optional - client.keyless_certificates.list(\*, zone_id) -> SyncSinglePage[KeylessCertificate] -- client.keyless_certificates.delete(keyless_certificate_id, \*, zone_id, \*\*params) -> KeylessCertificateDeleteResponse -- client.keyless_certificates.edit(keyless_certificate_id, \*, zone_id, \*\*params) -> KeylessCertificate -- client.keyless_certificates.get(keyless_certificate_id, \*, zone_id) -> KeylessCertificate +- client.keyless_certificates.delete(keyless_certificate_id, \*, zone_id) -> Optional +- client.keyless_certificates.edit(keyless_certificate_id, \*, zone_id, \*\*params) -> Optional +- client.keyless_certificates.get(keyless_certificate_id, \*, zone_id) -> Optional # Logpush @@ -2088,7 +2107,7 @@ Methods: - client.logpush.jobs.create(\*, account_id, zone_id, \*\*params) -> Optional - client.logpush.jobs.update(job_id, \*, account_id, zone_id, \*\*params) -> Optional - client.logpush.jobs.list(\*, account_id, zone_id) -> SyncSinglePage[Optional] -- client.logpush.jobs.delete(job_id, \*, account_id, zone_id, \*\*params) -> object +- client.logpush.jobs.delete(job_id, \*, account_id, zone_id) -> object - client.logpush.jobs.get(job_id, \*, account_id, zone_id) -> Optional ## Ownership @@ -2149,7 +2168,7 @@ from cloudflare.types.logs.control.cmb import CmbConfig, ConfigDeleteResponse Methods: - client.logs.control.cmb.config.create(\*, account_id, \*\*params) -> Optional -- client.logs.control.cmb.config.delete(\*, account_id, \*\*params) -> object +- client.logs.control.cmb.config.delete(\*, account_id) -> object - client.logs.control.cmb.config.get(\*, account_id) -> Optional ## RayID @@ -2203,10 +2222,10 @@ from cloudflare.types.origin_tls_client_auth import ( Methods: -- client.origin_tls_client_auth.create(\*, zone_id, \*\*params) -> OriginTLSClientAuthCreateResponse +- client.origin_tls_client_auth.create(\*, zone_id, \*\*params) -> Optional - client.origin_tls_client_auth.list(\*, zone_id) -> SyncSinglePage[ZoneAuthenticatedOriginPull] -- client.origin_tls_client_auth.delete(certificate_id, \*, zone_id, \*\*params) -> OriginTLSClientAuthDeleteResponse -- client.origin_tls_client_auth.get(certificate_id, \*, zone_id) -> OriginTLSClientAuthGetResponse +- client.origin_tls_client_auth.delete(certificate_id, \*, zone_id) -> Optional +- client.origin_tls_client_auth.get(certificate_id, \*, zone_id) -> Optional ## Hostnames @@ -2219,7 +2238,7 @@ from cloudflare.types.origin_tls_client_auth import AuthenticatedOriginPull, Hos Methods: - client.origin_tls_client_auth.hostnames.update(\*, zone_id, \*\*params) -> Optional -- client.origin_tls_client_auth.hostnames.get(hostname, \*, zone_id) -> AuthenticatedOriginPull +- client.origin_tls_client_auth.hostnames.get(hostname, \*, zone_id) -> Optional ### Certificates @@ -2236,10 +2255,10 @@ from cloudflare.types.origin_tls_client_auth.hostnames import ( Methods: -- client.origin_tls_client_auth.hostnames.certificates.create(\*, zone_id, \*\*params) -> CertificateCreateResponse +- client.origin_tls_client_auth.hostnames.certificates.create(\*, zone_id, \*\*params) -> Optional - client.origin_tls_client_auth.hostnames.certificates.list(\*, zone_id) -> SyncSinglePage[AuthenticatedOriginPull] -- client.origin_tls_client_auth.hostnames.certificates.delete(certificate_id, \*, zone_id, \*\*params) -> CertificateDeleteResponse -- client.origin_tls_client_auth.hostnames.certificates.get(certificate_id, \*, zone_id) -> CertificateGetResponse +- client.origin_tls_client_auth.hostnames.certificates.delete(certificate_id, \*, zone_id) -> Optional +- client.origin_tls_client_auth.hostnames.certificates.get(certificate_id, \*, zone_id) -> Optional ## Settings @@ -2251,8 +2270,8 @@ from cloudflare.types.origin_tls_client_auth import SettingUpdateResponse, Setti Methods: -- client.origin_tls_client_auth.settings.update(\*, zone_id, \*\*params) -> SettingUpdateResponse -- client.origin_tls_client_auth.settings.get(\*, zone_id) -> SettingGetResponse +- client.origin_tls_client_auth.settings.update(\*, zone_id, \*\*params) -> Optional +- client.origin_tls_client_auth.settings.get(\*, zone_id) -> Optional # Pagerules @@ -2263,7 +2282,6 @@ from cloudflare.types.pagerules import ( PageRule, Route, Target, - URLTarget, PageruleCreateResponse, PageruleUpdateResponse, PageruleListResponse, @@ -2278,7 +2296,7 @@ Methods: - client.pagerules.create(\*, zone_id, \*\*params) -> PageruleCreateResponse - client.pagerules.update(pagerule_id, \*, zone_id, \*\*params) -> PageruleUpdateResponse - client.pagerules.list(\*, zone_id, \*\*params) -> PageruleListResponse -- client.pagerules.delete(pagerule_id, \*, zone_id, \*\*params) -> Optional +- client.pagerules.delete(pagerule_id, \*, zone_id) -> Optional - client.pagerules.edit(pagerule_id, \*, zone_id, \*\*params) -> PageruleEditResponse - client.pagerules.get(pagerule_id, \*, zone_id) -> PageruleGetResponse @@ -2314,7 +2332,7 @@ Methods: - client.rate_limits.create(zone_identifier, \*\*params) -> RateLimitCreateResponse - client.rate_limits.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[RateLimit] -- client.rate_limits.delete(id, \*, zone_identifier, \*\*params) -> RateLimitDeleteResponse +- client.rate_limits.delete(id, \*, zone_identifier) -> RateLimitDeleteResponse - client.rate_limits.edit(id, \*, zone_identifier, \*\*params) -> RateLimitEditResponse - client.rate_limits.get(id, \*, zone_identifier) -> RateLimitGetResponse @@ -2350,7 +2368,7 @@ Methods: - client.secondary_dns.incoming.create(\*, zone_id, \*\*params) -> Optional - client.secondary_dns.incoming.update(\*, zone_id, \*\*params) -> Optional -- client.secondary_dns.incoming.delete(\*, zone_id, \*\*params) -> Optional +- client.secondary_dns.incoming.delete(\*, zone_id) -> Optional - client.secondary_dns.incoming.get(\*, zone_id) -> Optional ## Outgoing @@ -2375,7 +2393,7 @@ Methods: - client.secondary_dns.outgoing.create(\*, zone_id, \*\*params) -> Optional - client.secondary_dns.outgoing.update(\*, zone_id, \*\*params) -> Optional -- client.secondary_dns.outgoing.delete(\*, zone_id, \*\*params) -> Optional +- client.secondary_dns.outgoing.delete(\*, zone_id) -> Optional - client.secondary_dns.outgoing.disable(\*, zone_id, \*\*params) -> str - client.secondary_dns.outgoing.enable(\*, zone_id, \*\*params) -> str - client.secondary_dns.outgoing.force_notify(\*, zone_id, \*\*params) -> str @@ -2400,7 +2418,7 @@ Methods: - client.secondary_dns.acls.create(\*, account_id, \*\*params) -> Optional - client.secondary_dns.acls.update(acl_id, \*, account_id, \*\*params) -> Optional - client.secondary_dns.acls.list(\*, account_id) -> SyncSinglePage[ACL] -- client.secondary_dns.acls.delete(acl_id, \*, account_id, \*\*params) -> Optional +- client.secondary_dns.acls.delete(acl_id, \*, account_id) -> Optional - client.secondary_dns.acls.get(acl_id, \*, account_id) -> Optional ## Peers @@ -2416,7 +2434,7 @@ Methods: - client.secondary_dns.peers.create(\*, account_id, \*\*params) -> Optional - client.secondary_dns.peers.update(peer_id, \*, account_id, \*\*params) -> Optional - client.secondary_dns.peers.list(\*, account_id) -> SyncSinglePage[Peer] -- client.secondary_dns.peers.delete(peer_id, \*, account_id, \*\*params) -> Optional +- client.secondary_dns.peers.delete(peer_id, \*, account_id) -> Optional - client.secondary_dns.peers.get(peer_id, \*, account_id) -> Optional ## TSIGs @@ -2432,7 +2450,7 @@ Methods: - client.secondary_dns.tsigs.create(\*, account_id, \*\*params) -> Optional - client.secondary_dns.tsigs.update(tsig_id, \*, account_id, \*\*params) -> Optional - client.secondary_dns.tsigs.list(\*, account_id) -> SyncSinglePage[TSIG] -- client.secondary_dns.tsigs.delete(tsig_id, \*, account_id, \*\*params) -> Optional +- client.secondary_dns.tsigs.delete(tsig_id, \*, account_id) -> Optional - client.secondary_dns.tsigs.get(tsig_id, \*, account_id) -> Optional # WaitingRooms @@ -2454,7 +2472,7 @@ Methods: - client.waiting_rooms.create(\*, zone_id, \*\*params) -> WaitingRoom - client.waiting_rooms.update(waiting_room_id, \*, zone_id, \*\*params) -> WaitingRoom - client.waiting_rooms.list(\*, zone_id, \*\*params) -> SyncSinglePage[WaitingRoom] -- client.waiting_rooms.delete(waiting_room_id, \*, zone_id, \*\*params) -> WaitingRoomDeleteResponse +- client.waiting_rooms.delete(waiting_room_id, \*, zone_id) -> WaitingRoomDeleteResponse - client.waiting_rooms.edit(waiting_room_id, \*, zone_id, \*\*params) -> WaitingRoom - client.waiting_rooms.get(waiting_room_id, \*, zone_id) -> WaitingRoom @@ -2483,7 +2501,7 @@ Methods: - client.waiting_rooms.events.create(waiting_room_id, \*, zone_id, \*\*params) -> Event - client.waiting_rooms.events.update(event_id, \*, zone_id, waiting_room_id, \*\*params) -> Event - client.waiting_rooms.events.list(waiting_room_id, \*, zone_id, \*\*params) -> SyncSinglePage[Event] -- client.waiting_rooms.events.delete(event_id, \*, zone_id, waiting_room_id, \*\*params) -> EventDeleteResponse +- client.waiting_rooms.events.delete(event_id, \*, zone_id, waiting_room_id) -> EventDeleteResponse - client.waiting_rooms.events.edit(event_id, \*, zone_id, waiting_room_id, \*\*params) -> Event - client.waiting_rooms.events.get(event_id, \*, zone_id, waiting_room_id) -> Event @@ -2518,7 +2536,7 @@ Methods: - client.waiting_rooms.rules.create(waiting_room_id, \*, zone_id, \*\*params) -> Optional - client.waiting_rooms.rules.update(waiting_room_id, \*, zone_id, \*\*params) -> Optional - client.waiting_rooms.rules.list(waiting_room_id, \*, zone_id) -> SyncSinglePage[WaitingRoomRule] -- client.waiting_rooms.rules.delete(rule_id, \*, zone_id, waiting_room_id, \*\*params) -> Optional +- client.waiting_rooms.rules.delete(rule_id, \*, zone_id, waiting_room_id) -> Optional - client.waiting_rooms.rules.edit(rule_id, \*, zone_id, waiting_room_id, \*\*params) -> Optional ## Statuses @@ -2566,7 +2584,7 @@ Methods: - client.web3.hostnames.create(zone_identifier, \*\*params) -> Hostname - client.web3.hostnames.list(zone_identifier) -> SyncSinglePage[Hostname] -- client.web3.hostnames.delete(identifier, \*, zone_identifier, \*\*params) -> Optional +- client.web3.hostnames.delete(identifier, \*, zone_identifier) -> Optional - client.web3.hostnames.edit(identifier, \*, zone_identifier, \*\*params) -> Hostname - client.web3.hostnames.get(identifier, \*, zone_identifier) -> Hostname @@ -2604,7 +2622,7 @@ Methods: - client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create(identifier, \*, zone_identifier, \*\*params) -> EntryCreateResponse - client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update(content_list_entry_identifier, \*, zone_identifier, identifier, \*\*params) -> EntryUpdateResponse - client.web3.hostnames.ipfs_universal_paths.content_lists.entries.list(identifier, \*, zone_identifier) -> Optional -- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.delete(content_list_entry_identifier, \*, zone_identifier, identifier, \*\*params) -> Optional +- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.delete(content_list_entry_identifier, \*, zone_identifier, identifier) -> Optional - client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get(content_list_entry_identifier, \*, zone_identifier, identifier) -> EntryGetResponse # Workers @@ -2685,7 +2703,7 @@ from cloudflare.types.workers.scripts import ( Methods: - client.workers.scripts.tail.create(script_name, \*, account_id, \*\*params) -> Optional -- client.workers.scripts.tail.delete(id, \*, account_id, script_name, \*\*params) -> TailDeleteResponse +- client.workers.scripts.tail.delete(id, \*, account_id, script_name) -> TailDeleteResponse - client.workers.scripts.tail.get(script_name, \*, account_id) -> Optional ### Content @@ -2762,7 +2780,7 @@ Methods: - client.workers.domains.update(\*, account_id, \*\*params) -> Optional - client.workers.domains.list(\*, account_id, \*\*params) -> SyncSinglePage[Domain] -- client.workers.domains.delete(domain_id, \*, account_id, \*\*params) -> None +- client.workers.domains.delete(domain_id, \*, account_id) -> None - client.workers.domains.get(domain_id, \*, account_id) -> Optional ## Subdomains @@ -2793,7 +2811,7 @@ Methods: - client.kv.namespaces.create(\*, account_id, \*\*params) -> Namespace - client.kv.namespaces.update(namespace_id, \*, account_id, \*\*params) -> NamespaceUpdateResponse - client.kv.namespaces.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[Namespace] -- client.kv.namespaces.delete(namespace_id, \*, account_id, \*\*params) -> NamespaceDeleteResponse +- client.kv.namespaces.delete(namespace_id, \*, account_id) -> NamespaceDeleteResponse ### Bulk @@ -2806,7 +2824,7 @@ from cloudflare.types.kv.namespaces import BulkUpdateResponse, BulkDeleteRespons Methods: - client.kv.namespaces.bulk.update(namespace_id, \*, account_id, \*\*params) -> BulkUpdateResponse -- client.kv.namespaces.bulk.delete(namespace_id, \*, account_id, \*\*params) -> BulkDeleteResponse +- client.kv.namespaces.bulk.delete(namespace_id, \*, account_id) -> BulkDeleteResponse ### Keys @@ -2847,7 +2865,7 @@ from cloudflare.types.kv.namespaces import ( Methods: - client.kv.namespaces.values.update(key_name, \*, account_id, namespace_id, \*\*params) -> ValueUpdateResponse -- client.kv.namespaces.values.delete(key_name, \*, account_id, namespace_id, \*\*params) -> ValueDeleteResponse +- client.kv.namespaces.values.delete(key_name, \*, account_id, namespace_id) -> ValueDeleteResponse - client.kv.namespaces.values.get(key_name, \*, account_id, namespace_id) -> str # DurableObjects @@ -2889,7 +2907,7 @@ Methods: - client.queues.create(\*, account_id, \*\*params) -> Optional - client.queues.update(queue_id, \*, account_id, \*\*params) -> Optional - client.queues.list(\*, account_id) -> SyncSinglePage[Queue] -- client.queues.delete(queue_id, \*, account_id, \*\*params) -> Optional +- client.queues.delete(queue_id, \*, account_id) -> Optional - client.queues.get(queue_id, \*, account_id) -> Optional ## Consumers @@ -2910,7 +2928,7 @@ Methods: - client.queues.consumers.create(queue_id, \*, account_id, \*\*params) -> Optional - client.queues.consumers.update(consumer_id, \*, account_id, queue_id, \*\*params) -> Optional -- client.queues.consumers.delete(consumer_id, \*, account_id, queue_id, \*\*params) -> Optional +- client.queues.consumers.delete(consumer_id, \*, account_id, queue_id) -> Optional - client.queues.consumers.get(queue_id, \*, account_id) -> Optional ## Messages @@ -3004,6 +3022,8 @@ Types: ```python from cloudflare.types.rulesets import ( + Kind, + Phase, Ruleset, RulesetCreateResponse, RulesetUpdateResponse, @@ -3198,7 +3218,7 @@ Methods: - client.spectrum.apps.create(zone, \*\*params) -> Optional - client.spectrum.apps.update(app_id, \*, zone, \*\*params) -> Optional - client.spectrum.apps.list(zone, \*\*params) -> SyncV4PagePaginationArray[object] -- client.spectrum.apps.delete(app_id, \*, zone, \*\*params) -> Optional +- client.spectrum.apps.delete(app_id, \*, zone) -> Optional - client.spectrum.apps.get(app_id, \*, zone) -> AppGetResponse # Addressing @@ -3222,6 +3242,7 @@ Types: ```python from cloudflare.types.addressing import ( AddressMap, + Kind, AddressMapCreateResponse, AddressMapDeleteResponse, AddressMapGetResponse, @@ -3232,7 +3253,7 @@ Methods: - client.addressing.address_maps.create(\*, account_id, \*\*params) -> Optional - client.addressing.address_maps.list(\*, account_id) -> SyncSinglePage[AddressMap] -- client.addressing.address_maps.delete(address_map_id, \*, account_id, \*\*params) -> Optional +- client.addressing.address_maps.delete(address_map_id, \*, account_id) -> Optional - client.addressing.address_maps.edit(address_map_id, \*, account_id, \*\*params) -> Optional - client.addressing.address_maps.get(address_map_id, \*, account_id) -> Optional @@ -3247,7 +3268,7 @@ from cloudflare.types.addressing.address_maps import AccountUpdateResponse, Acco Methods: - client.addressing.address_maps.accounts.update(address_map_id, \*, account_id, \*\*params) -> Optional -- client.addressing.address_maps.accounts.delete(address_map_id, \*, account_id, \*\*params) -> Optional +- client.addressing.address_maps.accounts.delete(address_map_id, \*, account_id) -> Optional ### IPs @@ -3260,7 +3281,7 @@ from cloudflare.types.addressing.address_maps import IPUpdateResponse, IPDeleteR Methods: - client.addressing.address_maps.ips.update(ip_address, \*, account_id, address_map_id, \*\*params) -> Optional -- client.addressing.address_maps.ips.delete(ip_address, \*, account_id, address_map_id, \*\*params) -> Optional +- client.addressing.address_maps.ips.delete(ip_address, \*, account_id, address_map_id) -> Optional ### Zones @@ -3273,7 +3294,7 @@ from cloudflare.types.addressing.address_maps import ZoneUpdateResponse, ZoneDel Methods: - client.addressing.address_maps.zones.update(address_map_id, \*, zone_id, account_id, \*\*params) -> Optional -- client.addressing.address_maps.zones.delete(address_map_id, \*, zone_id, account_id, \*\*params) -> Optional +- client.addressing.address_maps.zones.delete(address_map_id, \*, zone_id, account_id) -> Optional ## LOADocuments @@ -3311,7 +3332,7 @@ Methods: - client.addressing.prefixes.create(\*, account_id, \*\*params) -> Optional - client.addressing.prefixes.list(\*, account_id) -> SyncSinglePage[Prefix] -- client.addressing.prefixes.delete(prefix_id, \*, account_id, \*\*params) -> Optional +- client.addressing.prefixes.delete(prefix_id, \*, account_id) -> Optional - client.addressing.prefixes.edit(prefix_id, \*, account_id, \*\*params) -> Optional - client.addressing.prefixes.get(prefix_id, \*, account_id) -> Optional @@ -3371,7 +3392,7 @@ Methods: - client.addressing.prefixes.delegations.create(prefix_id, \*, account_id, \*\*params) -> Optional - client.addressing.prefixes.delegations.list(prefix_id, \*, account_id) -> SyncSinglePage[Delegations] -- client.addressing.prefixes.delegations.delete(delegation_id, \*, account_id, prefix_id, \*\*params) -> Optional +- client.addressing.prefixes.delegations.delete(delegation_id, \*, account_id, prefix_id) -> Optional # AuditLogs @@ -3409,8 +3430,8 @@ from cloudflare.types.brand_protection import ( Methods: -- client.brand_protection.submit(\*, account_id, \*\*params) -> Submit -- client.brand_protection.url_info(\*, account_id, \*\*params) -> Info +- client.brand_protection.submit(\*, account_id, \*\*params) -> Optional +- client.brand_protection.url_info(\*, account_id, \*\*params) -> Optional # Diagnostics @@ -3440,7 +3461,7 @@ Methods: - client.images.v1.create(\*, account_id, \*\*params) -> Image - client.images.v1.list(\*, account_id, \*\*params) -> SyncV4PagePagination[V1ListResponse] -- client.images.v1.delete(image_id, \*, account_id, \*\*params) -> V1DeleteResponse +- client.images.v1.delete(image_id, \*, account_id) -> V1DeleteResponse - client.images.v1.edit(image_id, \*, account_id, \*\*params) -> Image - client.images.v1.get(image_id, \*, account_id) -> Image @@ -3488,7 +3509,7 @@ Methods: - client.images.v1.variants.create(\*, account_id, \*\*params) -> VariantCreateResponse - client.images.v1.variants.list(\*, account_id) -> Variant -- client.images.v1.variants.delete(variant_id, \*, account_id, \*\*params) -> VariantDeleteResponse +- client.images.v1.variants.delete(variant_id, \*, account_id) -> VariantDeleteResponse - client.images.v1.variants.edit(variant_id, \*, account_id, \*\*params) -> VariantEditResponse - client.images.v1.variants.get(variant_id, \*, account_id) -> VariantGetResponse @@ -3528,7 +3549,7 @@ Methods: Methods: -- client.intel.asn.get(asn, \*, account_id) -> ASN +- client.intel.asn.get(asn, \*, account_id) -> Optional ### Subnets @@ -3564,7 +3585,7 @@ from cloudflare.types.intel import Domain Methods: -- client.intel.domains.get(\*, account_id, \*\*params) -> Domain +- client.intel.domains.get(\*, account_id, \*\*params) -> Optional ### Bulks @@ -3624,19 +3645,19 @@ from cloudflare.types.intel import MiscategorizationCreateResponse Methods: -- client.intel.miscategorizations.create(\*, account_id, \*\*params) -> MiscategorizationCreateResponse +- client.intel.miscategorizations.create(\*, account_id, \*\*params) -> Optional ## Whois Types: ```python -from cloudflare.types.intel import Whois +from cloudflare.types.intel import Whois, WhoisGetResponse ``` Methods: -- client.intel.whois.get(\*, account_id, \*\*params) -> Whois +- client.intel.whois.get(\*, account_id, \*\*params) -> Optional ## IndicatorFeeds @@ -3654,11 +3675,23 @@ from cloudflare.types.intel import ( Methods: -- client.intel.indicator_feeds.create(\*, account_id, \*\*params) -> IndicatorFeedCreateResponse -- client.intel.indicator_feeds.update(feed_id, \*, account_id, \*\*params) -> IndicatorFeedUpdateResponse +- client.intel.indicator_feeds.create(\*, account_id, \*\*params) -> Optional +- client.intel.indicator_feeds.update(feed_id, \*, account_id, \*\*params) -> Optional - client.intel.indicator_feeds.list(\*, account_id) -> SyncSinglePage[IndicatorFeedListResponse] - client.intel.indicator_feeds.data(feed_id, \*, account_id) -> str -- client.intel.indicator_feeds.get(feed_id, \*, account_id) -> IndicatorFeedGetResponse +- client.intel.indicator_feeds.get(feed_id, \*, account_id) -> Optional + +### Snapshots + +Types: + +```python +from cloudflare.types.intel.indicator_feeds import SnapshotUpdateResponse +``` + +Methods: + +- client.intel.indicator_feeds.snapshots.update(feed_id, \*, account_id, \*\*params) -> Optional ### Permissions @@ -3674,9 +3707,9 @@ from cloudflare.types.intel.indicator_feeds import ( Methods: -- client.intel.indicator_feeds.permissions.create(\*, account_id, \*\*params) -> PermissionCreateResponse -- client.intel.indicator_feeds.permissions.list(\*, account_id) -> PermissionListResponse -- client.intel.indicator_feeds.permissions.delete(\*, account_id, \*\*params) -> PermissionDeleteResponse +- client.intel.indicator_feeds.permissions.create(\*, account_id, \*\*params) -> Optional +- client.intel.indicator_feeds.permissions.list(\*, account_id) -> Optional +- client.intel.indicator_feeds.permissions.delete(\*, account_id, \*\*params) -> Optional ## Sinkholes @@ -3710,11 +3743,8 @@ Types: ```python from cloudflare.types.intel.attack_surface_report import ( - IssueClass, IssueType, - Product, SeverityQueryParam, - Subject, IssueListResponse, IssueClassResponse, IssueDismissResponse, @@ -3776,7 +3806,7 @@ Methods: - client.magic_transit.gre_tunnels.create(\*, account_id, \*\*params) -> GRETunnelCreateResponse - client.magic_transit.gre_tunnels.update(tunnel_identifier, \*, account_id, \*\*params) -> GRETunnelUpdateResponse - client.magic_transit.gre_tunnels.list(\*, account_id) -> GRETunnelListResponse -- client.magic_transit.gre_tunnels.delete(tunnel_identifier, \*, account_id, \*\*params) -> GRETunnelDeleteResponse +- client.magic_transit.gre_tunnels.delete(tunnel_identifier, \*, account_id) -> GRETunnelDeleteResponse - client.magic_transit.gre_tunnels.get(tunnel_identifier, \*, account_id) -> GRETunnelGetResponse ## IPSECTunnels @@ -3800,7 +3830,7 @@ Methods: - client.magic_transit.ipsec_tunnels.create(\*, account_id, \*\*params) -> IPSECTunnelCreateResponse - client.magic_transit.ipsec_tunnels.update(tunnel_identifier, \*, account_id, \*\*params) -> IPSECTunnelUpdateResponse - client.magic_transit.ipsec_tunnels.list(\*, account_id) -> IPSECTunnelListResponse -- client.magic_transit.ipsec_tunnels.delete(tunnel_identifier, \*, account_id, \*\*params) -> IPSECTunnelDeleteResponse +- client.magic_transit.ipsec_tunnels.delete(tunnel_identifier, \*, account_id) -> IPSECTunnelDeleteResponse - client.magic_transit.ipsec_tunnels.get(tunnel_identifier, \*, account_id) -> IPSECTunnelGetResponse - client.magic_transit.ipsec_tunnels.psk_generate(tunnel_identifier, \*, account_id, \*\*params) -> IPSECTunnelPSKGenerateResponse @@ -3810,8 +3840,6 @@ Types: ```python from cloudflare.types.magic_transit import ( - ColoName, - ColoRegion, Scope, RouteCreateResponse, RouteUpdateResponse, @@ -3827,8 +3855,8 @@ Methods: - client.magic_transit.routes.create(\*, account_id, \*\*params) -> RouteCreateResponse - client.magic_transit.routes.update(route_identifier, \*, account_id, \*\*params) -> RouteUpdateResponse - client.magic_transit.routes.list(\*, account_id) -> RouteListResponse -- client.magic_transit.routes.delete(route_identifier, \*, account_id, \*\*params) -> RouteDeleteResponse -- client.magic_transit.routes.empty(\*, account_id, \*\*params) -> RouteEmptyResponse +- client.magic_transit.routes.delete(route_identifier, \*, account_id) -> RouteDeleteResponse +- client.magic_transit.routes.empty(\*, account_id) -> RouteEmptyResponse - client.magic_transit.routes.get(route_identifier, \*, account_id) -> RouteGetResponse ## Sites @@ -3844,7 +3872,7 @@ Methods: - client.magic_transit.sites.create(\*, account_id, \*\*params) -> Site - client.magic_transit.sites.update(site_id, \*, account_id, \*\*params) -> Site - client.magic_transit.sites.list(\*, account_id, \*\*params) -> SyncSinglePage[Site] -- client.magic_transit.sites.delete(site_id, \*, account_id, \*\*params) -> Site +- client.magic_transit.sites.delete(site_id, \*, account_id) -> Site - client.magic_transit.sites.get(site_id, \*, account_id) -> Site ### ACLs @@ -3860,7 +3888,7 @@ Methods: - client.magic_transit.sites.acls.create(site_id, \*, account_id, \*\*params) -> ACL - client.magic_transit.sites.acls.update(acl_identifier, \*, account_id, site_id, \*\*params) -> ACL - client.magic_transit.sites.acls.list(site_id, \*, account_id) -> SyncSinglePage[ACL] -- client.magic_transit.sites.acls.delete(acl_identifier, \*, account_id, site_id, \*\*params) -> ACL +- client.magic_transit.sites.acls.delete(acl_identifier, \*, account_id, site_id) -> ACL - client.magic_transit.sites.acls.get(acl_identifier, \*, account_id, site_id) -> ACL ### LANs @@ -3884,7 +3912,7 @@ Methods: - client.magic_transit.sites.lans.create(site_id, \*, account_id, \*\*params) -> LANCreateResponse - client.magic_transit.sites.lans.update(lan_id, \*, account_id, site_id, \*\*params) -> LAN - client.magic_transit.sites.lans.list(site_id, \*, account_id) -> SyncSinglePage[LAN] -- client.magic_transit.sites.lans.delete(lan_id, \*, account_id, site_id, \*\*params) -> LAN +- client.magic_transit.sites.lans.delete(lan_id, \*, account_id, site_id) -> LAN - client.magic_transit.sites.lans.get(lan_id, \*, account_id, site_id) -> LAN ### WANs @@ -3900,7 +3928,7 @@ Methods: - client.magic_transit.sites.wans.create(site_id, \*, account_id, \*\*params) -> WANCreateResponse - client.magic_transit.sites.wans.update(wan_id, \*, account_id, site_id, \*\*params) -> WAN - client.magic_transit.sites.wans.list(site_id, \*, account_id) -> SyncSinglePage[WAN] -- client.magic_transit.sites.wans.delete(wan_id, \*, account_id, site_id, \*\*params) -> WAN +- client.magic_transit.sites.wans.delete(wan_id, \*, account_id, site_id) -> WAN - client.magic_transit.sites.wans.get(wan_id, \*, account_id, site_id) -> WAN # MagicNetworkMonitoring @@ -3917,7 +3945,7 @@ Methods: - client.magic_network_monitoring.configs.create(\*, account_id, \*\*params) -> Configuration - client.magic_network_monitoring.configs.update(\*, account_id, \*\*params) -> Configuration -- client.magic_network_monitoring.configs.delete(\*, account_id, \*\*params) -> Configuration +- client.magic_network_monitoring.configs.delete(\*, account_id) -> Configuration - client.magic_network_monitoring.configs.edit(\*, account_id, \*\*params) -> Configuration - client.magic_network_monitoring.configs.get(\*, account_id) -> Configuration @@ -3940,7 +3968,7 @@ Methods: - client.magic_network_monitoring.rules.create(\*, account_id, \*\*params) -> Optional - client.magic_network_monitoring.rules.update(\*, account_id, \*\*params) -> Optional - client.magic_network_monitoring.rules.list(\*, account_id) -> SyncSinglePage[Optional] -- client.magic_network_monitoring.rules.delete(rule_id, \*, account_id, \*\*params) -> Optional +- client.magic_network_monitoring.rules.delete(rule_id, \*, account_id) -> Optional - client.magic_network_monitoring.rules.edit(rule_id, \*, account_id, \*\*params) -> Optional - client.magic_network_monitoring.rules.get(rule_id, \*, account_id) -> Optional @@ -3966,10 +3994,10 @@ from cloudflare.types.mtls_certificates import MTLSCertificate, MTLSCertificateC Methods: -- client.mtls_certificates.create(\*, account_id, \*\*params) -> MTLSCertificateCreateResponse +- client.mtls_certificates.create(\*, account_id, \*\*params) -> Optional - client.mtls_certificates.list(\*, account_id) -> SyncSinglePage[MTLSCertificate] -- client.mtls_certificates.delete(mtls_certificate_id, \*, account_id, \*\*params) -> MTLSCertificate -- client.mtls_certificates.get(mtls_certificate_id, \*, account_id) -> MTLSCertificate +- client.mtls_certificates.delete(mtls_certificate_id, \*, account_id) -> Optional +- client.mtls_certificates.get(mtls_certificate_id, \*, account_id) -> Optional ## Associations @@ -4005,7 +4033,7 @@ Methods: - client.pages.projects.create(\*, account_id, \*\*params) -> ProjectCreateResponse - client.pages.projects.list(\*, account_id) -> SyncSinglePage[Deployment] -- client.pages.projects.delete(project_name, \*, account_id, \*\*params) -> object +- client.pages.projects.delete(project_name, \*, account_id) -> object - client.pages.projects.edit(project_name, \*, account_id, \*\*params) -> ProjectEditResponse - client.pages.projects.get(project_name, \*, account_id) -> Project - client.pages.projects.purge_build_cache(project_name, \*, account_id) -> object @@ -4022,7 +4050,7 @@ Methods: - client.pages.projects.deployments.create(project_name, \*, account_id, \*\*params) -> Deployment - client.pages.projects.deployments.list(project_name, \*, account_id, \*\*params) -> SyncSinglePage[Deployment] -- client.pages.projects.deployments.delete(deployment_id, \*, account_id, project_name, \*\*params) -> object +- client.pages.projects.deployments.delete(deployment_id, \*, account_id, project_name) -> object - client.pages.projects.deployments.get(deployment_id, \*, account_id, project_name) -> Deployment - client.pages.projects.deployments.retry(deployment_id, \*, account_id, project_name, \*\*params) -> Deployment - client.pages.projects.deployments.rollback(deployment_id, \*, account_id, project_name, \*\*params) -> Deployment @@ -4059,7 +4087,7 @@ Methods: - client.pages.projects.domains.create(project_name, \*, account_id, \*\*params) -> Optional - client.pages.projects.domains.list(project_name, \*, account_id) -> SyncSinglePage[object] -- client.pages.projects.domains.delete(domain_name, \*, account_id, project_name, \*\*params) -> object +- client.pages.projects.domains.delete(domain_name, \*, account_id, project_name) -> object - client.pages.projects.domains.edit(domain_name, \*, account_id, project_name, \*\*params) -> Optional - client.pages.projects.domains.get(domain_name, \*, account_id, project_name) -> Optional @@ -4149,7 +4177,7 @@ Methods: - client.rules.lists.create(\*, account_id, \*\*params) -> Optional - client.rules.lists.update(list_id, \*, account_id, \*\*params) -> Optional - client.rules.lists.list(\*, account_id) -> SyncSinglePage[ListsList] -- client.rules.lists.delete(list_id, \*, account_id, \*\*params) -> Optional +- client.rules.lists.delete(list_id, \*, account_id) -> Optional - client.rules.lists.get(list_id, \*, account_id) -> Optional ### BulkOperations @@ -4185,7 +4213,7 @@ Methods: - client.rules.lists.items.create(list_id, \*, account_id, \*\*params) -> Optional - client.rules.lists.items.update(list_id, \*, account_id, \*\*params) -> Optional - client.rules.lists.items.list(list_id, \*, account_id, \*\*params) -> SyncCursorPagination[object] -- client.rules.lists.items.delete(list_id, \*, account_id, \*\*params) -> Optional +- client.rules.lists.items.delete(list_id, \*, account_id) -> Optional - client.rules.lists.items.get(item_id, \*, account_identifier, list_id) -> Optional # Storage @@ -4215,7 +4243,7 @@ Methods: - client.stream.create(\*, account_id, \*\*params) -> None - client.stream.list(\*, account_id, \*\*params) -> SyncSinglePage[Video] -- client.stream.delete(identifier, \*, account_id, \*\*params) -> None +- client.stream.delete(identifier, \*, account_id) -> None - client.stream.get(identifier, \*, account_id) -> Optional ## AudioTracks @@ -4286,7 +4314,7 @@ from cloudflare.types.stream import Keys, KeyDeleteResponse, KeyGetResponse Methods: - client.stream.keys.create(\*, account_id, \*\*params) -> Optional -- client.stream.keys.delete(identifier, \*, account_id, \*\*params) -> Optional +- client.stream.keys.delete(identifier, \*, account_id) -> Optional - client.stream.keys.get(\*, account_id) -> Optional ## LiveInputs @@ -4302,7 +4330,7 @@ Methods: - client.stream.live_inputs.create(\*, account_id, \*\*params) -> Optional - client.stream.live_inputs.update(live_input_identifier, \*, account_id, \*\*params) -> Optional - client.stream.live_inputs.list(\*, account_id, \*\*params) -> Optional -- client.stream.live_inputs.delete(live_input_identifier, \*, account_id, \*\*params) -> None +- client.stream.live_inputs.delete(live_input_identifier, \*, account_id) -> None - client.stream.live_inputs.get(live_input_identifier, \*, account_id) -> Optional ### Outputs @@ -4318,7 +4346,7 @@ Methods: - client.stream.live_inputs.outputs.create(live_input_identifier, \*, account_id, \*\*params) -> Optional - client.stream.live_inputs.outputs.update(output_identifier, \*, account_id, live_input_identifier, \*\*params) -> Optional - client.stream.live_inputs.outputs.list(live_input_identifier, \*, account_id) -> SyncSinglePage[Output] -- client.stream.live_inputs.outputs.delete(output_identifier, \*, account_id, live_input_identifier, \*\*params) -> None +- client.stream.live_inputs.outputs.delete(output_identifier, \*, account_id, live_input_identifier) -> None ## Watermarks @@ -4332,7 +4360,7 @@ Methods: - client.stream.watermarks.create(\*, account_id, \*\*params) -> Optional - client.stream.watermarks.list(\*, account_id) -> SyncSinglePage[Watermark] -- client.stream.watermarks.delete(identifier, \*, account_id, \*\*params) -> Optional +- client.stream.watermarks.delete(identifier, \*, account_id) -> Optional - client.stream.watermarks.get(identifier, \*, account_id) -> Optional ## Webhooks @@ -4346,7 +4374,7 @@ from cloudflare.types.stream import WebhookUpdateResponse, WebhookDeleteResponse Methods: - client.stream.webhooks.update(\*, account_id, \*\*params) -> Optional -- client.stream.webhooks.delete(\*, account_id, \*\*params) -> Optional +- client.stream.webhooks.delete(\*, account_id) -> Optional - client.stream.webhooks.get(\*, account_id) -> Optional ## Captions @@ -4372,7 +4400,7 @@ from cloudflare.types.stream.captions import LanguageDeleteResponse Methods: - client.stream.captions.language.update(language, \*, account_id, identifier, \*\*params) -> Optional -- client.stream.captions.language.delete(language, \*, account_id, identifier, \*\*params) -> str +- client.stream.captions.language.delete(language, \*, account_id, identifier) -> str - client.stream.captions.language.get(language, \*, account_id, identifier) -> Optional #### Vtt @@ -4620,7 +4648,7 @@ Methods: - client.warp_connector.create(\*, account_id, \*\*params) -> WARPConnectorCreateResponse - client.warp_connector.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[WARPConnectorListResponse] -- client.warp_connector.delete(tunnel_id, \*, account_id, \*\*params) -> WARPConnectorDeleteResponse +- client.warp_connector.delete(tunnel_id, \*, account_id) -> WARPConnectorDeleteResponse - client.warp_connector.edit(tunnel_id, \*, account_id, \*\*params) -> WARPConnectorEditResponse - client.warp_connector.get(tunnel_id, \*, account_id) -> WARPConnectorGetResponse - client.warp_connector.token(tunnel_id, \*, account_id) -> WARPConnectorTokenResponse @@ -4781,7 +4809,7 @@ Methods: - client.zero_trust.devices.networks.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.networks.update(network_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.devices.networks.list(\*, account_id) -> SyncSinglePage[DeviceNetwork] -- client.zero_trust.devices.networks.delete(network_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.networks.delete(network_id, \*, account_id) -> Optional - client.zero_trust.devices.networks.get(network_id, \*, account_id) -> Optional ### Policies @@ -4796,7 +4824,7 @@ Methods: - client.zero_trust.devices.policies.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.policies.list(\*, account_id) -> SyncSinglePage[SettingsPolicy] -- client.zero_trust.devices.policies.delete(policy_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.policies.delete(policy_id, \*, account_id) -> Optional - client.zero_trust.devices.policies.edit(policy_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.devices.policies.get(policy_id, \*, account_id) -> Optional @@ -4900,7 +4928,7 @@ Methods: - client.zero_trust.devices.posture.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.posture.update(rule_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.devices.posture.list(\*, account_id) -> SyncSinglePage[DevicePostureRule] -- client.zero_trust.devices.posture.delete(rule_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.posture.delete(rule_id, \*, account_id) -> Optional - client.zero_trust.devices.posture.get(rule_id, \*, account_id) -> Optional #### Integrations @@ -4915,7 +4943,7 @@ Methods: - client.zero_trust.devices.posture.integrations.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.posture.integrations.list(\*, account_id) -> SyncSinglePage[Integration] -- client.zero_trust.devices.posture.integrations.delete(integration_id, \*, account_id, \*\*params) -> IntegrationDeleteResponse +- client.zero_trust.devices.posture.integrations.delete(integration_id, \*, account_id) -> IntegrationDeleteResponse - client.zero_trust.devices.posture.integrations.edit(integration_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.devices.posture.integrations.get(integration_id, \*, account_id) -> Optional @@ -5054,19 +5082,19 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - AllowedHeadersh, - AllowedIdpsh, - AllowedMethodsh, - AllowedOriginsh, + AllowedHeaders, + AllowedIdPs, + AllowedMethods, + AllowedOrigins, AppID, Application, + ApplicationType, CORSHeaders, - CustomPagesh, SaaSAppNameFormat, SaaSAppNameIDFormat, SaaSAppSource, SAMLSaaSApp, - SelfHostedDomainsh, + SelfHostedDomains, ApplicationDeleteResponse, ApplicationRevokeTokensResponse, ) @@ -5223,7 +5251,7 @@ Methods: - client.zero_trust.access.bookmarks.create(uuid, \*, identifier, \*\*params) -> Optional - client.zero_trust.access.bookmarks.update(uuid, \*, identifier, \*\*params) -> Optional - client.zero_trust.access.bookmarks.list(identifier) -> SyncSinglePage[Bookmark] -- client.zero_trust.access.bookmarks.delete(uuid, \*, identifier, \*\*params) -> Optional +- client.zero_trust.access.bookmarks.delete(uuid, \*, identifier) -> Optional - client.zero_trust.access.bookmarks.get(uuid, \*, identifier) -> Optional ### Keys @@ -5487,7 +5515,7 @@ Methods: - client.zero_trust.tunnels.create(\*, account_id, \*\*params) -> TunnelCreateResponse - client.zero_trust.tunnels.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[TunnelListResponse] -- client.zero_trust.tunnels.delete(tunnel_id, \*, account_id, \*\*params) -> TunnelDeleteResponse +- client.zero_trust.tunnels.delete(tunnel_id, \*, account_id) -> TunnelDeleteResponse - client.zero_trust.tunnels.edit(tunnel_id, \*, account_id, \*\*params) -> TunnelEditResponse - client.zero_trust.tunnels.get(tunnel_id, \*, account_id) -> TunnelGetResponse @@ -5521,7 +5549,7 @@ from cloudflare.types.zero_trust.tunnels import ( Methods: -- client.zero_trust.tunnels.connections.delete(tunnel_id, \*, account_id, \*\*params) -> ConnectionDeleteResponse +- client.zero_trust.tunnels.connections.delete(tunnel_id, \*, account_id) -> ConnectionDeleteResponse - client.zero_trust.tunnels.connections.get(tunnel_id, \*, account_id) -> Optional ### Token @@ -5655,7 +5683,7 @@ Methods: - client.zero_trust.dlp.profiles.custom.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.dlp.profiles.custom.update(profile_id, \*, account_id, \*\*params) -> CustomProfile -- client.zero_trust.dlp.profiles.custom.delete(profile_id, \*, account_id, \*\*params) -> CustomDeleteResponse +- client.zero_trust.dlp.profiles.custom.delete(profile_id, \*, account_id) -> CustomDeleteResponse - client.zero_trust.dlp.profiles.custom.get(profile_id, \*, account_id) -> CustomProfile #### Predefined @@ -5769,7 +5797,7 @@ Methods: - client.zero_trust.gateway.lists.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.lists.update(list_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.lists.list(\*, account_id) -> SyncSinglePage[GatewayList] -- client.zero_trust.gateway.lists.delete(list_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.gateway.lists.delete(list_id, \*, account_id) -> Optional - client.zero_trust.gateway.lists.edit(list_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.lists.get(list_id, \*, account_id) -> Optional @@ -5798,7 +5826,7 @@ Methods: - client.zero_trust.gateway.locations.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.locations.update(location_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.locations.list(\*, account_id) -> SyncSinglePage[Location] -- client.zero_trust.gateway.locations.delete(location_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.gateway.locations.delete(location_id, \*, account_id) -> Optional - client.zero_trust.gateway.locations.get(location_id, \*, account_id) -> Optional ### Logging @@ -5830,7 +5858,7 @@ Methods: - client.zero_trust.gateway.proxy_endpoints.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.proxy_endpoints.list(\*, account_id) -> SyncSinglePage[ProxyEndpoint] -- client.zero_trust.gateway.proxy_endpoints.delete(proxy_endpoint_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.gateway.proxy_endpoints.delete(proxy_endpoint_id, \*, account_id) -> Optional - client.zero_trust.gateway.proxy_endpoints.edit(proxy_endpoint_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.proxy_endpoints.get(proxy_endpoint_id, \*, account_id) -> Optional @@ -5855,7 +5883,7 @@ Methods: - client.zero_trust.gateway.rules.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.rules.update(rule_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.rules.list(\*, account_id) -> SyncSinglePage[GatewayRule] -- client.zero_trust.gateway.rules.delete(rule_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.gateway.rules.delete(rule_id, \*, account_id) -> Optional - client.zero_trust.gateway.rules.get(rule_id, \*, account_id) -> Optional ## Networks @@ -5906,7 +5934,7 @@ Methods: - client.zero_trust.networks.virtual_networks.create(\*, account_id, \*\*params) -> VirtualNetworkCreateResponse - client.zero_trust.networks.virtual_networks.list(\*, account_id, \*\*params) -> SyncSinglePage[VirtualNetwork] -- client.zero_trust.networks.virtual_networks.delete(virtual_network_id, \*, account_id, \*\*params) -> VirtualNetworkDeleteResponse +- client.zero_trust.networks.virtual_networks.delete(virtual_network_id, \*, account_id) -> VirtualNetworkDeleteResponse - client.zero_trust.networks.virtual_networks.edit(virtual_network_id, \*, account_id, \*\*params) -> VirtualNetworkEditResponse ## RiskScoring @@ -7006,6 +7034,7 @@ from cloudflare.types.radar.http import ( SummaryHTTPVersionResponse, SummaryIPVersionResponse, SummaryOSResponse, + SummaryPostQuantumResponse, SummaryTLSVersionResponse, ) ``` @@ -7018,6 +7047,7 @@ Methods: - client.radar.http.summary.http_version(\*\*params) -> SummaryHTTPVersionResponse - client.radar.http.summary.ip_version(\*\*params) -> SummaryIPVersionResponse - client.radar.http.summary.os(\*\*params) -> SummaryOSResponse +- client.radar.http.summary.post_quantum(\*\*params) -> SummaryPostQuantumResponse - client.radar.http.summary.tls_version(\*\*params) -> SummaryTLSVersionResponse ### TimeseriesGroups @@ -7034,6 +7064,7 @@ from cloudflare.types.radar.http import ( TimeseriesGroupHTTPVersionResponse, TimeseriesGroupIPVersionResponse, TimeseriesGroupOSResponse, + TimeseriesGroupPostQuantumResponse, TimeseriesGroupTLSVersionResponse, ) ``` @@ -7048,6 +7079,7 @@ Methods: - client.radar.http.timeseries_groups.http_version(\*\*params) -> TimeseriesGroupHTTPVersionResponse - client.radar.http.timeseries_groups.ip_version(\*\*params) -> TimeseriesGroupIPVersionResponse - client.radar.http.timeseries_groups.os(\*\*params) -> TimeseriesGroupOSResponse +- client.radar.http.timeseries_groups.post_quantum(\*\*params) -> TimeseriesGroupPostQuantumResponse - client.radar.http.timeseries_groups.tls_version(\*\*params) -> TimeseriesGroupTLSVersionResponse ## Quality @@ -7157,8 +7189,8 @@ from cloudflare.types.bot_management import ( Methods: -- client.bot_management.update(\*, zone_id, \*\*params) -> BotManagementUpdateResponse -- client.bot_management.get(\*, zone_id) -> BotManagementGetResponse +- client.bot_management.update(\*, zone_id, \*\*params) -> Optional +- client.bot_management.get(\*, zone_id) -> Optional # OriginPostQuantumEncryption @@ -7181,65 +7213,62 @@ Methods: Types: ```python -from cloudflare.types.speed import LabeledRegion, LighthouseReport, Trend, SpeedDeleteResponse +from cloudflare.types.speed import LabeledRegion, LighthouseReport, Trend ``` -Methods: - -- client.speed.delete(url, \*, zone_id, \*\*params) -> Optional -- client.speed.schedule_get(url, \*, zone_id, \*\*params) -> Optional -- client.speed.trends_list(url, \*, zone_id, \*\*params) -> Optional - -## Tests +## Schedule Types: ```python -from cloudflare.types.speed import Test, TestListResponse, TestDeleteResponse +from cloudflare.types.speed import Schedule, ScheduleCreateResponse, ScheduleDeleteResponse ``` Methods: -- client.speed.tests.create(url, \*, zone_id, \*\*params) -> Optional -- client.speed.tests.list(url, \*, zone_id, \*\*params) -> TestListResponse -- client.speed.tests.delete(url, \*, zone_id, \*\*params) -> Optional -- client.speed.tests.get(test_id, \*, zone_id, url) -> Optional +- client.speed.schedule.create(url, \*, zone_id, \*\*params) -> Optional +- client.speed.schedule.delete(url, \*, zone_id, \*\*params) -> Optional +- client.speed.schedule.get(url, \*, zone_id, \*\*params) -> Optional -## Schedule +## Availabilities Types: ```python -from cloudflare.types.speed import Schedule, ScheduleCreateResponse +from cloudflare.types.speed import Availability ``` Methods: -- client.speed.schedule.create(url, \*, zone_id, \*\*params) -> Optional +- client.speed.availabilities.list(\*, zone_id) -> Optional -## Availabilities +## Pages Types: ```python -from cloudflare.types.speed import Availability +from cloudflare.types.speed import PageListResponse ``` Methods: -- client.speed.availabilities.list(\*, zone_id) -> Optional +- client.speed.pages.list(\*, zone_id) -> SyncSinglePage[PageListResponse] +- client.speed.pages.trend(url, \*, zone_id, \*\*params) -> Optional -## Pages +### Tests Types: ```python -from cloudflare.types.speed import PageListResponse +from cloudflare.types.speed.pages import Test, TestListResponse, TestDeleteResponse ``` Methods: -- client.speed.pages.list(\*, zone_id) -> SyncSinglePage[PageListResponse] +- client.speed.pages.tests.create(url, \*, zone_id, \*\*params) -> Optional +- client.speed.pages.tests.list(url, \*, zone_id, \*\*params) -> TestListResponse +- client.speed.pages.tests.delete(url, \*, zone_id, \*\*params) -> Optional +- client.speed.pages.tests.get(test_id, \*, zone_id, url) -> Optional # DCVDelegation @@ -7253,7 +7282,7 @@ from cloudflare.types.dcv_delegation import DCVDelegationUUID Methods: -- client.dcv_delegation.uuid.get(\*, zone_id) -> DCVDelegationUUID +- client.dcv_delegation.uuid.get(\*, zone_id) -> Optional # Hostnames @@ -7274,8 +7303,8 @@ from cloudflare.types.hostnames.settings import ( Methods: -- client.hostnames.settings.tls.update(hostname, \*, zone_id, setting_id, \*\*params) -> Setting -- client.hostnames.settings.tls.delete(hostname, \*, zone_id, setting_id) -> TLSDeleteResponse +- client.hostnames.settings.tls.update(hostname, \*, zone_id, setting_id, \*\*params) -> Optional +- client.hostnames.settings.tls.delete(hostname, \*, zone_id, setting_id) -> Optional - client.hostnames.settings.tls.get(setting_id, \*, zone_id) -> Optional # Snippets @@ -7288,16 +7317,16 @@ from cloudflare.types.snippets import Snippet, SnippetDeleteResponse Methods: -- client.snippets.update(snippet_name, \*, zone_identifier, \*\*params) -> Snippet -- client.snippets.list(zone_identifier) -> SyncSinglePage[Snippet] -- client.snippets.delete(snippet_name, \*, zone_identifier) -> SnippetDeleteResponse -- client.snippets.get(snippet_name, \*, zone_identifier) -> Snippet +- client.snippets.update(snippet_name, \*, zone_id, \*\*params) -> Optional +- client.snippets.list(\*, zone_id) -> SyncSinglePage[Snippet] +- client.snippets.delete(snippet_name, \*, zone_id) -> SnippetDeleteResponse +- client.snippets.get(snippet_name, \*, zone_id) -> Optional ## Content Methods: -- client.snippets.content.get(snippet_name, \*, zone_identifier) -> BinaryAPIResponse +- client.snippets.content.get(snippet_name, \*, zone_id) -> BinaryAPIResponse ## Rules @@ -7309,8 +7338,8 @@ from cloudflare.types.snippets import RuleUpdateResponse, RuleListResponse Methods: -- client.snippets.rules.update(zone_identifier, \*\*params) -> RuleUpdateResponse -- client.snippets.rules.list(zone_identifier) -> SyncSinglePage[RuleListResponse] +- client.snippets.rules.update(\*, zone_id, \*\*params) -> Optional +- client.snippets.rules.list(\*, zone_id) -> SyncSinglePage[RuleListResponse] # Calls @@ -7347,14 +7376,14 @@ from cloudflare.types.cloudforce_one import ( Methods: -- client.cloudforce_one.requests.create(account_identifier, \*\*params) -> Item -- client.cloudforce_one.requests.update(request_identifier, \*, account_identifier, \*\*params) -> Item +- client.cloudforce_one.requests.create(account_identifier, \*\*params) -> Optional +- client.cloudforce_one.requests.update(request_identifier, \*, account_identifier, \*\*params) -> Optional - client.cloudforce_one.requests.list(account_identifier, \*\*params) -> SyncV4PagePaginationArray[ListItem] - client.cloudforce_one.requests.delete(request_identifier, \*, account_identifier) -> RequestDeleteResponse -- client.cloudforce_one.requests.constants(account_identifier) -> RequestConstants -- client.cloudforce_one.requests.get(request_identifier, \*, account_identifier) -> Item -- client.cloudforce_one.requests.quota(account_identifier) -> Quota -- client.cloudforce_one.requests.types(account_identifier) -> RequestTypes +- client.cloudforce_one.requests.constants(account_identifier) -> Optional +- client.cloudforce_one.requests.get(request_identifier, \*, account_identifier) -> Optional +- client.cloudforce_one.requests.quota(account_identifier) -> Optional +- client.cloudforce_one.requests.types(account_identifier) -> Optional ### Message @@ -7370,10 +7399,10 @@ from cloudflare.types.cloudforce_one.requests import ( Methods: -- client.cloudforce_one.requests.message.create(request_identifier, \*, account_identifier, \*\*params) -> Message -- client.cloudforce_one.requests.message.update(message_identifer, \*, account_identifier, request_identifier, \*\*params) -> Message +- client.cloudforce_one.requests.message.create(request_identifier, \*, account_identifier, \*\*params) -> Optional +- client.cloudforce_one.requests.message.update(message_identifer, \*, account_identifier, request_identifier, \*\*params) -> Optional - client.cloudforce_one.requests.message.delete(message_identifer, \*, account_identifier, request_identifier) -> MessageDeleteResponse -- client.cloudforce_one.requests.message.get(request_identifier, \*, account_identifier, \*\*params) -> MessageGetResponse +- client.cloudforce_one.requests.message.get(request_identifier, \*, account_identifier, \*\*params) -> Optional ### Priority @@ -7390,11 +7419,11 @@ from cloudflare.types.cloudforce_one.requests import ( Methods: -- client.cloudforce_one.requests.priority.create(account_identifier, \*\*params) -> Priority -- client.cloudforce_one.requests.priority.update(priority_identifer, \*, account_identifier, \*\*params) -> Item +- client.cloudforce_one.requests.priority.create(account_identifier, \*\*params) -> Optional +- client.cloudforce_one.requests.priority.update(priority_identifer, \*, account_identifier, \*\*params) -> Optional - client.cloudforce_one.requests.priority.delete(priority_identifer, \*, account_identifier) -> PriorityDeleteResponse -- client.cloudforce_one.requests.priority.get(priority_identifer, \*, account_identifier) -> Item -- client.cloudforce_one.requests.priority.quota(account_identifier) -> Quota +- client.cloudforce_one.requests.priority.get(priority_identifer, \*, account_identifier) -> Optional +- client.cloudforce_one.requests.priority.quota(account_identifier) -> Optional # EventNotifications @@ -7427,3 +7456,37 @@ Methods: - client.event_notifications.r2.configuration.queues.update(queue_id, \*, account_id, bucket_name, \*\*params) -> QueueUpdateResponse - client.event_notifications.r2.configuration.queues.delete(queue_id, \*, account_id, bucket_name) -> QueueDeleteResponse + +# AIGateway + +Types: + +```python +from cloudflare.types.ai_gateway import ( + AIGatewayCreateResponse, + AIGatewayUpdateResponse, + AIGatewayListResponse, + AIGatewayDeleteResponse, + AIGatewayGetResponse, +) +``` + +Methods: + +- client.ai_gateway.create(\*, account_id, \*\*params) -> AIGatewayCreateResponse +- client.ai_gateway.update(id, \*, account_id, \*\*params) -> AIGatewayUpdateResponse +- client.ai_gateway.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[AIGatewayListResponse] +- client.ai_gateway.delete(id, \*, account_id) -> AIGatewayDeleteResponse +- client.ai_gateway.get(id, \*, account_id) -> AIGatewayGetResponse + +## Logs + +Types: + +```python +from cloudflare.types.ai_gateway import LogGetResponse +``` + +Methods: + +- client.ai_gateway.logs.get(id, \*, account_id, \*\*params) -> LogGetResponse diff --git a/bin/check-env-state.py b/bin/check-env-state.py deleted file mode 100644 index e1b8b6cb39b..00000000000 --- a/bin/check-env-state.py +++ /dev/null @@ -1,40 +0,0 @@ -"""Script that exits 1 if the current environment is not -in sync with the `requirements-dev.lock` file. -""" - -from pathlib import Path - -import importlib_metadata - - -def should_run_sync() -> bool: - dev_lock = Path(__file__).parent.parent.joinpath("requirements-dev.lock") - - for line in dev_lock.read_text().splitlines(): - if not line or line.startswith("#") or line.startswith("-e"): - continue - - dep, lock_version = line.split("==") - - try: - version = importlib_metadata.version(dep) - - if lock_version != version: - print(f"mismatch for {dep} current={version} lock={lock_version}") - return True - except Exception: - print(f"could not import {dep}") - return True - - return False - - -def main() -> None: - if should_run_sync(): - exit(1) - else: - exit(0) - - -if __name__ == "__main__": - main() diff --git a/bin/check-test-server b/bin/check-test-server deleted file mode 100755 index a6fa34950d1..00000000000 --- a/bin/check-test-server +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[0;33m' -NC='\033[0m' # No Color - -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 -} - -function is_overriding_api_base_url() { - [ -n "$TEST_API_BASE_URL" ] -} - -if is_overriding_api_base_url ; then - # If someone is running the tests against the live API, we can trust they know - # what they're doing and exit early. - echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" - - exit 0 -elif prism_is_running ; then - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" - echo - - exit 0 -else - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" - echo -e "running against your OpenAPI spec." - echo - echo -e "${YELLOW}To fix:${NC}" - echo - echo -e "1. Install Prism (requires Node 16+):" - echo - echo -e " With npm:" - echo -e " \$ ${YELLOW}npm install -g @stoplight/prism-cli${NC}" - echo - echo -e " With yarn:" - echo -e " \$ ${YELLOW}yarn global add @stoplight/prism-cli${NC}" - echo - echo -e "2. Run the mock server" - echo - echo -e " To run the server, pass in the path of your OpenAPI" - echo -e " spec to the prism command:" - echo - echo -e " \$ ${YELLOW}prism mock path/to/your.openapi.yml${NC}" - echo - - exit 1 -fi diff --git a/bin/test b/bin/test deleted file mode 100755 index 60ede7a8428..00000000000 --- a/bin/test +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -bin/check-test-server && rye run pytest "$@" diff --git a/pyproject.toml b/pyproject.toml index fda2de82ca4..3a86f27f65f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cloudflare" -version = "3.0.0-beta.8" +version = "3.0.0-beta.9" description = "The official Python library for the cloudflare API" dynamic = ["readme"] license = "Apache-2.0" @@ -68,7 +68,7 @@ format = { chain = [ "fix:ruff", ]} "format:black" = "black ." -"format:docs" = "python bin/ruffen-docs.py README.md api.md" +"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md" "format:ruff" = "ruff format" "format:isort" = "isort ." @@ -192,5 +192,6 @@ known-first-party = ["cloudflare", "tests"] [tool.ruff.per-file-ignores] "bin/**.py" = ["T201", "T203"] +"scripts/**.py" = ["T201", "T203"] "tests/**.py" = ["T201", "T203"] "examples/**.py" = ["T201", "T203"] diff --git a/scripts/bootstrap b/scripts/bootstrap new file mode 100755 index 00000000000..29df07e77be --- /dev/null +++ b/scripts/bootstrap @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then + brew bundle check >/dev/null 2>&1 || { + echo "==> Installing Homebrew dependencies…" + brew bundle + } +fi + +echo "==> Installing Python dependencies…" + +# experimental uv support makes installations significantly faster +rye config --set-bool behavior.use-uv=true + +rye sync diff --git a/scripts/format b/scripts/format new file mode 100755 index 00000000000..2a9ea4664bf --- /dev/null +++ b/scripts/format @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +rye run format + diff --git a/scripts/lint b/scripts/lint new file mode 100755 index 00000000000..0cc68b51578 --- /dev/null +++ b/scripts/lint @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +rye run lint + diff --git a/scripts/mock b/scripts/mock new file mode 100755 index 00000000000..fe89a1d084f --- /dev/null +++ b/scripts/mock @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +if [[ -n "$1" && "$1" != '--'* ]]; then + URL="$1" + shift +else + URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)" +fi + +# Check if the URL is empty +if [ -z "$URL" ]; then + echo "Error: No OpenAPI spec path/url provided or found in .stats.yml" + exit 1 +fi + +echo "==> Starting mock server with URL ${URL}" + +# Run prism mock on the given spec +if [ "$1" == "--daemon" ]; then + npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log & + + # Wait for server to come online + echo -n "Waiting for server" + while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + echo -n "." + sleep 0.1 + done + + if grep -q "✖ fatal" ".prism.log"; then + cat .prism.log + exit 1 + fi + + echo +else + npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" +fi diff --git a/scripts/test b/scripts/test new file mode 100755 index 00000000000..be01d044734 --- /dev/null +++ b/scripts/test @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +NC='\033[0m' # No Color + +function prism_is_running() { + curl --silent "http://localhost:4010" >/dev/null 2>&1 +} + +kill_server_on_port() { + pids=$(lsof -t -i tcp:"$1" || echo "") + if [ "$pids" != "" ]; then + kill "$pids" + echo "Stopped $pids." + fi +} + +function is_overriding_api_base_url() { + [ -n "$TEST_API_BASE_URL" ] +} + +if ! is_overriding_api_base_url && ! prism_is_running ; then + # When we exit this script, make sure to kill the background mock server process + trap 'kill_server_on_port 4010' EXIT + + # Start the dev server + ./scripts/mock --daemon +fi + +if is_overriding_api_base_url ; then + echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" + echo +elif ! prism_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" + echo -e "running against your OpenAPI spec." + echo + echo -e "To run the server, pass in the path or url of your OpenAPI" + echo -e "spec to the prism command:" + echo + echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo + + exit 1 +else + echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo +fi + +# Run tests +echo "==> Running tests" +rye run pytest "$@" diff --git a/bin/ruffen-docs.py b/scripts/utils/ruffen-docs.py similarity index 100% rename from bin/ruffen-docs.py rename to scripts/utils/ruffen-docs.py diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index 142430df21a..edd993ce049 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -945,6 +945,8 @@ def _request( if self.custom_auth is not None: kwargs["auth"] = self.custom_auth + log.debug("Sending HTTP Request: %s %s", request.method, request.url) + try: response = self._client.send( request, @@ -983,7 +985,12 @@ def _request( raise APIConnectionError(request=request) from err log.debug( - 'HTTP Request: %s %s "%i %s"', request.method, request.url, response.status_code, response.reason_phrase + 'HTTP Response: %s %s "%i %s" %s', + request.method, + request.url, + response.status_code, + response.reason_phrase, + response.headers, ) try: diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index 41a4fcfac22..529638ece6d 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -128,6 +128,7 @@ class Cloudflare(SyncAPIClient): calls: resources.CallsResource cloudforce_one: resources.CloudforceOneResource event_notifications: resources.EventNotificationsResource + ai_gateway: resources.AIGatewayResource with_raw_response: CloudflareWithRawResponse with_streaming_response: CloudflareWithStreamedResponse @@ -284,6 +285,7 @@ def __init__( self.calls = resources.CallsResource(self) self.cloudforce_one = resources.CloudforceOneResource(self) self.event_notifications = resources.EventNotificationsResource(self) + self.ai_gateway = resources.AIGatewayResource(self) self.with_raw_response = CloudflareWithRawResponse(self) self.with_streaming_response = CloudflareWithStreamedResponse(self) @@ -543,6 +545,7 @@ class AsyncCloudflare(AsyncAPIClient): calls: resources.AsyncCallsResource cloudforce_one: resources.AsyncCloudforceOneResource event_notifications: resources.AsyncEventNotificationsResource + ai_gateway: resources.AsyncAIGatewayResource with_raw_response: AsyncCloudflareWithRawResponse with_streaming_response: AsyncCloudflareWithStreamedResponse @@ -699,6 +702,7 @@ def __init__( self.calls = resources.AsyncCallsResource(self) self.cloudforce_one = resources.AsyncCloudforceOneResource(self) self.event_notifications = resources.AsyncEventNotificationsResource(self) + self.ai_gateway = resources.AsyncAIGatewayResource(self) self.with_raw_response = AsyncCloudflareWithRawResponse(self) self.with_streaming_response = AsyncCloudflareWithStreamedResponse(self) @@ -969,6 +973,7 @@ def __init__(self, client: Cloudflare) -> None: self.calls = resources.CallsResourceWithRawResponse(client.calls) self.cloudforce_one = resources.CloudforceOneResourceWithRawResponse(client.cloudforce_one) self.event_notifications = resources.EventNotificationsResourceWithRawResponse(client.event_notifications) + self.ai_gateway = resources.AIGatewayResourceWithRawResponse(client.ai_gateway) class AsyncCloudflareWithRawResponse: @@ -1068,6 +1073,7 @@ def __init__(self, client: AsyncCloudflare) -> None: self.calls = resources.AsyncCallsResourceWithRawResponse(client.calls) self.cloudforce_one = resources.AsyncCloudforceOneResourceWithRawResponse(client.cloudforce_one) self.event_notifications = resources.AsyncEventNotificationsResourceWithRawResponse(client.event_notifications) + self.ai_gateway = resources.AsyncAIGatewayResourceWithRawResponse(client.ai_gateway) class CloudflareWithStreamedResponse: @@ -1167,6 +1173,7 @@ def __init__(self, client: Cloudflare) -> None: self.calls = resources.CallsResourceWithStreamingResponse(client.calls) self.cloudforce_one = resources.CloudforceOneResourceWithStreamingResponse(client.cloudforce_one) self.event_notifications = resources.EventNotificationsResourceWithStreamingResponse(client.event_notifications) + self.ai_gateway = resources.AIGatewayResourceWithStreamingResponse(client.ai_gateway) class AsyncCloudflareWithStreamedResponse: @@ -1274,6 +1281,7 @@ def __init__(self, client: AsyncCloudflare) -> None: self.event_notifications = resources.AsyncEventNotificationsResourceWithStreamingResponse( client.event_notifications ) + self.ai_gateway = resources.AsyncAIGatewayResourceWithStreamingResponse(client.ai_gateway) Client = Cloudflare diff --git a/src/cloudflare/_version.py b/src/cloudflare/_version.py index 897784b082e..0e7c52ee3d0 100644 --- a/src/cloudflare/_version.py +++ b/src/cloudflare/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "cloudflare" -__version__ = "3.0.0-beta.8" # x-release-please-version +__version__ = "3.0.0-beta.9" # x-release-please-version diff --git a/src/cloudflare/resources/__init__.py b/src/cloudflare/resources/__init__.py index e4d0f926f5d..4d7acbc7a4c 100644 --- a/src/cloudflare/resources/__init__.py +++ b/src/cloudflare/resources/__init__.py @@ -336,6 +336,14 @@ AddressingResourceWithStreamingResponse, AsyncAddressingResourceWithStreamingResponse, ) +from .ai_gateway import ( + AIGatewayResource, + AsyncAIGatewayResource, + AIGatewayResourceWithRawResponse, + AsyncAIGatewayResourceWithRawResponse, + AIGatewayResourceWithStreamingResponse, + AsyncAIGatewayResourceWithStreamingResponse, +) from .audit_logs import ( AuditLogsResource, AsyncAuditLogsResource, @@ -1136,4 +1144,10 @@ "AsyncEventNotificationsResourceWithRawResponse", "EventNotificationsResourceWithStreamingResponse", "AsyncEventNotificationsResourceWithStreamingResponse", + "AIGatewayResource", + "AsyncAIGatewayResource", + "AIGatewayResourceWithRawResponse", + "AsyncAIGatewayResourceWithRawResponse", + "AIGatewayResourceWithStreamingResponse", + "AsyncAIGatewayResourceWithStreamingResponse", ] diff --git a/src/cloudflare/resources/accounts/members.py b/src/cloudflare/resources/accounts/members.py index 487213e8949..602ab0f69d7 100644 --- a/src/cloudflare/resources/accounts/members.py +++ b/src/cloudflare/resources/accounts/members.py @@ -26,7 +26,7 @@ AsyncPaginator, make_request_options, ) -from ...types.accounts import member_list_params, member_create_params, member_delete_params, member_update_params +from ...types.accounts import member_list_params, member_create_params, member_update_params from ...types.shared.member import Member from ...types.accounts.member_list_response import MemberListResponse from ...types.accounts.user_with_invite_code import UserWithInviteCode @@ -47,7 +47,7 @@ def with_streaming_response(self) -> MembersResourceWithStreamingResponse: def create( self, *, - account_id: object, + account_id: str, email: str, roles: List[str], status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN, @@ -74,6 +74,8 @@ def create( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._post( f"/accounts/{account_id}/members", body=maybe_transform( @@ -98,7 +100,7 @@ def update( self, member_id: str, *, - account_id: object, + account_id: str, roles: Iterable[member_update_params.Role], # 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. @@ -123,6 +125,8 @@ def update( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return self._put( @@ -141,7 +145,7 @@ def update( def list( self, *, - account_id: object, + account_id: str, direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, order: Literal["user.first_name", "user.last_name", "user.email", "status"] | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, @@ -176,6 +180,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/members", page=SyncV4PagePaginationArray[MemberListResponse], @@ -202,8 +208,7 @@ def delete( self, member_id: str, *, - account_id: object, - body: object, + account_id: str, # 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. extra_headers: Headers | None = None, @@ -225,11 +230,12 @@ def delete( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return self._delete( f"/accounts/{account_id}/members/{member_id}", - body=maybe_transform(body, member_delete_params.MemberDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -244,7 +250,7 @@ def get( self, member_id: str, *, - account_id: object, + account_id: str, # 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. extra_headers: Headers | None = None, @@ -266,6 +272,8 @@ def get( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return self._get( @@ -293,7 +301,7 @@ def with_streaming_response(self) -> AsyncMembersResourceWithStreamingResponse: async def create( self, *, - account_id: object, + account_id: str, email: str, roles: List[str], status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN, @@ -320,6 +328,8 @@ async def create( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._post( f"/accounts/{account_id}/members", body=await async_maybe_transform( @@ -344,7 +354,7 @@ async def update( self, member_id: str, *, - account_id: object, + account_id: str, roles: Iterable[member_update_params.Role], # 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. @@ -369,6 +379,8 @@ async def update( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return await self._put( @@ -387,7 +399,7 @@ async def update( def list( self, *, - account_id: object, + account_id: str, direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, order: Literal["user.first_name", "user.last_name", "user.email", "status"] | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, @@ -422,6 +434,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/members", page=AsyncV4PagePaginationArray[MemberListResponse], @@ -448,8 +462,7 @@ async def delete( self, member_id: str, *, - account_id: object, - body: object, + account_id: str, # 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. extra_headers: Headers | None = None, @@ -471,11 +484,12 @@ async def delete( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return await self._delete( f"/accounts/{account_id}/members/{member_id}", - body=await async_maybe_transform(body, member_delete_params.MemberDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -490,7 +504,7 @@ async def get( self, member_id: str, *, - account_id: object, + account_id: str, # 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. extra_headers: Headers | None = None, @@ -512,6 +526,8 @@ async def get( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return await self._get( diff --git a/src/cloudflare/resources/accounts/roles.py b/src/cloudflare/resources/accounts/roles.py index 35a5ac1b607..f316a2caa9a 100644 --- a/src/cloudflare/resources/accounts/roles.py +++ b/src/cloudflare/resources/accounts/roles.py @@ -39,7 +39,7 @@ def with_streaming_response(self) -> RolesResourceWithStreamingResponse: def list( self, *, - account_id: object, + account_id: str, # 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. extra_headers: Headers | None = None, @@ -59,6 +59,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/roles", page=SyncSinglePage[Role], @@ -72,7 +74,7 @@ def get( self, role_id: object, *, - account_id: object, + account_id: str, # 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. extra_headers: Headers | None = None, @@ -92,6 +94,8 @@ def get( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return cast( RoleGetResponse, self._get( @@ -122,7 +126,7 @@ def with_streaming_response(self) -> AsyncRolesResourceWithStreamingResponse: def list( self, *, - account_id: object, + account_id: str, # 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. extra_headers: Headers | None = None, @@ -142,6 +146,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/roles", page=AsyncSinglePage[Role], @@ -155,7 +161,7 @@ async def get( self, role_id: object, *, - account_id: object, + account_id: str, # 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. extra_headers: Headers | None = None, @@ -175,6 +181,8 @@ async def get( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return cast( RoleGetResponse, await self._get( diff --git a/src/cloudflare/resources/acm/total_tls.py b/src/cloudflare/resources/acm/total_tls.py index 4795b7d6275..1282d909aa4 100644 --- a/src/cloudflare/resources/acm/total_tls.py +++ b/src/cloudflare/resources/acm/total_tls.py @@ -2,8 +2,7 @@ from __future__ import annotations -from typing import Type, cast -from typing_extensions import Literal +from typing import Type, Optional, cast import httpx @@ -21,10 +20,11 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.acm import total_tls_create_params +from ...types.acm import CertificateAuthority, total_tls_create_params from ..._base_client import ( make_request_options, ) +from ...types.acm.certificate_authority import CertificateAuthority from ...types.acm.total_tls_get_response import TotalTLSGetResponse from ...types.acm.total_tls_create_response import TotalTLSCreateResponse @@ -45,14 +45,14 @@ def create( *, zone_id: str, enabled: bool, - certificate_authority: Literal["google", "lets_encrypt"] | NotGiven = NOT_GIVEN, + certificate_authority: CertificateAuthority | 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TotalTLSCreateResponse: + ) -> Optional[TotalTLSCreateResponse]: """ Set Total TLS Settings or disable the feature for a Zone. @@ -88,9 +88,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[TotalTLSCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[TotalTLSCreateResponse]]._unwrapper, ), - cast_to=cast(Type[TotalTLSCreateResponse], ResultWrapper[TotalTLSCreateResponse]), + cast_to=cast(Type[Optional[TotalTLSCreateResponse]], ResultWrapper[TotalTLSCreateResponse]), ) def get( @@ -103,7 +103,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TotalTLSGetResponse: + ) -> Optional[TotalTLSGetResponse]: """ Get Total TLS Settings for a Zone. @@ -127,9 +127,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[TotalTLSGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[TotalTLSGetResponse]]._unwrapper, ), - cast_to=cast(Type[TotalTLSGetResponse], ResultWrapper[TotalTLSGetResponse]), + cast_to=cast(Type[Optional[TotalTLSGetResponse]], ResultWrapper[TotalTLSGetResponse]), ) @@ -147,14 +147,14 @@ async def create( *, zone_id: str, enabled: bool, - certificate_authority: Literal["google", "lets_encrypt"] | NotGiven = NOT_GIVEN, + certificate_authority: CertificateAuthority | 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TotalTLSCreateResponse: + ) -> Optional[TotalTLSCreateResponse]: """ Set Total TLS Settings or disable the feature for a Zone. @@ -190,9 +190,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[TotalTLSCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[TotalTLSCreateResponse]]._unwrapper, ), - cast_to=cast(Type[TotalTLSCreateResponse], ResultWrapper[TotalTLSCreateResponse]), + cast_to=cast(Type[Optional[TotalTLSCreateResponse]], ResultWrapper[TotalTLSCreateResponse]), ) async def get( @@ -205,7 +205,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TotalTLSGetResponse: + ) -> Optional[TotalTLSGetResponse]: """ Get Total TLS Settings for a Zone. @@ -229,9 +229,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[TotalTLSGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[TotalTLSGetResponse]]._unwrapper, ), - cast_to=cast(Type[TotalTLSGetResponse], ResultWrapper[TotalTLSGetResponse]), + cast_to=cast(Type[Optional[TotalTLSGetResponse]], ResultWrapper[TotalTLSGetResponse]), ) diff --git a/src/cloudflare/resources/addressing/address_maps/accounts.py b/src/cloudflare/resources/addressing/address_maps/accounts.py index 17d49b29ca7..d48154dcb04 100644 --- a/src/cloudflare/resources/addressing/address_maps/accounts.py +++ b/src/cloudflare/resources/addressing/address_maps/accounts.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.addressing.address_maps import account_delete_params, account_update_params +from ....types.addressing.address_maps import account_update_params from ....types.addressing.address_maps.account_delete_response import AccountDeleteResponse from ....types.addressing.address_maps.account_update_response import AccountUpdateResponse @@ -90,7 +90,6 @@ def delete( address_map_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -120,7 +119,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}") return self._delete( f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}", - body=maybe_transform(body, account_delete_params.AccountDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -192,7 +190,6 @@ async def delete( address_map_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -222,7 +219,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}") return await self._delete( f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}", - body=await async_maybe_transform(body, account_delete_params.AccountDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/addressing/address_maps/address_maps.py b/src/cloudflare/resources/addressing/address_maps/address_maps.py index 548ce6e7002..bb2faee96ef 100644 --- a/src/cloudflare/resources/addressing/address_maps/address_maps.py +++ b/src/cloudflare/resources/addressing/address_maps/address_maps.py @@ -49,7 +49,7 @@ AsyncPaginator, make_request_options, ) -from ....types.addressing import address_map_edit_params, address_map_create_params, address_map_delete_params +from ....types.addressing import address_map_edit_params, address_map_create_params from ....types.addressing.address_map import AddressMap from ....types.addressing.address_map_get_response import AddressMapGetResponse from ....types.addressing.address_map_create_response import AddressMapCreateResponse @@ -174,7 +174,6 @@ def delete( address_map_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -206,7 +205,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}") return self._delete( f"/accounts/{account_id}/addressing/address_maps/{address_map_id}", - body=maybe_transform(body, address_map_delete_params.AddressMapDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -445,7 +443,6 @@ async def delete( address_map_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -477,7 +474,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}") return await self._delete( f"/accounts/{account_id}/addressing/address_maps/{address_map_id}", - body=await async_maybe_transform(body, address_map_delete_params.AddressMapDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/addressing/address_maps/ips.py b/src/cloudflare/resources/addressing/address_maps/ips.py index a6bb3f55c6c..afabfb17ecf 100644 --- a/src/cloudflare/resources/addressing/address_maps/ips.py +++ b/src/cloudflare/resources/addressing/address_maps/ips.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.addressing.address_maps import ip_delete_params, ip_update_params +from ....types.addressing.address_maps import ip_update_params from ....types.addressing.address_maps.ip_delete_response import IPDeleteResponse from ....types.addressing.address_maps.ip_update_response import IPUpdateResponse @@ -96,7 +96,6 @@ def delete( *, account_id: str, address_map_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -130,7 +129,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}") return self._delete( f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}", - body=maybe_transform(body, ip_delete_params.IPDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -208,7 +206,6 @@ async def delete( *, account_id: str, address_map_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -242,7 +239,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}") return await self._delete( f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}", - body=await async_maybe_transform(body, ip_delete_params.IPDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/addressing/address_maps/zones.py b/src/cloudflare/resources/addressing/address_maps/zones.py index c3f12537e44..adb801b9671 100644 --- a/src/cloudflare/resources/addressing/address_maps/zones.py +++ b/src/cloudflare/resources/addressing/address_maps/zones.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.addressing.address_maps import zone_delete_params, zone_update_params +from ....types.addressing.address_maps import zone_update_params from ....types.addressing.address_maps.zone_delete_response import ZoneDeleteResponse from ....types.addressing.address_maps.zone_update_response import ZoneUpdateResponse @@ -96,7 +96,6 @@ def delete( *, zone_id: str, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -130,7 +129,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}") return self._delete( f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}", - body=maybe_transform(body, zone_delete_params.ZoneDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -208,7 +206,6 @@ async def delete( *, zone_id: str, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -242,7 +239,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}") return await self._delete( f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}", - body=await async_maybe_transform(body, zone_delete_params.ZoneDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/addressing/prefixes/delegations.py b/src/cloudflare/resources/addressing/prefixes/delegations.py index f82a45a6b17..193d76d1c01 100644 --- a/src/cloudflare/resources/addressing/prefixes/delegations.py +++ b/src/cloudflare/resources/addressing/prefixes/delegations.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.addressing.prefixes import delegation_create_params, delegation_delete_params +from ....types.addressing.prefixes import delegation_create_params from ....types.addressing.prefixes.delegations import Delegations from ....types.addressing.prefixes.delegation_delete_response import DelegationDeleteResponse @@ -145,7 +145,6 @@ def delete( *, account_id: str, prefix_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -179,7 +178,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `delegation_id` but received {delegation_id!r}") return self._delete( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations/{delegation_id}", - body=maybe_transform(body, delegation_delete_params.DelegationDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -304,7 +302,6 @@ async def delete( *, account_id: str, prefix_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -338,7 +335,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `delegation_id` but received {delegation_id!r}") return await self._delete( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations/{delegation_id}", - body=await async_maybe_transform(body, delegation_delete_params.DelegationDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/addressing/prefixes/prefixes.py b/src/cloudflare/resources/addressing/prefixes/prefixes.py index e73b6e4edeb..f7eb058f695 100644 --- a/src/cloudflare/resources/addressing/prefixes/prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/prefixes.py @@ -42,7 +42,7 @@ AsyncPaginator, make_request_options, ) -from ....types.addressing import prefix_edit_params, prefix_create_params, prefix_delete_params +from ....types.addressing import prefix_edit_params, prefix_create_params from ....types.addressing.prefix import Prefix from ....types.addressing.prefix_delete_response import PrefixDeleteResponse @@ -163,7 +163,6 @@ def delete( prefix_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -193,7 +192,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `prefix_id` but received {prefix_id!r}") return self._delete( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}", - body=maybe_transform(body, prefix_delete_params.PrefixDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -411,7 +409,6 @@ async def delete( prefix_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -441,7 +438,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `prefix_id` but received {prefix_id!r}") return await self._delete( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}", - body=await async_maybe_transform(body, prefix_delete_params.PrefixDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/ai_gateway/__init__.py b/src/cloudflare/resources/ai_gateway/__init__.py new file mode 100644 index 00000000000..95883733129 --- /dev/null +++ b/src/cloudflare/resources/ai_gateway/__init__.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .logs import ( + LogsResource, + AsyncLogsResource, + LogsResourceWithRawResponse, + AsyncLogsResourceWithRawResponse, + LogsResourceWithStreamingResponse, + AsyncLogsResourceWithStreamingResponse, +) +from .ai_gateway import ( + AIGatewayResource, + AsyncAIGatewayResource, + AIGatewayResourceWithRawResponse, + AsyncAIGatewayResourceWithRawResponse, + AIGatewayResourceWithStreamingResponse, + AsyncAIGatewayResourceWithStreamingResponse, +) + +__all__ = [ + "LogsResource", + "AsyncLogsResource", + "LogsResourceWithRawResponse", + "AsyncLogsResourceWithRawResponse", + "LogsResourceWithStreamingResponse", + "AsyncLogsResourceWithStreamingResponse", + "AIGatewayResource", + "AsyncAIGatewayResource", + "AIGatewayResourceWithRawResponse", + "AsyncAIGatewayResourceWithRawResponse", + "AIGatewayResourceWithStreamingResponse", + "AsyncAIGatewayResourceWithStreamingResponse", +] diff --git a/src/cloudflare/resources/ai_gateway/ai_gateway.py b/src/cloudflare/resources/ai_gateway/ai_gateway.py new file mode 100644 index 00000000000..44734436ea9 --- /dev/null +++ b/src/cloudflare/resources/ai_gateway/ai_gateway.py @@ -0,0 +1,673 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, cast + +import httpx + +from .logs import ( + LogsResource, + AsyncLogsResource, + LogsResourceWithRawResponse, + AsyncLogsResourceWithRawResponse, + LogsResourceWithStreamingResponse, + AsyncLogsResourceWithStreamingResponse, +) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._wrappers import ResultWrapper +from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray +from ..._base_client import ( + AsyncPaginator, + make_request_options, +) +from ...types.ai_gateway import ai_gateway_list_params, ai_gateway_create_params, ai_gateway_update_params +from ...types.ai_gateway.ai_gateway_get_response import AIGatewayGetResponse +from ...types.ai_gateway.ai_gateway_list_response import AIGatewayListResponse +from ...types.ai_gateway.ai_gateway_create_response import AIGatewayCreateResponse +from ...types.ai_gateway.ai_gateway_delete_response import AIGatewayDeleteResponse +from ...types.ai_gateway.ai_gateway_update_response import AIGatewayUpdateResponse + +__all__ = ["AIGatewayResource", "AsyncAIGatewayResource"] + + +class AIGatewayResource(SyncAPIResource): + @cached_property + def logs(self) -> LogsResource: + return LogsResource(self._client) + + @cached_property + def with_raw_response(self) -> AIGatewayResourceWithRawResponse: + return AIGatewayResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AIGatewayResourceWithStreamingResponse: + return AIGatewayResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + cache_invalidate_on_update: bool, + cache_ttl: int, + collect_logs: bool, + name: str, + slug: str, + rate_limiting_interval: int | NotGiven = NOT_GIVEN, + rate_limiting_limit: int | NotGiven = NOT_GIVEN, + rate_limiting_technique: str | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AIGatewayCreateResponse: + """ + Create a new Gateway + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._post( + f"/accounts/{account_id}/ai-gateway/gateways", + body=maybe_transform( + { + "cache_invalidate_on_update": cache_invalidate_on_update, + "cache_ttl": cache_ttl, + "collect_logs": collect_logs, + "name": name, + "slug": slug, + "rate_limiting_interval": rate_limiting_interval, + "rate_limiting_limit": rate_limiting_limit, + "rate_limiting_technique": rate_limiting_technique, + }, + ai_gateway_create_params.AIGatewayCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[AIGatewayCreateResponse]._unwrapper, + ), + cast_to=cast(Type[AIGatewayCreateResponse], ResultWrapper[AIGatewayCreateResponse]), + ) + + def update( + self, + id: str, + *, + account_id: str, + cache_invalidate_on_update: bool, + cache_ttl: int, + collect_logs: bool, + name: str, + slug: str, + rate_limiting_interval: int | NotGiven = NOT_GIVEN, + rate_limiting_limit: int | NotGiven = NOT_GIVEN, + rate_limiting_technique: str | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AIGatewayUpdateResponse: + """ + Update a Gateway + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + return self._put( + f"/accounts/{account_id}/ai-gateway/gateways/{id}", + body=maybe_transform( + { + "cache_invalidate_on_update": cache_invalidate_on_update, + "cache_ttl": cache_ttl, + "collect_logs": collect_logs, + "name": name, + "slug": slug, + "rate_limiting_interval": rate_limiting_interval, + "rate_limiting_limit": rate_limiting_limit, + "rate_limiting_technique": rate_limiting_technique, + }, + ai_gateway_update_params.AIGatewayUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[AIGatewayUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[AIGatewayUpdateResponse], ResultWrapper[AIGatewayUpdateResponse]), + ) + + def list( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + order_by: str | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: int | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncV4PagePaginationArray[AIGatewayListResponse]: + """ + List Gateway's + + Args: + order_by: Order By Column Name + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._get_api_list( + f"/accounts/{account_id}/ai-gateway/gateways", + page=SyncV4PagePaginationArray[AIGatewayListResponse], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "id": id, + "order_by": order_by, + "page": page, + "per_page": per_page, + }, + ai_gateway_list_params.AIGatewayListParams, + ), + ), + model=AIGatewayListResponse, + ) + + def delete( + self, + id: str, + *, + account_id: str, + # 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AIGatewayDeleteResponse: + """ + Delete a Gateway + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + return self._delete( + f"/accounts/{account_id}/ai-gateway/gateways/{id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[AIGatewayDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[AIGatewayDeleteResponse], ResultWrapper[AIGatewayDeleteResponse]), + ) + + def get( + self, + id: str, + *, + account_id: str, + # 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AIGatewayGetResponse: + """ + Fetch a Gateway + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + return self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[AIGatewayGetResponse]._unwrapper, + ), + cast_to=cast(Type[AIGatewayGetResponse], ResultWrapper[AIGatewayGetResponse]), + ) + + +class AsyncAIGatewayResource(AsyncAPIResource): + @cached_property + def logs(self) -> AsyncLogsResource: + return AsyncLogsResource(self._client) + + @cached_property + def with_raw_response(self) -> AsyncAIGatewayResourceWithRawResponse: + return AsyncAIGatewayResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncAIGatewayResourceWithStreamingResponse: + return AsyncAIGatewayResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + cache_invalidate_on_update: bool, + cache_ttl: int, + collect_logs: bool, + name: str, + slug: str, + rate_limiting_interval: int | NotGiven = NOT_GIVEN, + rate_limiting_limit: int | NotGiven = NOT_GIVEN, + rate_limiting_technique: str | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AIGatewayCreateResponse: + """ + Create a new Gateway + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._post( + f"/accounts/{account_id}/ai-gateway/gateways", + body=await async_maybe_transform( + { + "cache_invalidate_on_update": cache_invalidate_on_update, + "cache_ttl": cache_ttl, + "collect_logs": collect_logs, + "name": name, + "slug": slug, + "rate_limiting_interval": rate_limiting_interval, + "rate_limiting_limit": rate_limiting_limit, + "rate_limiting_technique": rate_limiting_technique, + }, + ai_gateway_create_params.AIGatewayCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[AIGatewayCreateResponse]._unwrapper, + ), + cast_to=cast(Type[AIGatewayCreateResponse], ResultWrapper[AIGatewayCreateResponse]), + ) + + async def update( + self, + id: str, + *, + account_id: str, + cache_invalidate_on_update: bool, + cache_ttl: int, + collect_logs: bool, + name: str, + slug: str, + rate_limiting_interval: int | NotGiven = NOT_GIVEN, + rate_limiting_limit: int | NotGiven = NOT_GIVEN, + rate_limiting_technique: str | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AIGatewayUpdateResponse: + """ + Update a Gateway + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + return await self._put( + f"/accounts/{account_id}/ai-gateway/gateways/{id}", + body=await async_maybe_transform( + { + "cache_invalidate_on_update": cache_invalidate_on_update, + "cache_ttl": cache_ttl, + "collect_logs": collect_logs, + "name": name, + "slug": slug, + "rate_limiting_interval": rate_limiting_interval, + "rate_limiting_limit": rate_limiting_limit, + "rate_limiting_technique": rate_limiting_technique, + }, + ai_gateway_update_params.AIGatewayUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[AIGatewayUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[AIGatewayUpdateResponse], ResultWrapper[AIGatewayUpdateResponse]), + ) + + def list( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + order_by: str | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: int | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[AIGatewayListResponse, AsyncV4PagePaginationArray[AIGatewayListResponse]]: + """ + List Gateway's + + Args: + order_by: Order By Column Name + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._get_api_list( + f"/accounts/{account_id}/ai-gateway/gateways", + page=AsyncV4PagePaginationArray[AIGatewayListResponse], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "id": id, + "order_by": order_by, + "page": page, + "per_page": per_page, + }, + ai_gateway_list_params.AIGatewayListParams, + ), + ), + model=AIGatewayListResponse, + ) + + async def delete( + self, + id: str, + *, + account_id: str, + # 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AIGatewayDeleteResponse: + """ + Delete a Gateway + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + return await self._delete( + f"/accounts/{account_id}/ai-gateway/gateways/{id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[AIGatewayDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[AIGatewayDeleteResponse], ResultWrapper[AIGatewayDeleteResponse]), + ) + + async def get( + self, + id: str, + *, + account_id: str, + # 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AIGatewayGetResponse: + """ + Fetch a Gateway + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + return await self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[AIGatewayGetResponse]._unwrapper, + ), + cast_to=cast(Type[AIGatewayGetResponse], ResultWrapper[AIGatewayGetResponse]), + ) + + +class AIGatewayResourceWithRawResponse: + def __init__(self, ai_gateway: AIGatewayResource) -> None: + self._ai_gateway = ai_gateway + + self.create = to_raw_response_wrapper( + ai_gateway.create, + ) + self.update = to_raw_response_wrapper( + ai_gateway.update, + ) + self.list = to_raw_response_wrapper( + ai_gateway.list, + ) + self.delete = to_raw_response_wrapper( + ai_gateway.delete, + ) + self.get = to_raw_response_wrapper( + ai_gateway.get, + ) + + @cached_property + def logs(self) -> LogsResourceWithRawResponse: + return LogsResourceWithRawResponse(self._ai_gateway.logs) + + +class AsyncAIGatewayResourceWithRawResponse: + def __init__(self, ai_gateway: AsyncAIGatewayResource) -> None: + self._ai_gateway = ai_gateway + + self.create = async_to_raw_response_wrapper( + ai_gateway.create, + ) + self.update = async_to_raw_response_wrapper( + ai_gateway.update, + ) + self.list = async_to_raw_response_wrapper( + ai_gateway.list, + ) + self.delete = async_to_raw_response_wrapper( + ai_gateway.delete, + ) + self.get = async_to_raw_response_wrapper( + ai_gateway.get, + ) + + @cached_property + def logs(self) -> AsyncLogsResourceWithRawResponse: + return AsyncLogsResourceWithRawResponse(self._ai_gateway.logs) + + +class AIGatewayResourceWithStreamingResponse: + def __init__(self, ai_gateway: AIGatewayResource) -> None: + self._ai_gateway = ai_gateway + + self.create = to_streamed_response_wrapper( + ai_gateway.create, + ) + self.update = to_streamed_response_wrapper( + ai_gateway.update, + ) + self.list = to_streamed_response_wrapper( + ai_gateway.list, + ) + self.delete = to_streamed_response_wrapper( + ai_gateway.delete, + ) + self.get = to_streamed_response_wrapper( + ai_gateway.get, + ) + + @cached_property + def logs(self) -> LogsResourceWithStreamingResponse: + return LogsResourceWithStreamingResponse(self._ai_gateway.logs) + + +class AsyncAIGatewayResourceWithStreamingResponse: + def __init__(self, ai_gateway: AsyncAIGatewayResource) -> None: + self._ai_gateway = ai_gateway + + self.create = async_to_streamed_response_wrapper( + ai_gateway.create, + ) + self.update = async_to_streamed_response_wrapper( + ai_gateway.update, + ) + self.list = async_to_streamed_response_wrapper( + ai_gateway.list, + ) + self.delete = async_to_streamed_response_wrapper( + ai_gateway.delete, + ) + self.get = async_to_streamed_response_wrapper( + ai_gateway.get, + ) + + @cached_property + def logs(self) -> AsyncLogsResourceWithStreamingResponse: + return AsyncLogsResourceWithStreamingResponse(self._ai_gateway.logs) diff --git a/src/cloudflare/resources/ai_gateway/logs.py b/src/cloudflare/resources/ai_gateway/logs.py new file mode 100644 index 00000000000..11b66892f08 --- /dev/null +++ b/src/cloudflare/resources/ai_gateway/logs.py @@ -0,0 +1,213 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, Union, cast +from datetime import datetime +from typing_extensions import Literal + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._wrappers import ResultWrapper +from ..._base_client import ( + make_request_options, +) +from ...types.ai_gateway import log_get_params +from ...types.ai_gateway.log_get_response import LogGetResponse + +__all__ = ["LogsResource", "AsyncLogsResource"] + + +class LogsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> LogsResourceWithRawResponse: + return LogsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> LogsResourceWithStreamingResponse: + return LogsResourceWithStreamingResponse(self) + + def get( + self, + id: str, + *, + account_id: str, + cached: bool | NotGiven = NOT_GIVEN, + direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, + end_date: Union[str, datetime] | NotGiven = NOT_GIVEN, + order_by: Literal["created_at", "provider"] | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: int | NotGiven = NOT_GIVEN, + search: str | NotGiven = NOT_GIVEN, + start_date: Union[str, datetime] | NotGiven = NOT_GIVEN, + success: bool | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogGetResponse: + """ + List Gateway Logs + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + return self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "cached": cached, + "direction": direction, + "end_date": end_date, + "order_by": order_by, + "page": page, + "per_page": per_page, + "search": search, + "start_date": start_date, + "success": success, + }, + log_get_params.LogGetParams, + ), + post_parser=ResultWrapper[LogGetResponse]._unwrapper, + ), + cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), + ) + + +class AsyncLogsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncLogsResourceWithRawResponse: + return AsyncLogsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncLogsResourceWithStreamingResponse: + return AsyncLogsResourceWithStreamingResponse(self) + + async def get( + self, + id: str, + *, + account_id: str, + cached: bool | NotGiven = NOT_GIVEN, + direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, + end_date: Union[str, datetime] | NotGiven = NOT_GIVEN, + order_by: Literal["created_at", "provider"] | NotGiven = NOT_GIVEN, + page: int | NotGiven = NOT_GIVEN, + per_page: int | NotGiven = NOT_GIVEN, + search: str | NotGiven = NOT_GIVEN, + start_date: Union[str, datetime] | NotGiven = NOT_GIVEN, + success: bool | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogGetResponse: + """ + List Gateway Logs + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + return await self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "cached": cached, + "direction": direction, + "end_date": end_date, + "order_by": order_by, + "page": page, + "per_page": per_page, + "search": search, + "start_date": start_date, + "success": success, + }, + log_get_params.LogGetParams, + ), + post_parser=ResultWrapper[LogGetResponse]._unwrapper, + ), + cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), + ) + + +class LogsResourceWithRawResponse: + def __init__(self, logs: LogsResource) -> None: + self._logs = logs + + self.get = to_raw_response_wrapper( + logs.get, + ) + + +class AsyncLogsResourceWithRawResponse: + def __init__(self, logs: AsyncLogsResource) -> None: + self._logs = logs + + self.get = async_to_raw_response_wrapper( + logs.get, + ) + + +class LogsResourceWithStreamingResponse: + def __init__(self, logs: LogsResource) -> None: + self._logs = logs + + self.get = to_streamed_response_wrapper( + logs.get, + ) + + +class AsyncLogsResourceWithStreamingResponse: + def __init__(self, logs: AsyncLogsResource) -> None: + self._logs = logs + + self.get = async_to_streamed_response_wrapper( + logs.get, + ) diff --git a/src/cloudflare/resources/bot_management.py b/src/cloudflare/resources/bot_management.py index a0e2d7d637e..e53c10a35f6 100644 --- a/src/cloudflare/resources/bot_management.py +++ b/src/cloudflare/resources/bot_management.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, cast, overload +from typing import Any, Optional, cast, overload from typing_extensions import Literal import httpx @@ -54,7 +54,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: """ Updates the Bot Management configuration for a zone. @@ -101,7 +101,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: """ Updates the Bot Management configuration for a zone. @@ -157,7 +157,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: """ Updates the Bot Management configuration for a zone. @@ -212,7 +212,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: """ Updates the Bot Management configuration for a zone. @@ -268,11 +268,11 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - BotManagementUpdateResponse, + Optional[BotManagementUpdateResponse], self._put( f"/zones/{zone_id}/bot_management", body=maybe_transform( @@ -294,7 +294,7 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[BotManagementUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[BotManagementUpdateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[BotManagementUpdateResponse] @@ -312,7 +312,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementGetResponse: + ) -> Optional[BotManagementGetResponse]: """ Retrieve a zone's Bot Management Config @@ -330,7 +330,7 @@ def get( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - BotManagementGetResponse, + Optional[BotManagementGetResponse], self._get( f"/zones/{zone_id}/bot_management", options=make_request_options( @@ -338,7 +338,7 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[BotManagementGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[BotManagementGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[BotManagementGetResponse] @@ -369,7 +369,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: """ Updates the Bot Management configuration for a zone. @@ -416,7 +416,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: """ Updates the Bot Management configuration for a zone. @@ -472,7 +472,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: """ Updates the Bot Management configuration for a zone. @@ -527,7 +527,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: """ Updates the Bot Management configuration for a zone. @@ -583,11 +583,11 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementUpdateResponse: + ) -> Optional[BotManagementUpdateResponse]: if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - BotManagementUpdateResponse, + Optional[BotManagementUpdateResponse], await self._put( f"/zones/{zone_id}/bot_management", body=await async_maybe_transform( @@ -609,7 +609,7 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[BotManagementUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[BotManagementUpdateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[BotManagementUpdateResponse] @@ -627,7 +627,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BotManagementGetResponse: + ) -> Optional[BotManagementGetResponse]: """ Retrieve a zone's Bot Management Config @@ -645,7 +645,7 @@ async def get( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - BotManagementGetResponse, + Optional[BotManagementGetResponse], await self._get( f"/zones/{zone_id}/bot_management", options=make_request_options( @@ -653,7 +653,7 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[BotManagementGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[BotManagementGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[BotManagementGetResponse] diff --git a/src/cloudflare/resources/brand_protection.py b/src/cloudflare/resources/brand_protection.py index 093a59d6c7e..f23dee3648c 100644 --- a/src/cloudflare/resources/brand_protection.py +++ b/src/cloudflare/resources/brand_protection.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -50,7 +50,7 @@ def submit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Submit: + ) -> Optional[Submit]: """ Submit suspicious URL for scanning @@ -77,9 +77,9 @@ def submit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Submit]._unwrapper, + post_parser=ResultWrapper[Optional[Submit]]._unwrapper, ), - cast_to=cast(Type[Submit], ResultWrapper[Submit]), + cast_to=cast(Type[Optional[Submit]], ResultWrapper[Submit]), ) def url_info( @@ -94,7 +94,7 @@ def url_info( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Info: + ) -> Optional[Info]: """ Get results for a URL scan @@ -125,9 +125,9 @@ def url_info( }, brand_protection_url_info_params.BrandProtectionURLInfoParams, ), - post_parser=ResultWrapper[Info]._unwrapper, + post_parser=ResultWrapper[Optional[Info]]._unwrapper, ), - cast_to=cast(Type[Info], ResultWrapper[Info]), + cast_to=cast(Type[Optional[Info]], ResultWrapper[Info]), ) @@ -151,7 +151,7 @@ async def submit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Submit: + ) -> Optional[Submit]: """ Submit suspicious URL for scanning @@ -178,9 +178,9 @@ async def submit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Submit]._unwrapper, + post_parser=ResultWrapper[Optional[Submit]]._unwrapper, ), - cast_to=cast(Type[Submit], ResultWrapper[Submit]), + cast_to=cast(Type[Optional[Submit]], ResultWrapper[Submit]), ) async def url_info( @@ -195,7 +195,7 @@ async def url_info( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Info: + ) -> Optional[Info]: """ Get results for a URL scan @@ -226,9 +226,9 @@ async def url_info( }, brand_protection_url_info_params.BrandProtectionURLInfoParams, ), - post_parser=ResultWrapper[Info]._unwrapper, + post_parser=ResultWrapper[Optional[Info]]._unwrapper, ), - cast_to=cast(Type[Info], ResultWrapper[Info]), + cast_to=cast(Type[Optional[Info]], ResultWrapper[Info]), ) diff --git a/src/cloudflare/resources/cache/smart_tiered_cache.py b/src/cloudflare/resources/cache/smart_tiered_cache.py index 39c7e79e4b0..05eaf141475 100644 --- a/src/cloudflare/resources/cache/smart_tiered_cache.py +++ b/src/cloudflare/resources/cache/smart_tiered_cache.py @@ -21,7 +21,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.cache import smart_tiered_cache_edit_params, smart_tiered_cache_delete_params +from ...types.cache import smart_tiered_cache_edit_params from ..._base_client import ( make_request_options, ) @@ -45,7 +45,6 @@ def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -73,7 +72,6 @@ def delete( SmartTieredCacheDeleteResponse, self._delete( f"/zones/{zone_id}/cache/tiered_cache_smart_topology_enable", - body=maybe_transform(body, smart_tiered_cache_delete_params.SmartTieredCacheDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -193,7 +191,6 @@ async def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -221,7 +218,6 @@ async def delete( SmartTieredCacheDeleteResponse, await self._delete( f"/zones/{zone_id}/cache/tiered_cache_smart_topology_enable", - body=await async_maybe_transform(body, smart_tiered_cache_delete_params.SmartTieredCacheDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/cache/variants.py b/src/cloudflare/resources/cache/variants.py index c7043671ef7..3c7f760c774 100644 --- a/src/cloudflare/resources/cache/variants.py +++ b/src/cloudflare/resources/cache/variants.py @@ -20,7 +20,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.cache import variant_edit_params, variant_delete_params +from ...types.cache import variant_edit_params from ..._base_client import ( make_request_options, ) @@ -44,7 +44,6 @@ def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -74,7 +73,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._delete( f"/zones/{zone_id}/cache/variants", - body=maybe_transform(body, variant_delete_params.VariantDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -189,7 +187,6 @@ async def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -219,7 +216,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return await self._delete( f"/zones/{zone_id}/cache/variants", - body=await async_maybe_transform(body, variant_delete_params.VariantDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/certificate_authorities/hostname_associations.py b/src/cloudflare/resources/certificate_authorities/hostname_associations.py index 688bbaf4aaf..4867abd374d 100644 --- a/src/cloudflare/resources/certificate_authorities/hostname_associations.py +++ b/src/cloudflare/resources/certificate_authorities/hostname_associations.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Type, cast +from typing import List, Type, Optional, cast import httpx @@ -52,7 +52,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameAssociationUpdateResponse: + ) -> Optional[HostnameAssociationUpdateResponse]: """ Replace Hostname Associations @@ -87,9 +87,11 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[HostnameAssociationUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[HostnameAssociationUpdateResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[HostnameAssociationUpdateResponse]], ResultWrapper[HostnameAssociationUpdateResponse] ), - cast_to=cast(Type[HostnameAssociationUpdateResponse], ResultWrapper[HostnameAssociationUpdateResponse]), ) def get( @@ -103,7 +105,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameAssociationGetResponse: + ) -> Optional[HostnameAssociationGetResponse]: """ List Hostname Associations @@ -135,9 +137,9 @@ def get( {"mtls_certificate_id": mtls_certificate_id}, hostname_association_get_params.HostnameAssociationGetParams, ), - post_parser=ResultWrapper[HostnameAssociationGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[HostnameAssociationGetResponse]]._unwrapper, ), - cast_to=cast(Type[HostnameAssociationGetResponse], ResultWrapper[HostnameAssociationGetResponse]), + cast_to=cast(Type[Optional[HostnameAssociationGetResponse]], ResultWrapper[HostnameAssociationGetResponse]), ) @@ -162,7 +164,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameAssociationUpdateResponse: + ) -> Optional[HostnameAssociationUpdateResponse]: """ Replace Hostname Associations @@ -197,9 +199,11 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[HostnameAssociationUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[HostnameAssociationUpdateResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[HostnameAssociationUpdateResponse]], ResultWrapper[HostnameAssociationUpdateResponse] ), - cast_to=cast(Type[HostnameAssociationUpdateResponse], ResultWrapper[HostnameAssociationUpdateResponse]), ) async def get( @@ -213,7 +217,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameAssociationGetResponse: + ) -> Optional[HostnameAssociationGetResponse]: """ List Hostname Associations @@ -245,9 +249,9 @@ async def get( {"mtls_certificate_id": mtls_certificate_id}, hostname_association_get_params.HostnameAssociationGetParams, ), - post_parser=ResultWrapper[HostnameAssociationGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[HostnameAssociationGetResponse]]._unwrapper, ), - cast_to=cast(Type[HostnameAssociationGetResponse], ResultWrapper[HostnameAssociationGetResponse]), + cast_to=cast(Type[Optional[HostnameAssociationGetResponse]], ResultWrapper[HostnameAssociationGetResponse]), ) diff --git a/src/cloudflare/resources/client_certificates.py b/src/cloudflare/resources/client_certificates.py index c9f70aa1ace..f8a069fc5a7 100644 --- a/src/cloudflare/resources/client_certificates.py +++ b/src/cloudflare/resources/client_certificates.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast from typing_extensions import Literal import httpx @@ -53,7 +53,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificate: + ) -> Optional[ClientCertificate]: """ Create a new API Shield mTLS Client Certificate @@ -88,9 +88,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ClientCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[ClientCertificate]]._unwrapper, ), - cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), + cast_to=cast(Type[Optional[ClientCertificate]], ResultWrapper[ClientCertificate]), ) def list( @@ -170,7 +170,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificate: + ) -> Optional[ClientCertificate]: """ Set a API Shield mTLS Client Certificate to pending_revocation status for processing to revoked status. @@ -201,9 +201,9 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ClientCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[ClientCertificate]]._unwrapper, ), - cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), + cast_to=cast(Type[Optional[ClientCertificate]], ResultWrapper[ClientCertificate]), ) def edit( @@ -217,7 +217,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificate: + ) -> Optional[ClientCertificate]: """ If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint. @@ -248,9 +248,9 @@ def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ClientCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[ClientCertificate]]._unwrapper, ), - cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), + cast_to=cast(Type[Optional[ClientCertificate]], ResultWrapper[ClientCertificate]), ) def get( @@ -264,7 +264,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificate: + ) -> Optional[ClientCertificate]: """ Get Details for a single mTLS API Shield Client Certificate @@ -294,9 +294,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ClientCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[ClientCertificate]]._unwrapper, ), - cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), + cast_to=cast(Type[Optional[ClientCertificate]], ResultWrapper[ClientCertificate]), ) @@ -321,7 +321,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificate: + ) -> Optional[ClientCertificate]: """ Create a new API Shield mTLS Client Certificate @@ -356,9 +356,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ClientCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[ClientCertificate]]._unwrapper, ), - cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), + cast_to=cast(Type[Optional[ClientCertificate]], ResultWrapper[ClientCertificate]), ) def list( @@ -438,7 +438,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificate: + ) -> Optional[ClientCertificate]: """ Set a API Shield mTLS Client Certificate to pending_revocation status for processing to revoked status. @@ -469,9 +469,9 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ClientCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[ClientCertificate]]._unwrapper, ), - cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), + cast_to=cast(Type[Optional[ClientCertificate]], ResultWrapper[ClientCertificate]), ) async def edit( @@ -485,7 +485,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificate: + ) -> Optional[ClientCertificate]: """ If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint. @@ -516,9 +516,9 @@ async def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ClientCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[ClientCertificate]]._unwrapper, ), - cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), + cast_to=cast(Type[Optional[ClientCertificate]], ResultWrapper[ClientCertificate]), ) async def get( @@ -532,7 +532,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificate: + ) -> Optional[ClientCertificate]: """ Get Details for a single mTLS API Shield Client Certificate @@ -562,9 +562,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ClientCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[ClientCertificate]]._unwrapper, ), - cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), + cast_to=cast(Type[Optional[ClientCertificate]], ResultWrapper[ClientCertificate]), ) diff --git a/src/cloudflare/resources/cloudforce_one/requests/message.py b/src/cloudflare/resources/cloudforce_one/requests/message.py index eaea1a987b6..177e2c5b099 100644 --- a/src/cloudflare/resources/cloudforce_one/requests/message.py +++ b/src/cloudflare/resources/cloudforce_one/requests/message.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Union, cast +from typing import Type, Union, Optional, cast from datetime import datetime from typing_extensions import Literal @@ -54,7 +54,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Message: + ) -> Optional[Message]: """ Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability @@ -87,9 +87,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Message]._unwrapper, + post_parser=ResultWrapper[Optional[Message]]._unwrapper, ), - cast_to=cast(Type[Message], ResultWrapper[Message]), + cast_to=cast(Type[Optional[Message]], ResultWrapper[Message]), ) def update( @@ -109,7 +109,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Message: + ) -> Optional[Message]: """ Update a Request Message @@ -157,9 +157,9 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Message]._unwrapper, + post_parser=ResultWrapper[Optional[Message]]._unwrapper, ), - cast_to=cast(Type[Message], ResultWrapper[Message]), + cast_to=cast(Type[Optional[Message]], ResultWrapper[Message]), ) def delete( @@ -195,21 +195,12 @@ def delete( raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") if not request_identifier: raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}") - return cast( - MessageDeleteResponse, - self._delete( - f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/message/{message_identifer}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[MessageDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[MessageDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._delete( + f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/message/{message_identifer}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=MessageDeleteResponse, ) def get( @@ -229,7 +220,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MessageGetResponse: + ) -> Optional[MessageGetResponse]: """ List Request Messages @@ -280,9 +271,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MessageGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[MessageGetResponse]]._unwrapper, ), - cast_to=cast(Type[MessageGetResponse], ResultWrapper[MessageGetResponse]), + cast_to=cast(Type[Optional[MessageGetResponse]], ResultWrapper[MessageGetResponse]), ) @@ -307,7 +298,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Message: + ) -> Optional[Message]: """ Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability @@ -340,9 +331,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Message]._unwrapper, + post_parser=ResultWrapper[Optional[Message]]._unwrapper, ), - cast_to=cast(Type[Message], ResultWrapper[Message]), + cast_to=cast(Type[Optional[Message]], ResultWrapper[Message]), ) async def update( @@ -362,7 +353,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Message: + ) -> Optional[Message]: """ Update a Request Message @@ -410,9 +401,9 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Message]._unwrapper, + post_parser=ResultWrapper[Optional[Message]]._unwrapper, ), - cast_to=cast(Type[Message], ResultWrapper[Message]), + cast_to=cast(Type[Optional[Message]], ResultWrapper[Message]), ) async def delete( @@ -448,21 +439,12 @@ async def delete( raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") if not request_identifier: raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}") - return cast( - MessageDeleteResponse, - await self._delete( - f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/message/{message_identifer}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[MessageDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[MessageDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._delete( + f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/message/{message_identifer}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=MessageDeleteResponse, ) async def get( @@ -482,7 +464,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MessageGetResponse: + ) -> Optional[MessageGetResponse]: """ List Request Messages @@ -533,9 +515,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MessageGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[MessageGetResponse]]._unwrapper, ), - cast_to=cast(Type[MessageGetResponse], ResultWrapper[MessageGetResponse]), + cast_to=cast(Type[Optional[MessageGetResponse]], ResultWrapper[MessageGetResponse]), ) diff --git a/src/cloudflare/resources/cloudforce_one/requests/priority.py b/src/cloudflare/resources/cloudforce_one/requests/priority.py index 0f1d6795a40..243e43f789b 100644 --- a/src/cloudflare/resources/cloudforce_one/requests/priority.py +++ b/src/cloudflare/resources/cloudforce_one/requests/priority.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Type, cast +from typing import List, Type, Optional, cast from typing_extensions import Literal import httpx @@ -57,7 +57,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Priority: + ) -> Optional[Priority]: """ Create a New Priority Requirement @@ -98,9 +98,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Priority]._unwrapper, + post_parser=ResultWrapper[Optional[Priority]]._unwrapper, ), - cast_to=cast(Type[Priority], ResultWrapper[Priority]), + cast_to=cast(Type[Optional[Priority]], ResultWrapper[Priority]), ) def update( @@ -118,7 +118,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """ Update a Priority Intelligence Requirement @@ -163,9 +163,9 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) def delete( @@ -200,21 +200,12 @@ def delete( raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") if not priority_identifer: raise ValueError(f"Expected a non-empty value for `priority_identifer` but received {priority_identifer!r}") - return cast( - PriorityDeleteResponse, - self._delete( - f"/accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[PriorityDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[PriorityDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._delete( + f"/accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=PriorityDeleteResponse, ) def get( @@ -228,7 +219,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """ Get a Priority Intelligence Requirement @@ -256,9 +247,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) def quota( @@ -271,7 +262,7 @@ def quota( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Quota: + ) -> Optional[Quota]: """ Get Priority Intelligence Requirement Quota @@ -295,9 +286,9 @@ def quota( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Quota]._unwrapper, + post_parser=ResultWrapper[Optional[Quota]]._unwrapper, ), - cast_to=cast(Type[Quota], ResultWrapper[Quota]), + cast_to=cast(Type[Optional[Quota]], ResultWrapper[Quota]), ) @@ -324,7 +315,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Priority: + ) -> Optional[Priority]: """ Create a New Priority Requirement @@ -365,9 +356,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Priority]._unwrapper, + post_parser=ResultWrapper[Optional[Priority]]._unwrapper, ), - cast_to=cast(Type[Priority], ResultWrapper[Priority]), + cast_to=cast(Type[Optional[Priority]], ResultWrapper[Priority]), ) async def update( @@ -385,7 +376,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """ Update a Priority Intelligence Requirement @@ -430,9 +421,9 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) async def delete( @@ -467,21 +458,12 @@ async def delete( raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") if not priority_identifer: raise ValueError(f"Expected a non-empty value for `priority_identifer` but received {priority_identifer!r}") - return cast( - PriorityDeleteResponse, - await self._delete( - f"/accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[PriorityDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[PriorityDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._delete( + f"/accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=PriorityDeleteResponse, ) async def get( @@ -495,7 +477,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """ Get a Priority Intelligence Requirement @@ -523,9 +505,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) async def quota( @@ -538,7 +520,7 @@ async def quota( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Quota: + ) -> Optional[Quota]: """ Get Priority Intelligence Requirement Quota @@ -562,9 +544,9 @@ async def quota( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Quota]._unwrapper, + post_parser=ResultWrapper[Optional[Quota]]._unwrapper, ), - cast_to=cast(Type[Quota], ResultWrapper[Quota]), + cast_to=cast(Type[Optional[Quota]], ResultWrapper[Quota]), ) diff --git a/src/cloudflare/resources/cloudforce_one/requests/requests.py b/src/cloudflare/resources/cloudforce_one/requests/requests.py index 61a739aaa7c..267e04595d6 100644 --- a/src/cloudflare/resources/cloudforce_one/requests/requests.py +++ b/src/cloudflare/resources/cloudforce_one/requests/requests.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Union, cast +from typing import Type, Union, Optional, cast from datetime import datetime from typing_extensions import Literal @@ -86,7 +86,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """ Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability @@ -132,9 +132,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) def update( @@ -153,7 +153,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """Updating a request alters the request in the Cloudforce One queue. This API may @@ -204,9 +204,9 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) def list( @@ -323,21 +323,12 @@ def delete( raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") if not request_identifier: raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}") - return cast( - RequestDeleteResponse, - self._delete( - f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[RequestDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[RequestDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._delete( + f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=RequestDeleteResponse, ) def constants( @@ -350,7 +341,7 @@ def constants( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestConstants: + ) -> Optional[RequestConstants]: """ Get Request Priority, Status, and TLP constants @@ -374,9 +365,9 @@ def constants( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[RequestConstants]._unwrapper, + post_parser=ResultWrapper[Optional[RequestConstants]]._unwrapper, ), - cast_to=cast(Type[RequestConstants], ResultWrapper[RequestConstants]), + cast_to=cast(Type[Optional[RequestConstants]], ResultWrapper[RequestConstants]), ) def get( @@ -390,7 +381,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """ Get a Request @@ -418,9 +409,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) def quota( @@ -433,7 +424,7 @@ def quota( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Quota: + ) -> Optional[Quota]: """ Get Request Quota @@ -457,9 +448,9 @@ def quota( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Quota]._unwrapper, + post_parser=ResultWrapper[Optional[Quota]]._unwrapper, ), - cast_to=cast(Type[Quota], ResultWrapper[Quota]), + cast_to=cast(Type[Optional[Quota]], ResultWrapper[Quota]), ) def types( @@ -472,7 +463,7 @@ def types( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestTypes: + ) -> Optional[RequestTypes]: """ Get Request Types @@ -496,9 +487,9 @@ def types( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[RequestTypes]._unwrapper, + post_parser=ResultWrapper[Optional[RequestTypes]]._unwrapper, ), - cast_to=cast(Type[RequestTypes], ResultWrapper[RequestTypes]), + cast_to=cast(Type[Optional[RequestTypes]], ResultWrapper[RequestTypes]), ) @@ -534,7 +525,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """ Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability @@ -580,9 +571,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) async def update( @@ -601,7 +592,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """Updating a request alters the request in the Cloudforce One queue. This API may @@ -652,9 +643,9 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) def list( @@ -771,21 +762,12 @@ async def delete( raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") if not request_identifier: raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}") - return cast( - RequestDeleteResponse, - await self._delete( - f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[RequestDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[RequestDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._delete( + f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=RequestDeleteResponse, ) async def constants( @@ -798,7 +780,7 @@ async def constants( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestConstants: + ) -> Optional[RequestConstants]: """ Get Request Priority, Status, and TLP constants @@ -822,9 +804,9 @@ async def constants( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[RequestConstants]._unwrapper, + post_parser=ResultWrapper[Optional[RequestConstants]]._unwrapper, ), - cast_to=cast(Type[RequestConstants], ResultWrapper[RequestConstants]), + cast_to=cast(Type[Optional[RequestConstants]], ResultWrapper[RequestConstants]), ) async def get( @@ -838,7 +820,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Item: + ) -> Optional[Item]: """ Get a Request @@ -866,9 +848,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Item]._unwrapper, + post_parser=ResultWrapper[Optional[Item]]._unwrapper, ), - cast_to=cast(Type[Item], ResultWrapper[Item]), + cast_to=cast(Type[Optional[Item]], ResultWrapper[Item]), ) async def quota( @@ -881,7 +863,7 @@ async def quota( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Quota: + ) -> Optional[Quota]: """ Get Request Quota @@ -905,9 +887,9 @@ async def quota( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Quota]._unwrapper, + post_parser=ResultWrapper[Optional[Quota]]._unwrapper, ), - cast_to=cast(Type[Quota], ResultWrapper[Quota]), + cast_to=cast(Type[Optional[Quota]], ResultWrapper[Quota]), ) async def types( @@ -920,7 +902,7 @@ async def types( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestTypes: + ) -> Optional[RequestTypes]: """ Get Request Types @@ -944,9 +926,9 @@ async def types( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[RequestTypes]._unwrapper, + post_parser=ResultWrapper[Optional[RequestTypes]]._unwrapper, ), - cast_to=cast(Type[RequestTypes], ResultWrapper[RequestTypes]), + cast_to=cast(Type[Optional[RequestTypes]], ResultWrapper[RequestTypes]), ) diff --git a/src/cloudflare/resources/custom_certificates/custom_certificates.py b/src/cloudflare/resources/custom_certificates/custom_certificates.py index 8842c9fe482..a3deb798257 100644 --- a/src/cloudflare/resources/custom_certificates/custom_certificates.py +++ b/src/cloudflare/resources/custom_certificates/custom_certificates.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, cast +from typing import Any, Type, Optional, cast from typing_extensions import Literal import httpx @@ -39,7 +39,6 @@ custom_certificate_edit_params, custom_certificate_list_params, custom_certificate_create_params, - custom_certificate_delete_params, ) from ...types.custom_hostnames.bundle_method import BundleMethod from ...types.custom_certificates.custom_certificate import CustomCertificate @@ -81,7 +80,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomCertificateCreateResponse: + ) -> Optional[CustomCertificateCreateResponse]: """ Upload a new SSL certificate for a zone. @@ -129,7 +128,7 @@ def create( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - CustomCertificateCreateResponse, + Optional[CustomCertificateCreateResponse], self._post( f"/zones/{zone_id}/custom_certificates", body=maybe_transform( @@ -148,7 +147,7 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomCertificateCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomCertificateCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[CustomCertificateCreateResponse] @@ -224,14 +223,13 @@ def delete( custom_certificate_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomCertificateDeleteResponse: + ) -> Optional[CustomCertificateDeleteResponse]: """ Remove a SSL certificate from a zone. @@ -256,15 +254,16 @@ def delete( ) return self._delete( f"/zones/{zone_id}/custom_certificates/{custom_certificate_id}", - body=maybe_transform(body, custom_certificate_delete_params.CustomCertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomCertificateDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomCertificateDeleteResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[CustomCertificateDeleteResponse]], ResultWrapper[CustomCertificateDeleteResponse] ), - cast_to=cast(Type[CustomCertificateDeleteResponse], ResultWrapper[CustomCertificateDeleteResponse]), ) def edit( @@ -283,7 +282,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomCertificateEditResponse: + ) -> Optional[CustomCertificateEditResponse]: """Upload a new private key and/or PEM/CRT for the SSL certificate. Note: PATCHing @@ -337,7 +336,7 @@ def edit( f"Expected a non-empty value for `custom_certificate_id` but received {custom_certificate_id!r}" ) return cast( - CustomCertificateEditResponse, + Optional[CustomCertificateEditResponse], self._patch( f"/zones/{zone_id}/custom_certificates/{custom_certificate_id}", body=maybe_transform( @@ -355,7 +354,7 @@ def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomCertificateEditResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomCertificateEditResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[CustomCertificateEditResponse] @@ -374,7 +373,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomCertificateGetResponse: + ) -> Optional[CustomCertificateGetResponse]: """ SSL Configuration Details @@ -398,7 +397,7 @@ def get( f"Expected a non-empty value for `custom_certificate_id` but received {custom_certificate_id!r}" ) return cast( - CustomCertificateGetResponse, + Optional[CustomCertificateGetResponse], self._get( f"/zones/{zone_id}/custom_certificates/{custom_certificate_id}", options=make_request_options( @@ -406,7 +405,7 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomCertificateGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomCertificateGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[CustomCertificateGetResponse] @@ -444,7 +443,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomCertificateCreateResponse: + ) -> Optional[CustomCertificateCreateResponse]: """ Upload a new SSL certificate for a zone. @@ -492,7 +491,7 @@ async def create( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - CustomCertificateCreateResponse, + Optional[CustomCertificateCreateResponse], await self._post( f"/zones/{zone_id}/custom_certificates", body=await async_maybe_transform( @@ -511,7 +510,7 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomCertificateCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomCertificateCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[CustomCertificateCreateResponse] @@ -587,14 +586,13 @@ async def delete( custom_certificate_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomCertificateDeleteResponse: + ) -> Optional[CustomCertificateDeleteResponse]: """ Remove a SSL certificate from a zone. @@ -619,15 +617,16 @@ async def delete( ) return await self._delete( f"/zones/{zone_id}/custom_certificates/{custom_certificate_id}", - body=await async_maybe_transform(body, custom_certificate_delete_params.CustomCertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomCertificateDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomCertificateDeleteResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[CustomCertificateDeleteResponse]], ResultWrapper[CustomCertificateDeleteResponse] ), - cast_to=cast(Type[CustomCertificateDeleteResponse], ResultWrapper[CustomCertificateDeleteResponse]), ) async def edit( @@ -646,7 +645,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomCertificateEditResponse: + ) -> Optional[CustomCertificateEditResponse]: """Upload a new private key and/or PEM/CRT for the SSL certificate. Note: PATCHing @@ -700,7 +699,7 @@ async def edit( f"Expected a non-empty value for `custom_certificate_id` but received {custom_certificate_id!r}" ) return cast( - CustomCertificateEditResponse, + Optional[CustomCertificateEditResponse], await self._patch( f"/zones/{zone_id}/custom_certificates/{custom_certificate_id}", body=await async_maybe_transform( @@ -718,7 +717,7 @@ async def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomCertificateEditResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomCertificateEditResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[CustomCertificateEditResponse] @@ -737,7 +736,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomCertificateGetResponse: + ) -> Optional[CustomCertificateGetResponse]: """ SSL Configuration Details @@ -761,7 +760,7 @@ async def get( f"Expected a non-empty value for `custom_certificate_id` but received {custom_certificate_id!r}" ) return cast( - CustomCertificateGetResponse, + Optional[CustomCertificateGetResponse], await self._get( f"/zones/{zone_id}/custom_certificates/{custom_certificate_id}", options=make_request_options( @@ -769,7 +768,7 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomCertificateGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomCertificateGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[CustomCertificateGetResponse] diff --git a/src/cloudflare/resources/custom_hostnames/custom_hostnames.py b/src/cloudflare/resources/custom_hostnames/custom_hostnames.py index 5473e27d513..8ed92ce708f 100644 --- a/src/cloudflare/resources/custom_hostnames/custom_hostnames.py +++ b/src/cloudflare/resources/custom_hostnames/custom_hostnames.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast from typing_extensions import Literal import httpx @@ -38,7 +38,6 @@ custom_hostname_edit_params, custom_hostname_list_params, custom_hostname_create_params, - custom_hostname_delete_params, ) from ...types.custom_hostnames.custom_hostname_get_response import CustomHostnameGetResponse from ...types.custom_hostnames.custom_hostname_edit_response import CustomHostnameEditResponse @@ -75,7 +74,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomHostnameCreateResponse: + ) -> Optional[CustomHostnameCreateResponse]: """ Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, txt, email—should be used, with 'http' @@ -119,9 +118,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomHostnameCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomHostnameCreateResponse]]._unwrapper, ), - cast_to=cast(Type[CustomHostnameCreateResponse], ResultWrapper[CustomHostnameCreateResponse]), + cast_to=cast(Type[Optional[CustomHostnameCreateResponse]], ResultWrapper[CustomHostnameCreateResponse]), ) def list( @@ -204,7 +203,6 @@ def delete( custom_hostname_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -234,7 +232,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `custom_hostname_id` but received {custom_hostname_id!r}") return self._delete( f"/zones/{zone_id}/custom_hostnames/{custom_hostname_id}", - body=maybe_transform(body, custom_hostname_delete_params.CustomHostnameDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -256,7 +253,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomHostnameEditResponse: + ) -> Optional[CustomHostnameEditResponse]: """Modify SSL configuration for a custom hostname. When sent with SSL config that @@ -310,9 +307,9 @@ def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomHostnameEditResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomHostnameEditResponse]]._unwrapper, ), - cast_to=cast(Type[CustomHostnameEditResponse], ResultWrapper[CustomHostnameEditResponse]), + cast_to=cast(Type[Optional[CustomHostnameEditResponse]], ResultWrapper[CustomHostnameEditResponse]), ) def get( @@ -326,7 +323,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomHostnameGetResponse: + ) -> Optional[CustomHostnameGetResponse]: """ Custom Hostname Details @@ -354,9 +351,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomHostnameGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomHostnameGetResponse]]._unwrapper, ), - cast_to=cast(Type[CustomHostnameGetResponse], ResultWrapper[CustomHostnameGetResponse]), + cast_to=cast(Type[Optional[CustomHostnameGetResponse]], ResultWrapper[CustomHostnameGetResponse]), ) @@ -386,7 +383,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomHostnameCreateResponse: + ) -> Optional[CustomHostnameCreateResponse]: """ Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, txt, email—should be used, with 'http' @@ -430,9 +427,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomHostnameCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomHostnameCreateResponse]]._unwrapper, ), - cast_to=cast(Type[CustomHostnameCreateResponse], ResultWrapper[CustomHostnameCreateResponse]), + cast_to=cast(Type[Optional[CustomHostnameCreateResponse]], ResultWrapper[CustomHostnameCreateResponse]), ) def list( @@ -515,7 +512,6 @@ async def delete( custom_hostname_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -545,7 +541,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `custom_hostname_id` but received {custom_hostname_id!r}") return await self._delete( f"/zones/{zone_id}/custom_hostnames/{custom_hostname_id}", - body=await async_maybe_transform(body, custom_hostname_delete_params.CustomHostnameDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -567,7 +562,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomHostnameEditResponse: + ) -> Optional[CustomHostnameEditResponse]: """Modify SSL configuration for a custom hostname. When sent with SSL config that @@ -621,9 +616,9 @@ async def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomHostnameEditResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomHostnameEditResponse]]._unwrapper, ), - cast_to=cast(Type[CustomHostnameEditResponse], ResultWrapper[CustomHostnameEditResponse]), + cast_to=cast(Type[Optional[CustomHostnameEditResponse]], ResultWrapper[CustomHostnameEditResponse]), ) async def get( @@ -637,7 +632,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomHostnameGetResponse: + ) -> Optional[CustomHostnameGetResponse]: """ Custom Hostname Details @@ -665,9 +660,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomHostnameGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CustomHostnameGetResponse]]._unwrapper, ), - cast_to=cast(Type[CustomHostnameGetResponse], ResultWrapper[CustomHostnameGetResponse]), + cast_to=cast(Type[Optional[CustomHostnameGetResponse]], ResultWrapper[CustomHostnameGetResponse]), ) diff --git a/src/cloudflare/resources/custom_hostnames/fallback_origin.py b/src/cloudflare/resources/custom_hostnames/fallback_origin.py index 4372be317f4..8ca189ddf97 100644 --- a/src/cloudflare/resources/custom_hostnames/fallback_origin.py +++ b/src/cloudflare/resources/custom_hostnames/fallback_origin.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, cast +from typing import Any, Optional, cast import httpx @@ -23,7 +23,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.custom_hostnames import fallback_origin_delete_params, fallback_origin_update_params +from ...types.custom_hostnames import fallback_origin_update_params from ...types.custom_hostnames.fallback_origin_get_response import FallbackOriginGetResponse from ...types.custom_hostnames.fallback_origin_delete_response import FallbackOriginDeleteResponse from ...types.custom_hostnames.fallback_origin_update_response import FallbackOriginUpdateResponse @@ -51,7 +51,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FallbackOriginUpdateResponse: + ) -> Optional[FallbackOriginUpdateResponse]: """ Update Fallback Origin for Custom Hostnames @@ -71,7 +71,7 @@ def update( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - FallbackOriginUpdateResponse, + Optional[FallbackOriginUpdateResponse], self._put( f"/zones/{zone_id}/custom_hostnames/fallback_origin", body=maybe_transform({"origin": origin}, fallback_origin_update_params.FallbackOriginUpdateParams), @@ -80,7 +80,7 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[FallbackOriginUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[FallbackOriginUpdateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[FallbackOriginUpdateResponse] @@ -92,14 +92,13 @@ def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FallbackOriginDeleteResponse: + ) -> Optional[FallbackOriginDeleteResponse]: """ Delete Fallback Origin for Custom Hostnames @@ -117,16 +116,15 @@ def delete( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - FallbackOriginDeleteResponse, + Optional[FallbackOriginDeleteResponse], self._delete( f"/zones/{zone_id}/custom_hostnames/fallback_origin", - body=maybe_transform(body, fallback_origin_delete_params.FallbackOriginDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[FallbackOriginDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[FallbackOriginDeleteResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[FallbackOriginDeleteResponse] @@ -144,7 +142,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FallbackOriginGetResponse: + ) -> Optional[FallbackOriginGetResponse]: """ Get Fallback Origin for Custom Hostnames @@ -162,7 +160,7 @@ def get( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - FallbackOriginGetResponse, + Optional[FallbackOriginGetResponse], self._get( f"/zones/{zone_id}/custom_hostnames/fallback_origin", options=make_request_options( @@ -170,7 +168,7 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[FallbackOriginGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[FallbackOriginGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[FallbackOriginGetResponse] @@ -199,7 +197,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FallbackOriginUpdateResponse: + ) -> Optional[FallbackOriginUpdateResponse]: """ Update Fallback Origin for Custom Hostnames @@ -219,7 +217,7 @@ async def update( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - FallbackOriginUpdateResponse, + Optional[FallbackOriginUpdateResponse], await self._put( f"/zones/{zone_id}/custom_hostnames/fallback_origin", body=await async_maybe_transform( @@ -230,7 +228,7 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[FallbackOriginUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[FallbackOriginUpdateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[FallbackOriginUpdateResponse] @@ -242,14 +240,13 @@ async def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FallbackOriginDeleteResponse: + ) -> Optional[FallbackOriginDeleteResponse]: """ Delete Fallback Origin for Custom Hostnames @@ -267,16 +264,15 @@ async def delete( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - FallbackOriginDeleteResponse, + Optional[FallbackOriginDeleteResponse], await self._delete( f"/zones/{zone_id}/custom_hostnames/fallback_origin", - body=await async_maybe_transform(body, fallback_origin_delete_params.FallbackOriginDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[FallbackOriginDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[FallbackOriginDeleteResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[FallbackOriginDeleteResponse] @@ -294,7 +290,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FallbackOriginGetResponse: + ) -> Optional[FallbackOriginGetResponse]: """ Get Fallback Origin for Custom Hostnames @@ -312,7 +308,7 @@ async def get( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - FallbackOriginGetResponse, + Optional[FallbackOriginGetResponse], await self._get( f"/zones/{zone_id}/custom_hostnames/fallback_origin", options=make_request_options( @@ -320,7 +316,7 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[FallbackOriginGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[FallbackOriginGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[FallbackOriginGetResponse] diff --git a/src/cloudflare/resources/custom_nameservers.py b/src/cloudflare/resources/custom_nameservers.py index 86daaf57bd3..e0aa1a8fee7 100644 --- a/src/cloudflare/resources/custom_nameservers.py +++ b/src/cloudflare/resources/custom_nameservers.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Type, Optional, cast import httpx @@ -23,15 +23,10 @@ from .._base_client import ( make_request_options, ) -from ..types.custom_nameservers import ( - custom_nameserver_create_params, - custom_nameserver_delete_params, - custom_nameserver_verify_params, -) +from ..types.custom_nameservers import custom_nameserver_create_params from ..types.custom_nameservers.custom_nameserver import CustomNameserver from ..types.custom_nameservers.custom_nameserver_get_response import CustomNameserverGetResponse from ..types.custom_nameservers.custom_nameserver_delete_response import CustomNameserverDeleteResponse -from ..types.custom_nameservers.custom_nameserver_verify_response import CustomNameserverVerifyResponse from ..types.custom_nameservers.custom_nameserver_availabilty_response import CustomNameserverAvailabiltyResponse __all__ = ["CustomNameserversResource", "AsyncCustomNameserversResource"] @@ -58,7 +53,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomNameserver: + ) -> Optional[CustomNameserver]: """ Add Account Custom Nameserver @@ -93,9 +88,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomNameserver]._unwrapper, + post_parser=ResultWrapper[Optional[CustomNameserver]]._unwrapper, ), - cast_to=cast(Type[CustomNameserver], ResultWrapper[CustomNameserver]), + cast_to=cast(Type[Optional[CustomNameserver]], ResultWrapper[CustomNameserver]), ) def delete( @@ -103,7 +98,6 @@ def delete( custom_ns_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -131,22 +125,16 @@ def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not custom_ns_id: raise ValueError(f"Expected a non-empty value for `custom_ns_id` but received {custom_ns_id!r}") - return cast( - Optional[CustomNameserverDeleteResponse], - self._delete( - f"/accounts/{account_id}/custom_ns/{custom_ns_id}", - body=maybe_transform(body, custom_nameserver_delete_params.CustomNameserverDeleteParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CustomNameserverDeleteResponse]]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[CustomNameserverDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._delete( + f"/accounts/{account_id}/custom_ns/{custom_ns_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomNameserverDeleteResponse]]._unwrapper, ), + cast_to=cast(Type[Optional[CustomNameserverDeleteResponse]], ResultWrapper[CustomNameserverDeleteResponse]), ) def availabilty( @@ -229,47 +217,6 @@ def get( cast_to=cast(Type[Optional[CustomNameserverGetResponse]], ResultWrapper[CustomNameserverGetResponse]), ) - def verify( - self, - *, - account_id: str, - body: object, - # 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CustomNameserverVerifyResponse]: - """ - Verify Account Custom Nameserver Glue Records - - Args: - account_id: Account identifier tag. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._post( - f"/accounts/{account_id}/custom_ns/verify", - body=maybe_transform(body, custom_nameserver_verify_params.CustomNameserverVerifyParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CustomNameserverVerifyResponse]]._unwrapper, - ), - cast_to=cast(Type[Optional[CustomNameserverVerifyResponse]], ResultWrapper[CustomNameserverVerifyResponse]), - ) - class AsyncCustomNameserversResource(AsyncAPIResource): @cached_property @@ -292,7 +239,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomNameserver: + ) -> Optional[CustomNameserver]: """ Add Account Custom Nameserver @@ -327,9 +274,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CustomNameserver]._unwrapper, + post_parser=ResultWrapper[Optional[CustomNameserver]]._unwrapper, ), - cast_to=cast(Type[CustomNameserver], ResultWrapper[CustomNameserver]), + cast_to=cast(Type[Optional[CustomNameserver]], ResultWrapper[CustomNameserver]), ) async def delete( @@ -337,7 +284,6 @@ async def delete( custom_ns_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -365,22 +311,16 @@ async def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not custom_ns_id: raise ValueError(f"Expected a non-empty value for `custom_ns_id` but received {custom_ns_id!r}") - return cast( - Optional[CustomNameserverDeleteResponse], - await self._delete( - f"/accounts/{account_id}/custom_ns/{custom_ns_id}", - body=await async_maybe_transform(body, custom_nameserver_delete_params.CustomNameserverDeleteParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CustomNameserverDeleteResponse]]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[CustomNameserverDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._delete( + f"/accounts/{account_id}/custom_ns/{custom_ns_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomNameserverDeleteResponse]]._unwrapper, ), + cast_to=cast(Type[Optional[CustomNameserverDeleteResponse]], ResultWrapper[CustomNameserverDeleteResponse]), ) async def availabilty( @@ -463,47 +403,6 @@ async def get( cast_to=cast(Type[Optional[CustomNameserverGetResponse]], ResultWrapper[CustomNameserverGetResponse]), ) - async def verify( - self, - *, - account_id: str, - body: object, - # 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CustomNameserverVerifyResponse]: - """ - Verify Account Custom Nameserver Glue Records - - Args: - account_id: Account identifier tag. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._post( - f"/accounts/{account_id}/custom_ns/verify", - body=await async_maybe_transform(body, custom_nameserver_verify_params.CustomNameserverVerifyParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CustomNameserverVerifyResponse]]._unwrapper, - ), - cast_to=cast(Type[Optional[CustomNameserverVerifyResponse]], ResultWrapper[CustomNameserverVerifyResponse]), - ) - class CustomNameserversResourceWithRawResponse: def __init__(self, custom_nameservers: CustomNameserversResource) -> None: @@ -521,9 +420,6 @@ def __init__(self, custom_nameservers: CustomNameserversResource) -> None: self.get = to_raw_response_wrapper( custom_nameservers.get, ) - self.verify = to_raw_response_wrapper( - custom_nameservers.verify, - ) class AsyncCustomNameserversResourceWithRawResponse: @@ -542,9 +438,6 @@ def __init__(self, custom_nameservers: AsyncCustomNameserversResource) -> None: self.get = async_to_raw_response_wrapper( custom_nameservers.get, ) - self.verify = async_to_raw_response_wrapper( - custom_nameservers.verify, - ) class CustomNameserversResourceWithStreamingResponse: @@ -563,9 +456,6 @@ def __init__(self, custom_nameservers: CustomNameserversResource) -> None: self.get = to_streamed_response_wrapper( custom_nameservers.get, ) - self.verify = to_streamed_response_wrapper( - custom_nameservers.verify, - ) class AsyncCustomNameserversResourceWithStreamingResponse: @@ -584,6 +474,3 @@ def __init__(self, custom_nameservers: AsyncCustomNameserversResource) -> None: self.get = async_to_streamed_response_wrapper( custom_nameservers.get, ) - self.verify = async_to_streamed_response_wrapper( - custom_nameservers.verify, - ) diff --git a/src/cloudflare/resources/dcv_delegation/uuid.py b/src/cloudflare/resources/dcv_delegation/uuid.py index eef35e97584..c0c57c0ea2c 100644 --- a/src/cloudflare/resources/dcv_delegation/uuid.py +++ b/src/cloudflare/resources/dcv_delegation/uuid.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -43,7 +43,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DCVDelegationUUID: + ) -> Optional[DCVDelegationUUID]: """ Retrieve the account and zone specific unique identifier used as part of the CNAME target for DCV Delegation. @@ -68,9 +68,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[DCVDelegationUUID]._unwrapper, + post_parser=ResultWrapper[Optional[DCVDelegationUUID]]._unwrapper, ), - cast_to=cast(Type[DCVDelegationUUID], ResultWrapper[DCVDelegationUUID]), + cast_to=cast(Type[Optional[DCVDelegationUUID]], ResultWrapper[DCVDelegationUUID]), ) @@ -93,7 +93,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DCVDelegationUUID: + ) -> Optional[DCVDelegationUUID]: """ Retrieve the account and zone specific unique identifier used as part of the CNAME target for DCV Delegation. @@ -118,9 +118,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[DCVDelegationUUID]._unwrapper, + post_parser=ResultWrapper[Optional[DCVDelegationUUID]]._unwrapper, ), - cast_to=cast(Type[DCVDelegationUUID], ResultWrapper[DCVDelegationUUID]), + cast_to=cast(Type[Optional[DCVDelegationUUID]], ResultWrapper[DCVDelegationUUID]), ) diff --git a/src/cloudflare/resources/dns/analytics/reports/bytimes.py b/src/cloudflare/resources/dns/analytics/reports/bytimes.py index e63915e8090..18e924c6fb2 100644 --- a/src/cloudflare/resources/dns/analytics/reports/bytimes.py +++ b/src/cloudflare/resources/dns/analytics/reports/bytimes.py @@ -4,7 +4,6 @@ from typing import Type, Union, Optional, cast from datetime import datetime -from typing_extensions import Literal import httpx @@ -25,6 +24,8 @@ from ....._base_client import ( make_request_options, ) +from .....types.dns.firewall import Delta +from .....types.dns.firewall.delta import Delta from .....types.dns.analytics.reports import bytime_get_params from .....types.dns.analytics.reports.by_time import ByTime @@ -50,8 +51,7 @@ def get( metrics: str | NotGiven = NOT_GIVEN, since: Union[str, datetime] | NotGiven = NOT_GIVEN, sort: str | NotGiven = NOT_GIVEN, - time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"] - | NotGiven = NOT_GIVEN, + time_delta: Delta | NotGiven = NOT_GIVEN, until: Union[str, datetime] | 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. @@ -142,8 +142,7 @@ async def get( metrics: str | NotGiven = NOT_GIVEN, since: Union[str, datetime] | NotGiven = NOT_GIVEN, sort: str | NotGiven = NOT_GIVEN, - time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"] - | NotGiven = NOT_GIVEN, + time_delta: Delta | NotGiven = NOT_GIVEN, until: Union[str, datetime] | 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/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py b/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py index 05c24c9cce7..de7eb9723da 100644 --- a/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py +++ b/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py @@ -4,7 +4,6 @@ from typing import Type, Union, Optional, cast from datetime import datetime -from typing_extensions import Literal import httpx @@ -25,6 +24,8 @@ from ......_base_client import ( make_request_options, ) +from ......types.dns.firewall import Delta +from ......types.dns.firewall.delta import Delta from ......types.dns.analytics.reports.by_time import ByTime from ......types.dns.firewall.analytics.reports import bytime_get_params @@ -51,8 +52,7 @@ def get( metrics: str | NotGiven = NOT_GIVEN, since: Union[str, datetime] | NotGiven = NOT_GIVEN, sort: str | NotGiven = NOT_GIVEN, - time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"] - | NotGiven = NOT_GIVEN, + time_delta: Delta | NotGiven = NOT_GIVEN, until: Union[str, datetime] | 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. @@ -148,8 +148,7 @@ async def get( metrics: str | NotGiven = NOT_GIVEN, since: Union[str, datetime] | NotGiven = NOT_GIVEN, sort: str | NotGiven = NOT_GIVEN, - time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"] - | NotGiven = NOT_GIVEN, + time_delta: Delta | NotGiven = NOT_GIVEN, until: Union[str, datetime] | 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/cloudflare/resources/dns/firewall/firewall.py b/src/cloudflare/resources/dns/firewall/firewall.py index a4bbe227f81..dd82f5448c3 100644 --- a/src/cloudflare/resources/dns/firewall/firewall.py +++ b/src/cloudflare/resources/dns/firewall/firewall.py @@ -28,12 +28,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....types.dns import ( - firewall_edit_params, - firewall_list_params, - firewall_create_params, - firewall_delete_params, -) +from ....types.dns import firewall_edit_params, firewall_list_params, firewall_create_params from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...._base_client import ( AsyncPaginator, @@ -203,7 +198,6 @@ def delete( dns_firewall_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -233,7 +227,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `dns_firewall_id` but received {dns_firewall_id!r}") return self._delete( f"/accounts/{account_id}/dns_firewall/{dns_firewall_id}", - body=maybe_transform(body, firewall_delete_params.FirewallDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -534,7 +527,6 @@ async def delete( dns_firewall_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -564,7 +556,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `dns_firewall_id` but received {dns_firewall_id!r}") return await self._delete( f"/accounts/{account_id}/dns_firewall/{dns_firewall_id}", - body=await async_maybe_transform(body, firewall_delete_params.FirewallDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index fd486f064e5..a3fc72a9354 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -27,7 +27,6 @@ record_list_params, record_scan_params, record_create_params, - record_delete_params, record_import_params, record_update_params, ) @@ -39,6 +38,7 @@ from ...types.dns.record import Record from ...types.dns.ttl_param import TTLParam from ...types.dns.record_tags import RecordTags +from ...types.shared.sort_direction import SortDirection from ...types.dns.record_scan_response import RecordScanResponse from ...types.dns.record_delete_response import RecordDeleteResponse from ...types.dns.record_import_response import RecordImportResponse @@ -2598,7 +2598,7 @@ def list( zone_id: str, comment: record_list_params.Comment | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, - direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, + direction: SortDirection | NotGiven = NOT_GIVEN, match: Literal["any", "all"] | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, order: Literal["type", "name", "content", "ttl", "proxied"] | NotGiven = NOT_GIVEN, @@ -2722,7 +2722,6 @@ def delete( dns_record_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -2752,7 +2751,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return self._delete( f"/zones/{zone_id}/dns_records/{dns_record_id}", - body=maybe_transform(body, record_delete_params.RecordDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -6804,7 +6802,7 @@ def list( zone_id: str, comment: record_list_params.Comment | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, - direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, + direction: SortDirection | NotGiven = NOT_GIVEN, match: Literal["any", "all"] | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, order: Literal["type", "name", "content", "ttl", "proxied"] | NotGiven = NOT_GIVEN, @@ -6928,7 +6926,6 @@ async def delete( dns_record_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -6958,7 +6955,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return await self._delete( f"/zones/{zone_id}/dns_records/{dns_record_id}", - body=await async_maybe_transform(body, record_delete_params.RecordDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/dnssec.py b/src/cloudflare/resources/dnssec.py index e4e171d640a..54a5ec093ab 100644 --- a/src/cloudflare/resources/dnssec.py +++ b/src/cloudflare/resources/dnssec.py @@ -24,7 +24,7 @@ from .._base_client import ( make_request_options, ) -from ..types.dnssec import dnssec_edit_params, dnssec_delete_params +from ..types.dnssec import dnssec_edit_params from ..types.dnssec.dnssec import DNSSEC from ..types.dnssec.dnssec_delete_response import DNSSECDeleteResponse @@ -44,7 +44,6 @@ def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -72,7 +71,6 @@ def delete( Optional[DNSSECDeleteResponse], self._delete( f"/zones/{zone_id}/dnssec", - body=maybe_transform(body, dnssec_delete_params.DNSSECDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -208,7 +206,6 @@ async def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -236,7 +233,6 @@ async def delete( Optional[DNSSECDeleteResponse], await self._delete( f"/zones/{zone_id}/dnssec", - body=await async_maybe_transform(body, dnssec_delete_params.DNSSECDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/email_routing/addresses.py b/src/cloudflare/resources/email_routing/addresses.py index 8af8920e626..2ee58159aa2 100644 --- a/src/cloudflare/resources/email_routing/addresses.py +++ b/src/cloudflare/resources/email_routing/addresses.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast from typing_extensions import Literal import httpx @@ -52,7 +52,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Address: + ) -> Optional[Address]: """Create a destination address to forward your emails to. Destination addresses @@ -81,9 +81,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Address]._unwrapper, + post_parser=ResultWrapper[Optional[Address]]._unwrapper, ), - cast_to=cast(Type[Address], ResultWrapper[Address]), + cast_to=cast(Type[Optional[Address]], ResultWrapper[Address]), ) def list( @@ -157,7 +157,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Address: + ) -> Optional[Address]: """ Deletes a specific destination address. @@ -187,9 +187,9 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Address]._unwrapper, + post_parser=ResultWrapper[Optional[Address]]._unwrapper, ), - cast_to=cast(Type[Address], ResultWrapper[Address]), + cast_to=cast(Type[Optional[Address]], ResultWrapper[Address]), ) def get( @@ -203,7 +203,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Address: + ) -> Optional[Address]: """ Gets information for a specific destination email already created. @@ -233,9 +233,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Address]._unwrapper, + post_parser=ResultWrapper[Optional[Address]]._unwrapper, ), - cast_to=cast(Type[Address], ResultWrapper[Address]), + cast_to=cast(Type[Optional[Address]], ResultWrapper[Address]), ) @@ -259,7 +259,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Address: + ) -> Optional[Address]: """Create a destination address to forward your emails to. Destination addresses @@ -288,9 +288,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Address]._unwrapper, + post_parser=ResultWrapper[Optional[Address]]._unwrapper, ), - cast_to=cast(Type[Address], ResultWrapper[Address]), + cast_to=cast(Type[Optional[Address]], ResultWrapper[Address]), ) def list( @@ -364,7 +364,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Address: + ) -> Optional[Address]: """ Deletes a specific destination address. @@ -394,9 +394,9 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Address]._unwrapper, + post_parser=ResultWrapper[Optional[Address]]._unwrapper, ), - cast_to=cast(Type[Address], ResultWrapper[Address]), + cast_to=cast(Type[Optional[Address]], ResultWrapper[Address]), ) async def get( @@ -410,7 +410,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Address: + ) -> Optional[Address]: """ Gets information for a specific destination email already created. @@ -440,9 +440,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Address]._unwrapper, + post_parser=ResultWrapper[Optional[Address]]._unwrapper, ), - cast_to=cast(Type[Address], ResultWrapper[Address]), + cast_to=cast(Type[Optional[Address]], ResultWrapper[Address]), ) diff --git a/src/cloudflare/resources/email_routing/email_routing.py b/src/cloudflare/resources/email_routing/email_routing.py index 1a6ba8f71e0..52ff5a1758d 100644 --- a/src/cloudflare/resources/email_routing/email_routing.py +++ b/src/cloudflare/resources/email_routing/email_routing.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -86,7 +86,7 @@ def disable( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Settings: + ) -> Optional[Settings]: """Disable your Email Routing zone. Also removes additional MX records previously @@ -113,9 +113,9 @@ def disable( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Settings]._unwrapper, + post_parser=ResultWrapper[Optional[Settings]]._unwrapper, ), - cast_to=cast(Type[Settings], ResultWrapper[Settings]), + cast_to=cast(Type[Optional[Settings]], ResultWrapper[Settings]), ) def enable( @@ -129,7 +129,7 @@ def enable( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Settings: + ) -> Optional[Settings]: """Enable you Email Routing zone. Add and lock the necessary MX and SPF records. @@ -155,9 +155,9 @@ def enable( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Settings]._unwrapper, + post_parser=ResultWrapper[Optional[Settings]]._unwrapper, ), - cast_to=cast(Type[Settings], ResultWrapper[Settings]), + cast_to=cast(Type[Optional[Settings]], ResultWrapper[Settings]), ) def get( @@ -170,7 +170,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Settings: + ) -> Optional[Settings]: """ Get information about the settings for your Email Routing zone. @@ -194,9 +194,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Settings]._unwrapper, + post_parser=ResultWrapper[Optional[Settings]]._unwrapper, ), - cast_to=cast(Type[Settings], ResultWrapper[Settings]), + cast_to=cast(Type[Optional[Settings]], ResultWrapper[Settings]), ) @@ -232,7 +232,7 @@ async def disable( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Settings: + ) -> Optional[Settings]: """Disable your Email Routing zone. Also removes additional MX records previously @@ -259,9 +259,9 @@ async def disable( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Settings]._unwrapper, + post_parser=ResultWrapper[Optional[Settings]]._unwrapper, ), - cast_to=cast(Type[Settings], ResultWrapper[Settings]), + cast_to=cast(Type[Optional[Settings]], ResultWrapper[Settings]), ) async def enable( @@ -275,7 +275,7 @@ async def enable( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Settings: + ) -> Optional[Settings]: """Enable you Email Routing zone. Add and lock the necessary MX and SPF records. @@ -301,9 +301,9 @@ async def enable( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Settings]._unwrapper, + post_parser=ResultWrapper[Optional[Settings]]._unwrapper, ), - cast_to=cast(Type[Settings], ResultWrapper[Settings]), + cast_to=cast(Type[Optional[Settings]], ResultWrapper[Settings]), ) async def get( @@ -316,7 +316,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Settings: + ) -> Optional[Settings]: """ Get information about the settings for your Email Routing zone. @@ -340,9 +340,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Settings]._unwrapper, + post_parser=ResultWrapper[Optional[Settings]]._unwrapper, ), - cast_to=cast(Type[Settings], ResultWrapper[Settings]), + cast_to=cast(Type[Optional[Settings]], ResultWrapper[Settings]), ) diff --git a/src/cloudflare/resources/email_routing/rules/catch_alls.py b/src/cloudflare/resources/email_routing/rules/catch_alls.py index bc3761ff093..567104c8c91 100644 --- a/src/cloudflare/resources/email_routing/rules/catch_alls.py +++ b/src/cloudflare/resources/email_routing/rules/catch_alls.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, cast +from typing import Type, Iterable, Optional, cast from typing_extensions import Literal import httpx @@ -56,7 +56,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CatchAllUpdateResponse: + ) -> Optional[CatchAllUpdateResponse]: """ Enable or disable catch-all routing rule, or change action to forward to specific destination address. @@ -98,9 +98,9 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CatchAllUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CatchAllUpdateResponse]]._unwrapper, ), - cast_to=cast(Type[CatchAllUpdateResponse], ResultWrapper[CatchAllUpdateResponse]), + cast_to=cast(Type[Optional[CatchAllUpdateResponse]], ResultWrapper[CatchAllUpdateResponse]), ) def get( @@ -113,7 +113,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CatchAllGetResponse: + ) -> Optional[CatchAllGetResponse]: """ Get information on the default catch-all routing rule. @@ -137,9 +137,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CatchAllGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CatchAllGetResponse]]._unwrapper, ), - cast_to=cast(Type[CatchAllGetResponse], ResultWrapper[CatchAllGetResponse]), + cast_to=cast(Type[Optional[CatchAllGetResponse]], ResultWrapper[CatchAllGetResponse]), ) @@ -166,7 +166,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CatchAllUpdateResponse: + ) -> Optional[CatchAllUpdateResponse]: """ Enable or disable catch-all routing rule, or change action to forward to specific destination address. @@ -208,9 +208,9 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CatchAllUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CatchAllUpdateResponse]]._unwrapper, ), - cast_to=cast(Type[CatchAllUpdateResponse], ResultWrapper[CatchAllUpdateResponse]), + cast_to=cast(Type[Optional[CatchAllUpdateResponse]], ResultWrapper[CatchAllUpdateResponse]), ) async def get( @@ -223,7 +223,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CatchAllGetResponse: + ) -> Optional[CatchAllGetResponse]: """ Get information on the default catch-all routing rule. @@ -247,9 +247,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CatchAllGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CatchAllGetResponse]]._unwrapper, ), - cast_to=cast(Type[CatchAllGetResponse], ResultWrapper[CatchAllGetResponse]), + cast_to=cast(Type[Optional[CatchAllGetResponse]], ResultWrapper[CatchAllGetResponse]), ) diff --git a/src/cloudflare/resources/email_routing/rules/rules.py b/src/cloudflare/resources/email_routing/rules/rules.py index 963df9fbe78..d38f48dfc4a 100644 --- a/src/cloudflare/resources/email_routing/rules/rules.py +++ b/src/cloudflare/resources/email_routing/rules/rules.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, cast +from typing import Type, Iterable, Optional, cast from typing_extensions import Literal import httpx @@ -70,7 +70,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmailRoutingRule: + ) -> Optional[EmailRoutingRule]: """ Rules consist of a set of criteria for matching emails (such as an email being sent to a specific custom email address) plus a set of actions to take on the @@ -116,9 +116,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[EmailRoutingRule]._unwrapper, + post_parser=ResultWrapper[Optional[EmailRoutingRule]]._unwrapper, ), - cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]), + cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]), ) def update( @@ -137,7 +137,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmailRoutingRule: + ) -> Optional[EmailRoutingRule]: """ Update actions and matches, or enable/disable specific routing rules. @@ -185,9 +185,9 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[EmailRoutingRule]._unwrapper, + post_parser=ResultWrapper[Optional[EmailRoutingRule]]._unwrapper, ), - cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]), + cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]), ) def list( @@ -257,7 +257,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmailRoutingRule: + ) -> Optional[EmailRoutingRule]: """ Delete a specific routing rule. @@ -285,9 +285,9 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[EmailRoutingRule]._unwrapper, + post_parser=ResultWrapper[Optional[EmailRoutingRule]]._unwrapper, ), - cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]), + cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]), ) def get( @@ -301,7 +301,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmailRoutingRule: + ) -> Optional[EmailRoutingRule]: """ Get information for a specific routing rule already created. @@ -329,9 +329,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[EmailRoutingRule]._unwrapper, + post_parser=ResultWrapper[Optional[EmailRoutingRule]]._unwrapper, ), - cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]), + cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]), ) @@ -363,7 +363,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmailRoutingRule: + ) -> Optional[EmailRoutingRule]: """ Rules consist of a set of criteria for matching emails (such as an email being sent to a specific custom email address) plus a set of actions to take on the @@ -409,9 +409,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[EmailRoutingRule]._unwrapper, + post_parser=ResultWrapper[Optional[EmailRoutingRule]]._unwrapper, ), - cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]), + cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]), ) async def update( @@ -430,7 +430,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmailRoutingRule: + ) -> Optional[EmailRoutingRule]: """ Update actions and matches, or enable/disable specific routing rules. @@ -478,9 +478,9 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[EmailRoutingRule]._unwrapper, + post_parser=ResultWrapper[Optional[EmailRoutingRule]]._unwrapper, ), - cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]), + cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]), ) def list( @@ -550,7 +550,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmailRoutingRule: + ) -> Optional[EmailRoutingRule]: """ Delete a specific routing rule. @@ -578,9 +578,9 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[EmailRoutingRule]._unwrapper, + post_parser=ResultWrapper[Optional[EmailRoutingRule]]._unwrapper, ), - cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]), + cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]), ) async def get( @@ -594,7 +594,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmailRoutingRule: + ) -> Optional[EmailRoutingRule]: """ Get information for a specific routing rule already created. @@ -622,9 +622,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[EmailRoutingRule]._unwrapper, + post_parser=ResultWrapper[Optional[EmailRoutingRule]]._unwrapper, ), - cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]), + cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]), ) diff --git a/src/cloudflare/resources/filters.py b/src/cloudflare/resources/filters.py index 1204f4347c3..6e9f3b01354 100644 --- a/src/cloudflare/resources/filters.py +++ b/src/cloudflare/resources/filters.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ..types.filters import filter_list_params, filter_create_params, filter_delete_params, filter_update_params +from ..types.filters import filter_list_params, filter_create_params, filter_update_params from ..types.filters.firewall_filter import FirewallFilter from ..types.filters.filter_create_response import FilterCreateResponse @@ -207,7 +207,6 @@ def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -237,7 +236,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._delete( f"/zones/{zone_identifier}/filters/{id}", - body=maybe_transform(body, filter_delete_params.FilterDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -468,7 +466,6 @@ async def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -498,7 +495,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._delete( f"/zones/{zone_identifier}/filters/{id}", - body=await async_maybe_transform(body, filter_delete_params.FilterDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/firewall/access_rules.py b/src/cloudflare/resources/firewall/access_rules.py index db4e862920e..3fac39c90ce 100644 --- a/src/cloudflare/resources/firewall/access_rules.py +++ b/src/cloudflare/resources/firewall/access_rules.py @@ -26,12 +26,7 @@ AsyncPaginator, make_request_options, ) -from ...types.firewall import ( - access_rule_edit_params, - access_rule_list_params, - access_rule_create_params, - access_rule_delete_params, -) +from ...types.firewall import access_rule_edit_params, access_rule_list_params, access_rule_create_params from ...types.firewall.access_rule_get_response import AccessRuleGetResponse from ...types.firewall.access_rule_edit_response import AccessRuleEditResponse from ...types.firewall.access_rule_create_response import AccessRuleCreateResponse @@ -212,7 +207,6 @@ def delete( self, identifier: object, *, - body: object, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -254,7 +248,6 @@ def delete( account_or_zone_id = zone_id return self._delete( f"/{account_or_zone}/{account_or_zone_id}/firewall/access_rules/rules/{identifier}", - body=maybe_transform(body, access_rule_delete_params.AccessRuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -573,7 +566,6 @@ async def delete( self, identifier: object, *, - body: object, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -615,7 +607,6 @@ async def delete( account_or_zone_id = zone_id return await self._delete( f"/{account_or_zone}/{account_or_zone_id}/firewall/access_rules/rules/{identifier}", - body=await async_maybe_transform(body, access_rule_delete_params.AccessRuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/firewall/lockdowns.py b/src/cloudflare/resources/firewall/lockdowns.py index df602e6eaa2..da3be5c7fc9 100644 --- a/src/cloudflare/resources/firewall/lockdowns.py +++ b/src/cloudflare/resources/firewall/lockdowns.py @@ -26,12 +26,7 @@ AsyncPaginator, make_request_options, ) -from ...types.firewall import ( - lockdown_list_params, - lockdown_create_params, - lockdown_delete_params, - lockdown_update_params, -) +from ...types.firewall import lockdown_list_params, lockdown_create_params, lockdown_update_params from ...types.firewall.lockdown import Lockdown from ...types.firewall.lockdown_delete_response import LockdownDeleteResponse @@ -232,7 +227,6 @@ def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -262,7 +256,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._delete( f"/zones/{zone_identifier}/firewall/lockdowns/{id}", - body=maybe_transform(body, lockdown_delete_params.LockdownDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -512,7 +505,6 @@ async def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -542,7 +534,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._delete( f"/zones/{zone_identifier}/firewall/lockdowns/{id}", - body=await async_maybe_transform(body, lockdown_delete_params.LockdownDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/firewall/rules.py b/src/cloudflare/resources/firewall/rules.py index 03d832a407a..9a3a377e651 100644 --- a/src/cloudflare/resources/firewall/rules.py +++ b/src/cloudflare/resources/firewall/rules.py @@ -30,7 +30,6 @@ rule_edit_params, rule_list_params, rule_create_params, - rule_delete_params, rule_update_params, ) from ...types.firewall.firewall_rule import FirewallRule @@ -211,7 +210,6 @@ def delete( id: str, *, zone_identifier: str, - delete_filter_if_unused: bool | 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. extra_headers: Headers | None = None, @@ -227,9 +225,6 @@ def delete( id: The unique identifier of the firewall rule. - delete_filter_if_unused: When true, indicates that Cloudflare should also delete the associated filter if - there are no other firewall rules referencing the filter. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -244,9 +239,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._delete( f"/zones/{zone_identifier}/firewall/rules/{id}", - body=maybe_transform( - {"delete_filter_if_unused": delete_filter_if_unused}, rule_delete_params.RuleDeleteParams - ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -523,7 +515,6 @@ async def delete( id: str, *, zone_identifier: str, - delete_filter_if_unused: bool | 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. extra_headers: Headers | None = None, @@ -539,9 +530,6 @@ async def delete( id: The unique identifier of the firewall rule. - delete_filter_if_unused: When true, indicates that Cloudflare should also delete the associated filter if - there are no other firewall rules referencing the filter. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -556,9 +544,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._delete( f"/zones/{zone_identifier}/firewall/rules/{id}", - body=await async_maybe_transform( - {"delete_filter_if_unused": delete_filter_if_unused}, rule_delete_params.RuleDeleteParams - ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/firewall/ua_rules.py b/src/cloudflare/resources/firewall/ua_rules.py index 16158d802a2..4da2caa2b8e 100644 --- a/src/cloudflare/resources/firewall/ua_rules.py +++ b/src/cloudflare/resources/firewall/ua_rules.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ...types.firewall import ua_rule_list_params, ua_rule_create_params, ua_rule_delete_params, ua_rule_update_params +from ...types.firewall import ua_rule_list_params, ua_rule_create_params, ua_rule_update_params from ...types.firewall.ua_rule_get_response import UARuleGetResponse from ...types.firewall.ua_rule_list_response import UARuleListResponse from ...types.firewall.ua_rule_create_response import UARuleCreateResponse @@ -213,7 +213,6 @@ def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -243,7 +242,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._delete( f"/zones/{zone_identifier}/firewall/ua_rules/{id}", - body=maybe_transform(body, ua_rule_delete_params.UARuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -482,7 +480,6 @@ async def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -512,7 +509,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._delete( f"/zones/{zone_identifier}/firewall/ua_rules/{id}", - body=await async_maybe_transform(body, ua_rule_delete_params.UARuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/firewall/waf/overrides.py b/src/cloudflare/resources/firewall/waf/overrides.py index 2ead7d5a916..682e482964f 100644 --- a/src/cloudflare/resources/firewall/waf/overrides.py +++ b/src/cloudflare/resources/firewall/waf/overrides.py @@ -25,12 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.firewall.waf import ( - override_list_params, - override_create_params, - override_delete_params, - override_update_params, -) +from ....types.firewall.waf import override_list_params, override_create_params, override_update_params from ....types.firewall.waf.override import Override from ....types.firewall.waf.override_delete_response import OverrideDeleteResponse @@ -199,7 +194,6 @@ def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -232,7 +226,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._delete( f"/zones/{zone_identifier}/firewall/waf/overrides/{id}", - body=maybe_transform(body, override_delete_params.OverrideDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -453,7 +446,6 @@ async def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -486,7 +478,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._delete( f"/zones/{zone_identifier}/firewall/waf/overrides/{id}", - body=await async_maybe_transform(body, override_delete_params.OverrideDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/healthchecks/healthchecks.py b/src/cloudflare/resources/healthchecks/healthchecks.py index 8194286f06a..8120a2f6944 100644 --- a/src/cloudflare/resources/healthchecks/healthchecks.py +++ b/src/cloudflare/resources/healthchecks/healthchecks.py @@ -37,7 +37,6 @@ healthcheck_edit_params, healthcheck_list_params, healthcheck_create_params, - healthcheck_delete_params, healthcheck_update_params, ) from ...types.healthchecks.healthcheck import Healthcheck @@ -332,7 +331,6 @@ def delete( healthcheck_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -362,7 +360,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `healthcheck_id` but received {healthcheck_id!r}") return self._delete( f"/zones/{zone_id}/healthchecks/{healthcheck_id}", - body=maybe_transform(body, healthcheck_delete_params.HealthcheckDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -810,7 +807,6 @@ async def delete( healthcheck_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -840,7 +836,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `healthcheck_id` but received {healthcheck_id!r}") return await self._delete( f"/zones/{zone_id}/healthchecks/{healthcheck_id}", - body=await async_maybe_transform(body, healthcheck_delete_params.HealthcheckDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/healthchecks/previews.py b/src/cloudflare/resources/healthchecks/previews.py index 8af9a96911d..c15f4667368 100644 --- a/src/cloudflare/resources/healthchecks/previews.py +++ b/src/cloudflare/resources/healthchecks/previews.py @@ -23,7 +23,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.healthchecks import preview_create_params, preview_delete_params +from ...types.healthchecks import preview_create_params from ...types.healthchecks.healthcheck import Healthcheck from ...types.healthchecks.check_region import CheckRegion from ...types.healthchecks.preview_delete_response import PreviewDeleteResponse @@ -151,7 +151,6 @@ def delete( healthcheck_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -181,7 +180,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `healthcheck_id` but received {healthcheck_id!r}") return self._delete( f"/zones/{zone_id}/healthchecks/preview/{healthcheck_id}", - body=maybe_transform(body, preview_delete_params.PreviewDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -355,7 +353,6 @@ async def delete( healthcheck_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -385,7 +382,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `healthcheck_id` but received {healthcheck_id!r}") return await self._delete( f"/zones/{zone_id}/healthchecks/preview/{healthcheck_id}", - body=await async_maybe_transform(body, preview_delete_params.PreviewDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/hostnames/settings/tls.py b/src/cloudflare/resources/hostnames/settings/tls.py index 0aa85650230..03e541fc6e2 100644 --- a/src/cloudflare/resources/hostnames/settings/tls.py +++ b/src/cloudflare/resources/hostnames/settings/tls.py @@ -55,7 +55,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Setting: + ) -> Optional[Setting]: """ Update the tls setting value for the hostname. @@ -90,9 +90,9 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Setting]._unwrapper, + post_parser=ResultWrapper[Optional[Setting]]._unwrapper, ), - cast_to=cast(Type[Setting], ResultWrapper[Setting]), + cast_to=cast(Type[Optional[Setting]], ResultWrapper[Setting]), ) def delete( @@ -107,7 +107,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSDeleteResponse: + ) -> Optional[TLSDeleteResponse]: """ Delete the tls setting value for the hostname. @@ -139,9 +139,9 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[TLSDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[TLSDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[TLSDeleteResponse], ResultWrapper[TLSDeleteResponse]), + cast_to=cast(Type[Optional[TLSDeleteResponse]], ResultWrapper[TLSDeleteResponse]), ) def get( @@ -211,7 +211,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Setting: + ) -> Optional[Setting]: """ Update the tls setting value for the hostname. @@ -246,9 +246,9 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Setting]._unwrapper, + post_parser=ResultWrapper[Optional[Setting]]._unwrapper, ), - cast_to=cast(Type[Setting], ResultWrapper[Setting]), + cast_to=cast(Type[Optional[Setting]], ResultWrapper[Setting]), ) async def delete( @@ -263,7 +263,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSDeleteResponse: + ) -> Optional[TLSDeleteResponse]: """ Delete the tls setting value for the hostname. @@ -295,9 +295,9 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[TLSDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[TLSDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[TLSDeleteResponse], ResultWrapper[TLSDeleteResponse]), + cast_to=cast(Type[Optional[TLSDeleteResponse]], ResultWrapper[TLSDeleteResponse]), ) async def get( diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py index 1cc52fb05d8..b3ae56942d4 100644 --- a/src/cloudflare/resources/images/v1/v1.py +++ b/src/cloudflare/resources/images/v1/v1.py @@ -57,7 +57,7 @@ AsyncPaginator, make_request_options, ) -from ....types.images import v1_edit_params, v1_list_params, v1_create_params, v1_delete_params +from ....types.images import v1_edit_params, v1_list_params, v1_create_params from ....types.images.image import Image from ....types.images.v1_list_response import V1ListResponse from ....types.images.v1_delete_response import V1DeleteResponse @@ -213,7 +213,6 @@ def delete( image_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -247,7 +246,6 @@ def delete( V1DeleteResponse, self._delete( f"/accounts/{account_id}/images/v1/{image_id}", - body=maybe_transform(body, v1_delete_params.V1DeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -516,7 +514,6 @@ async def delete( image_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -550,7 +547,6 @@ async def delete( V1DeleteResponse, await self._delete( f"/accounts/{account_id}/images/v1/{image_id}", - body=await async_maybe_transform(body, v1_delete_params.V1DeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/images/v1/variants.py b/src/cloudflare/resources/images/v1/variants.py index 67656b3cf42..f8572736699 100644 --- a/src/cloudflare/resources/images/v1/variants.py +++ b/src/cloudflare/resources/images/v1/variants.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.images.v1 import variant_edit_params, variant_create_params, variant_delete_params +from ....types.images.v1 import variant_edit_params, variant_create_params from ....types.images.v1.variant import Variant from ....types.images.v1.variant_get_response import VariantGetResponse from ....types.images.v1.variant_edit_response import VariantEditResponse @@ -141,7 +141,6 @@ def delete( variant_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -171,7 +170,6 @@ def delete( VariantDeleteResponse, self._delete( f"/accounts/{account_id}/images/v1/variants/{variant_id}", - body=maybe_transform(body, variant_delete_params.VariantDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -392,7 +390,6 @@ async def delete( variant_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -422,7 +419,6 @@ async def delete( VariantDeleteResponse, await self._delete( f"/accounts/{account_id}/images/v1/variants/{variant_id}", - body=await async_maybe_transform(body, variant_delete_params.VariantDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/intel/asn/asn.py b/src/cloudflare/resources/intel/asn/asn.py index 2c721f038ed..97ac5cb12f8 100644 --- a/src/cloudflare/resources/intel/asn/asn.py +++ b/src/cloudflare/resources/intel/asn/asn.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -56,7 +56,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ASN: + ) -> Optional[ASN]: """ Get ASN Overview @@ -80,9 +80,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ASN]._unwrapper, + post_parser=ResultWrapper[Optional[ASN]]._unwrapper, ), - cast_to=cast(Type[ASN], ResultWrapper[int]), + cast_to=cast(Type[Optional[ASN]], ResultWrapper[int]), ) @@ -110,7 +110,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ASN: + ) -> Optional[ASN]: """ Get ASN Overview @@ -134,9 +134,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[ASN]._unwrapper, + post_parser=ResultWrapper[Optional[ASN]]._unwrapper, ), - cast_to=cast(Type[ASN], ResultWrapper[int]), + cast_to=cast(Type[Optional[ASN]], ResultWrapper[int]), ) diff --git a/src/cloudflare/resources/intel/attack_surface_report/issues.py b/src/cloudflare/resources/intel/attack_surface_report/issues.py index 357a1f48030..d4f6cca2c9f 100644 --- a/src/cloudflare/resources/intel/attack_surface_report/issues.py +++ b/src/cloudflare/resources/intel/attack_surface_report/issues.py @@ -33,9 +33,6 @@ issue_severity_params, ) from ....types.intel.attack_surface_report.issue_type import IssueType -from ....types.intel.attack_surface_report.product_param import ProductParam -from ....types.intel.attack_surface_report.subject_param import SubjectParam -from ....types.intel.attack_surface_report.issue_class_param import IssueClassParam from ....types.intel.attack_surface_report.issue_list_response import IssueListResponse from ....types.intel.attack_surface_report.issue_type_response import IssueTypeResponse from ....types.intel.attack_surface_report.issue_class_response import IssueClassResponse @@ -60,18 +57,18 @@ def list( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: IssueClassParam | NotGiven = NOT_GIVEN, - issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class: List[str] | NotGiven = NOT_GIVEN, + issue_class_neq: List[str] | NotGiven = NOT_GIVEN, issue_type: List[IssueType] | NotGiven = NOT_GIVEN, issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, - product: ProductParam | NotGiven = NOT_GIVEN, - product_neq: ProductParam | NotGiven = NOT_GIVEN, + product: List[str] | NotGiven = NOT_GIVEN, + product_neq: List[str] | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: SubjectParam | NotGiven = NOT_GIVEN, - subject_neq: SubjectParam | NotGiven = NOT_GIVEN, + subject: List[str] | NotGiven = NOT_GIVEN, + subject_neq: List[str] | 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. extra_headers: Headers | None = None, @@ -134,16 +131,16 @@ def class_( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: IssueClassParam | NotGiven = NOT_GIVEN, - issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class: List[str] | NotGiven = NOT_GIVEN, + issue_class_neq: List[str] | NotGiven = NOT_GIVEN, issue_type: List[IssueType] | NotGiven = NOT_GIVEN, issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: ProductParam | NotGiven = NOT_GIVEN, - product_neq: ProductParam | NotGiven = NOT_GIVEN, + product: List[str] | NotGiven = NOT_GIVEN, + product_neq: List[str] | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: SubjectParam | NotGiven = NOT_GIVEN, - subject_neq: SubjectParam | NotGiven = NOT_GIVEN, + subject: List[str] | NotGiven = NOT_GIVEN, + subject_neq: List[str] | 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. extra_headers: Headers | None = None, @@ -249,16 +246,16 @@ def severity( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: IssueClassParam | NotGiven = NOT_GIVEN, - issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class: List[str] | NotGiven = NOT_GIVEN, + issue_class_neq: List[str] | NotGiven = NOT_GIVEN, issue_type: List[IssueType] | NotGiven = NOT_GIVEN, issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: ProductParam | NotGiven = NOT_GIVEN, - product_neq: ProductParam | NotGiven = NOT_GIVEN, + product: List[str] | NotGiven = NOT_GIVEN, + product_neq: List[str] | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: SubjectParam | NotGiven = NOT_GIVEN, - subject_neq: SubjectParam | NotGiven = NOT_GIVEN, + subject: List[str] | NotGiven = NOT_GIVEN, + subject_neq: List[str] | 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. extra_headers: Headers | None = None, @@ -315,16 +312,16 @@ def type( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: IssueClassParam | NotGiven = NOT_GIVEN, - issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class: List[str] | NotGiven = NOT_GIVEN, + issue_class_neq: List[str] | NotGiven = NOT_GIVEN, issue_type: List[IssueType] | NotGiven = NOT_GIVEN, issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: ProductParam | NotGiven = NOT_GIVEN, - product_neq: ProductParam | NotGiven = NOT_GIVEN, + product: List[str] | NotGiven = NOT_GIVEN, + product_neq: List[str] | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: SubjectParam | NotGiven = NOT_GIVEN, - subject_neq: SubjectParam | NotGiven = NOT_GIVEN, + subject: List[str] | NotGiven = NOT_GIVEN, + subject_neq: List[str] | 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. extra_headers: Headers | None = None, @@ -391,18 +388,18 @@ def list( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: IssueClassParam | NotGiven = NOT_GIVEN, - issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class: List[str] | NotGiven = NOT_GIVEN, + issue_class_neq: List[str] | NotGiven = NOT_GIVEN, issue_type: List[IssueType] | NotGiven = NOT_GIVEN, issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, - product: ProductParam | NotGiven = NOT_GIVEN, - product_neq: ProductParam | NotGiven = NOT_GIVEN, + product: List[str] | NotGiven = NOT_GIVEN, + product_neq: List[str] | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: SubjectParam | NotGiven = NOT_GIVEN, - subject_neq: SubjectParam | NotGiven = NOT_GIVEN, + subject: List[str] | NotGiven = NOT_GIVEN, + subject_neq: List[str] | 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. extra_headers: Headers | None = None, @@ -465,16 +462,16 @@ async def class_( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: IssueClassParam | NotGiven = NOT_GIVEN, - issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class: List[str] | NotGiven = NOT_GIVEN, + issue_class_neq: List[str] | NotGiven = NOT_GIVEN, issue_type: List[IssueType] | NotGiven = NOT_GIVEN, issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: ProductParam | NotGiven = NOT_GIVEN, - product_neq: ProductParam | NotGiven = NOT_GIVEN, + product: List[str] | NotGiven = NOT_GIVEN, + product_neq: List[str] | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: SubjectParam | NotGiven = NOT_GIVEN, - subject_neq: SubjectParam | NotGiven = NOT_GIVEN, + subject: List[str] | NotGiven = NOT_GIVEN, + subject_neq: List[str] | 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. extra_headers: Headers | None = None, @@ -580,16 +577,16 @@ async def severity( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: IssueClassParam | NotGiven = NOT_GIVEN, - issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class: List[str] | NotGiven = NOT_GIVEN, + issue_class_neq: List[str] | NotGiven = NOT_GIVEN, issue_type: List[IssueType] | NotGiven = NOT_GIVEN, issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: ProductParam | NotGiven = NOT_GIVEN, - product_neq: ProductParam | NotGiven = NOT_GIVEN, + product: List[str] | NotGiven = NOT_GIVEN, + product_neq: List[str] | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: SubjectParam | NotGiven = NOT_GIVEN, - subject_neq: SubjectParam | NotGiven = NOT_GIVEN, + subject: List[str] | NotGiven = NOT_GIVEN, + subject_neq: List[str] | 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. extra_headers: Headers | None = None, @@ -646,16 +643,16 @@ async def type( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: IssueClassParam | NotGiven = NOT_GIVEN, - issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class: List[str] | NotGiven = NOT_GIVEN, + issue_class_neq: List[str] | NotGiven = NOT_GIVEN, issue_type: List[IssueType] | NotGiven = NOT_GIVEN, issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: ProductParam | NotGiven = NOT_GIVEN, - product_neq: ProductParam | NotGiven = NOT_GIVEN, + product: List[str] | NotGiven = NOT_GIVEN, + product_neq: List[str] | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: SubjectParam | NotGiven = NOT_GIVEN, - subject_neq: SubjectParam | NotGiven = NOT_GIVEN, + subject: List[str] | NotGiven = NOT_GIVEN, + subject_neq: List[str] | 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. extra_headers: Headers | None = None, diff --git a/src/cloudflare/resources/intel/domains/domains.py b/src/cloudflare/resources/intel/domains/domains.py index 15b1171aca6..81e9d09a452 100644 --- a/src/cloudflare/resources/intel/domains/domains.py +++ b/src/cloudflare/resources/intel/domains/domains.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -61,7 +61,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Domain: + ) -> Optional[Domain]: """ Get Domain Details @@ -86,9 +86,9 @@ def get( extra_body=extra_body, timeout=timeout, query=maybe_transform({"domain": domain}, domain_get_params.DomainGetParams), - post_parser=ResultWrapper[Domain]._unwrapper, + post_parser=ResultWrapper[Optional[Domain]]._unwrapper, ), - cast_to=cast(Type[Domain], ResultWrapper[Domain]), + cast_to=cast(Type[Optional[Domain]], ResultWrapper[Domain]), ) @@ -116,7 +116,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Domain: + ) -> Optional[Domain]: """ Get Domain Details @@ -141,9 +141,9 @@ async def get( extra_body=extra_body, timeout=timeout, query=await async_maybe_transform({"domain": domain}, domain_get_params.DomainGetParams), - post_parser=ResultWrapper[Domain]._unwrapper, + post_parser=ResultWrapper[Optional[Domain]]._unwrapper, ), - cast_to=cast(Type[Domain], ResultWrapper[Domain]), + cast_to=cast(Type[Optional[Domain]], ResultWrapper[Domain]), ) diff --git a/src/cloudflare/resources/intel/indicator_feeds/__init__.py b/src/cloudflare/resources/intel/indicator_feeds/__init__.py index a562b4be04d..3e67dcae5bc 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/__init__.py +++ b/src/cloudflare/resources/intel/indicator_feeds/__init__.py @@ -1,5 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .snapshots import ( + SnapshotsResource, + AsyncSnapshotsResource, + SnapshotsResourceWithRawResponse, + AsyncSnapshotsResourceWithRawResponse, + SnapshotsResourceWithStreamingResponse, + AsyncSnapshotsResourceWithStreamingResponse, +) from .permissions import ( PermissionsResource, AsyncPermissionsResource, @@ -18,6 +26,12 @@ ) __all__ = [ + "SnapshotsResource", + "AsyncSnapshotsResource", + "SnapshotsResourceWithRawResponse", + "AsyncSnapshotsResourceWithRawResponse", + "SnapshotsResourceWithStreamingResponse", + "AsyncSnapshotsResourceWithStreamingResponse", "PermissionsResource", "AsyncPermissionsResource", "PermissionsResourceWithRawResponse", diff --git a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py index c76f8b588c9..721bab7afab 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py +++ b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -11,6 +11,14 @@ maybe_transform, async_maybe_transform, ) +from .snapshots import ( + SnapshotsResource, + AsyncSnapshotsResource, + SnapshotsResourceWithRawResponse, + AsyncSnapshotsResourceWithRawResponse, + SnapshotsResourceWithStreamingResponse, + AsyncSnapshotsResourceWithStreamingResponse, +) from ...._compat import cached_property from .permissions import ( PermissionsResource, @@ -43,6 +51,10 @@ class IndicatorFeedsResource(SyncAPIResource): + @cached_property + def snapshots(self) -> SnapshotsResource: + return SnapshotsResource(self._client) + @cached_property def permissions(self) -> PermissionsResource: return PermissionsResource(self._client) @@ -67,7 +79,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedCreateResponse: + ) -> Optional[IndicatorFeedCreateResponse]: """ Create new indicator feed @@ -102,9 +114,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IndicatorFeedCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IndicatorFeedCreateResponse]]._unwrapper, ), - cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]), + cast_to=cast(Type[Optional[IndicatorFeedCreateResponse]], ResultWrapper[IndicatorFeedCreateResponse]), ) def update( @@ -112,23 +124,29 @@ def update( feed_id: int, *, account_id: str, - source: str | NotGiven = NOT_GIVEN, + feed_description: str | NotGiven = NOT_GIVEN, + is_attributable: bool | NotGiven = NOT_GIVEN, + is_public: bool | 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedUpdateResponse: + ) -> Optional[IndicatorFeedUpdateResponse]: """ - Update indicator feed data + Update indicator feed metadata Args: account_id: Identifier feed_id: Indicator feed ID - source: The file to upload + feed_description: The new description of the feed + + is_attributable: The new is_attributable value of the feed + + is_public: The new is_public value of the feed extra_headers: Send extra headers @@ -141,16 +159,23 @@ def update( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._put( - f"/accounts/{account_id}/intel/indicator-feeds/{feed_id}/snapshot", - body=maybe_transform({"source": source}, indicator_feed_update_params.IndicatorFeedUpdateParams), + f"/accounts/{account_id}/intel/indicator-feeds/{feed_id}", + body=maybe_transform( + { + "feed_description": feed_description, + "is_attributable": is_attributable, + "is_public": is_public, + }, + indicator_feed_update_params.IndicatorFeedUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IndicatorFeedUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IndicatorFeedUpdateResponse]]._unwrapper, ), - cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]), + cast_to=cast(Type[Optional[IndicatorFeedUpdateResponse]], ResultWrapper[IndicatorFeedUpdateResponse]), ) def list( @@ -239,7 +264,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedGetResponse: + ) -> Optional[IndicatorFeedGetResponse]: """ Get indicator feed metadata @@ -265,13 +290,17 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IndicatorFeedGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IndicatorFeedGetResponse]]._unwrapper, ), - cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]), + cast_to=cast(Type[Optional[IndicatorFeedGetResponse]], ResultWrapper[IndicatorFeedGetResponse]), ) class AsyncIndicatorFeedsResource(AsyncAPIResource): + @cached_property + def snapshots(self) -> AsyncSnapshotsResource: + return AsyncSnapshotsResource(self._client) + @cached_property def permissions(self) -> AsyncPermissionsResource: return AsyncPermissionsResource(self._client) @@ -296,7 +325,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedCreateResponse: + ) -> Optional[IndicatorFeedCreateResponse]: """ Create new indicator feed @@ -331,9 +360,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IndicatorFeedCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IndicatorFeedCreateResponse]]._unwrapper, ), - cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]), + cast_to=cast(Type[Optional[IndicatorFeedCreateResponse]], ResultWrapper[IndicatorFeedCreateResponse]), ) async def update( @@ -341,23 +370,29 @@ async def update( feed_id: int, *, account_id: str, - source: str | NotGiven = NOT_GIVEN, + feed_description: str | NotGiven = NOT_GIVEN, + is_attributable: bool | NotGiven = NOT_GIVEN, + is_public: bool | 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedUpdateResponse: + ) -> Optional[IndicatorFeedUpdateResponse]: """ - Update indicator feed data + Update indicator feed metadata Args: account_id: Identifier feed_id: Indicator feed ID - source: The file to upload + feed_description: The new description of the feed + + is_attributable: The new is_attributable value of the feed + + is_public: The new is_public value of the feed extra_headers: Send extra headers @@ -370,18 +405,23 @@ async def update( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._put( - f"/accounts/{account_id}/intel/indicator-feeds/{feed_id}/snapshot", + f"/accounts/{account_id}/intel/indicator-feeds/{feed_id}", body=await async_maybe_transform( - {"source": source}, indicator_feed_update_params.IndicatorFeedUpdateParams + { + "feed_description": feed_description, + "is_attributable": is_attributable, + "is_public": is_public, + }, + indicator_feed_update_params.IndicatorFeedUpdateParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IndicatorFeedUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IndicatorFeedUpdateResponse]]._unwrapper, ), - cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]), + cast_to=cast(Type[Optional[IndicatorFeedUpdateResponse]], ResultWrapper[IndicatorFeedUpdateResponse]), ) def list( @@ -470,7 +510,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedGetResponse: + ) -> Optional[IndicatorFeedGetResponse]: """ Get indicator feed metadata @@ -496,9 +536,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[IndicatorFeedGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[IndicatorFeedGetResponse]]._unwrapper, ), - cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]), + cast_to=cast(Type[Optional[IndicatorFeedGetResponse]], ResultWrapper[IndicatorFeedGetResponse]), ) @@ -522,6 +562,10 @@ def __init__(self, indicator_feeds: IndicatorFeedsResource) -> None: indicator_feeds.get, ) + @cached_property + def snapshots(self) -> SnapshotsResourceWithRawResponse: + return SnapshotsResourceWithRawResponse(self._indicator_feeds.snapshots) + @cached_property def permissions(self) -> PermissionsResourceWithRawResponse: return PermissionsResourceWithRawResponse(self._indicator_feeds.permissions) @@ -547,6 +591,10 @@ def __init__(self, indicator_feeds: AsyncIndicatorFeedsResource) -> None: indicator_feeds.get, ) + @cached_property + def snapshots(self) -> AsyncSnapshotsResourceWithRawResponse: + return AsyncSnapshotsResourceWithRawResponse(self._indicator_feeds.snapshots) + @cached_property def permissions(self) -> AsyncPermissionsResourceWithRawResponse: return AsyncPermissionsResourceWithRawResponse(self._indicator_feeds.permissions) @@ -572,6 +620,10 @@ def __init__(self, indicator_feeds: IndicatorFeedsResource) -> None: indicator_feeds.get, ) + @cached_property + def snapshots(self) -> SnapshotsResourceWithStreamingResponse: + return SnapshotsResourceWithStreamingResponse(self._indicator_feeds.snapshots) + @cached_property def permissions(self) -> PermissionsResourceWithStreamingResponse: return PermissionsResourceWithStreamingResponse(self._indicator_feeds.permissions) @@ -597,6 +649,10 @@ def __init__(self, indicator_feeds: AsyncIndicatorFeedsResource) -> None: indicator_feeds.get, ) + @cached_property + def snapshots(self) -> AsyncSnapshotsResourceWithStreamingResponse: + return AsyncSnapshotsResourceWithStreamingResponse(self._indicator_feeds.snapshots) + @cached_property def permissions(self) -> AsyncPermissionsResourceWithStreamingResponse: return AsyncPermissionsResourceWithStreamingResponse(self._indicator_feeds.permissions) diff --git a/src/cloudflare/resources/intel/indicator_feeds/permissions.py b/src/cloudflare/resources/intel/indicator_feeds/permissions.py index 9558b5e48ff..fe0f399ebdd 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/permissions.py +++ b/src/cloudflare/resources/intel/indicator_feeds/permissions.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -52,7 +52,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionCreateResponse: + ) -> Optional[PermissionCreateResponse]: """ Grant permission to indicator feed @@ -87,9 +87,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[PermissionCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[PermissionCreateResponse]]._unwrapper, ), - cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]), + cast_to=cast(Type[Optional[PermissionCreateResponse]], ResultWrapper[PermissionCreateResponse]), ) def list( @@ -102,7 +102,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionListResponse: + ) -> Optional[PermissionListResponse]: """ List indicator feed permissions @@ -126,9 +126,9 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[PermissionListResponse]._unwrapper, + post_parser=ResultWrapper[Optional[PermissionListResponse]]._unwrapper, ), - cast_to=cast(Type[PermissionListResponse], ResultWrapper[PermissionListResponse]), + cast_to=cast(Type[Optional[PermissionListResponse]], ResultWrapper[PermissionListResponse]), ) def delete( @@ -143,7 +143,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionDeleteResponse: + ) -> Optional[PermissionDeleteResponse]: """ Revoke permission to indicator feed @@ -178,9 +178,9 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[PermissionDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[PermissionDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]), + cast_to=cast(Type[Optional[PermissionDeleteResponse]], ResultWrapper[PermissionDeleteResponse]), ) @@ -205,7 +205,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionCreateResponse: + ) -> Optional[PermissionCreateResponse]: """ Grant permission to indicator feed @@ -240,9 +240,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[PermissionCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[PermissionCreateResponse]]._unwrapper, ), - cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]), + cast_to=cast(Type[Optional[PermissionCreateResponse]], ResultWrapper[PermissionCreateResponse]), ) async def list( @@ -255,7 +255,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionListResponse: + ) -> Optional[PermissionListResponse]: """ List indicator feed permissions @@ -279,9 +279,9 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[PermissionListResponse]._unwrapper, + post_parser=ResultWrapper[Optional[PermissionListResponse]]._unwrapper, ), - cast_to=cast(Type[PermissionListResponse], ResultWrapper[PermissionListResponse]), + cast_to=cast(Type[Optional[PermissionListResponse]], ResultWrapper[PermissionListResponse]), ) async def delete( @@ -296,7 +296,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionDeleteResponse: + ) -> Optional[PermissionDeleteResponse]: """ Revoke permission to indicator feed @@ -331,9 +331,9 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[PermissionDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[PermissionDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]), + cast_to=cast(Type[Optional[PermissionDeleteResponse]], ResultWrapper[PermissionDeleteResponse]), ) diff --git a/src/cloudflare/resources/intel/indicator_feeds/snapshots.py b/src/cloudflare/resources/intel/indicator_feeds/snapshots.py new file mode 100644 index 00000000000..3f05ef5b71a --- /dev/null +++ b/src/cloudflare/resources/intel/indicator_feeds/snapshots.py @@ -0,0 +1,177 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, Optional, cast + +import httpx + +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import ( + maybe_transform, + async_maybe_transform, +) +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._wrappers import ResultWrapper +from ...._base_client import ( + make_request_options, +) +from ....types.intel.indicator_feeds import snapshot_update_params +from ....types.intel.indicator_feeds.snapshot_update_response import SnapshotUpdateResponse + +__all__ = ["SnapshotsResource", "AsyncSnapshotsResource"] + + +class SnapshotsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> SnapshotsResourceWithRawResponse: + return SnapshotsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> SnapshotsResourceWithStreamingResponse: + return SnapshotsResourceWithStreamingResponse(self) + + def update( + self, + feed_id: int, + *, + account_id: str, + source: str | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[SnapshotUpdateResponse]: + """ + Update indicator feed data + + Args: + account_id: Identifier + + feed_id: Indicator feed ID + + source: The file to upload + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._put( + f"/accounts/{account_id}/intel/indicator-feeds/{feed_id}/snapshot", + body=maybe_transform({"source": source}, snapshot_update_params.SnapshotUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[SnapshotUpdateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[SnapshotUpdateResponse]], ResultWrapper[SnapshotUpdateResponse]), + ) + + +class AsyncSnapshotsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncSnapshotsResourceWithRawResponse: + return AsyncSnapshotsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncSnapshotsResourceWithStreamingResponse: + return AsyncSnapshotsResourceWithStreamingResponse(self) + + async def update( + self, + feed_id: int, + *, + account_id: str, + source: str | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[SnapshotUpdateResponse]: + """ + Update indicator feed data + + Args: + account_id: Identifier + + feed_id: Indicator feed ID + + source: The file to upload + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._put( + f"/accounts/{account_id}/intel/indicator-feeds/{feed_id}/snapshot", + body=await async_maybe_transform({"source": source}, snapshot_update_params.SnapshotUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[SnapshotUpdateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[SnapshotUpdateResponse]], ResultWrapper[SnapshotUpdateResponse]), + ) + + +class SnapshotsResourceWithRawResponse: + def __init__(self, snapshots: SnapshotsResource) -> None: + self._snapshots = snapshots + + self.update = to_raw_response_wrapper( + snapshots.update, + ) + + +class AsyncSnapshotsResourceWithRawResponse: + def __init__(self, snapshots: AsyncSnapshotsResource) -> None: + self._snapshots = snapshots + + self.update = async_to_raw_response_wrapper( + snapshots.update, + ) + + +class SnapshotsResourceWithStreamingResponse: + def __init__(self, snapshots: SnapshotsResource) -> None: + self._snapshots = snapshots + + self.update = to_streamed_response_wrapper( + snapshots.update, + ) + + +class AsyncSnapshotsResourceWithStreamingResponse: + def __init__(self, snapshots: AsyncSnapshotsResource) -> None: + self._snapshots = snapshots + + self.update = async_to_streamed_response_wrapper( + snapshots.update, + ) diff --git a/src/cloudflare/resources/intel/miscategorizations.py b/src/cloudflare/resources/intel/miscategorizations.py index 266ed05d040..bea63b18176 100644 --- a/src/cloudflare/resources/intel/miscategorizations.py +++ b/src/cloudflare/resources/intel/miscategorizations.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Iterable, cast +from typing import Any, Iterable, Optional, cast from typing_extensions import Literal import httpx @@ -56,7 +56,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MiscategorizationCreateResponse: + ) -> Optional[MiscategorizationCreateResponse]: """ Create Miscategorization @@ -88,7 +88,7 @@ def create( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return cast( - MiscategorizationCreateResponse, + Optional[MiscategorizationCreateResponse], self._post( f"/accounts/{account_id}/intel/miscategorization", body=maybe_transform( @@ -108,7 +108,7 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MiscategorizationCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[MiscategorizationCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[MiscategorizationCreateResponse] @@ -143,7 +143,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MiscategorizationCreateResponse: + ) -> Optional[MiscategorizationCreateResponse]: """ Create Miscategorization @@ -175,7 +175,7 @@ async def create( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return cast( - MiscategorizationCreateResponse, + Optional[MiscategorizationCreateResponse], await self._post( f"/accounts/{account_id}/intel/miscategorization", body=await async_maybe_transform( @@ -195,7 +195,7 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MiscategorizationCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[MiscategorizationCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[MiscategorizationCreateResponse] diff --git a/src/cloudflare/resources/intel/whois.py b/src/cloudflare/resources/intel/whois.py index 570d37b6095..d8f2efe389c 100644 --- a/src/cloudflare/resources/intel/whois.py +++ b/src/cloudflare/resources/intel/whois.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -24,7 +24,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.intel.whois import Whois +from ...types.intel.whois_get_response import WhoisGetResponse __all__ = ["WhoisResource", "AsyncWhoisResource"] @@ -49,7 +49,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Whois: + ) -> Optional[WhoisGetResponse]: """ Get WHOIS Record @@ -74,9 +74,9 @@ def get( extra_body=extra_body, timeout=timeout, query=maybe_transform({"domain": domain}, whois_get_params.WhoisGetParams), - post_parser=ResultWrapper[Whois]._unwrapper, + post_parser=ResultWrapper[Optional[WhoisGetResponse]]._unwrapper, ), - cast_to=cast(Type[Whois], ResultWrapper[Whois]), + cast_to=cast(Type[Optional[WhoisGetResponse]], ResultWrapper[WhoisGetResponse]), ) @@ -100,7 +100,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Whois: + ) -> Optional[WhoisGetResponse]: """ Get WHOIS Record @@ -125,9 +125,9 @@ async def get( extra_body=extra_body, timeout=timeout, query=await async_maybe_transform({"domain": domain}, whois_get_params.WhoisGetParams), - post_parser=ResultWrapper[Whois]._unwrapper, + post_parser=ResultWrapper[Optional[WhoisGetResponse]]._unwrapper, ), - cast_to=cast(Type[Whois], ResultWrapper[Whois]), + cast_to=cast(Type[Optional[WhoisGetResponse]], ResultWrapper[WhoisGetResponse]), ) diff --git a/src/cloudflare/resources/keyless_certificates.py b/src/cloudflare/resources/keyless_certificates.py index 9f805b11e3e..2d68350af29 100644 --- a/src/cloudflare/resources/keyless_certificates.py +++ b/src/cloudflare/resources/keyless_certificates.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -26,11 +26,7 @@ make_request_options, ) from ..types.custom_hostnames import BundleMethod -from ..types.keyless_certificates import ( - keyless_certificate_edit_params, - keyless_certificate_create_params, - keyless_certificate_delete_params, -) +from ..types.keyless_certificates import keyless_certificate_edit_params, keyless_certificate_create_params from ..types.custom_hostnames.bundle_method import BundleMethod from ..types.keyless_certificates.tunnel_param import TunnelParam from ..types.keyless_certificates.keyless_certificate import KeylessCertificate @@ -64,7 +60,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificate: + ) -> Optional[KeylessCertificate]: """ Create Keyless SSL Configuration @@ -115,9 +111,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[KeylessCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[KeylessCertificate]]._unwrapper, ), - cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]), + cast_to=cast(Type[Optional[KeylessCertificate]], ResultWrapper[KeylessCertificate]), ) def list( @@ -161,14 +157,13 @@ def delete( keyless_certificate_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificateDeleteResponse: + ) -> Optional[KeylessCertificateDeleteResponse]: """ Delete Keyless SSL Configuration @@ -193,15 +188,16 @@ def delete( ) return self._delete( f"/zones/{zone_id}/keyless_certificates/{keyless_certificate_id}", - body=maybe_transform(body, keyless_certificate_delete_params.KeylessCertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[KeylessCertificateDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[KeylessCertificateDeleteResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[KeylessCertificateDeleteResponse]], ResultWrapper[KeylessCertificateDeleteResponse] ), - cast_to=cast(Type[KeylessCertificateDeleteResponse], ResultWrapper[KeylessCertificateDeleteResponse]), ) def edit( @@ -220,7 +216,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificate: + ) -> Optional[KeylessCertificate]: """This will update attributes of a Keyless SSL. Consists of one or more of the @@ -273,9 +269,9 @@ def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[KeylessCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[KeylessCertificate]]._unwrapper, ), - cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]), + cast_to=cast(Type[Optional[KeylessCertificate]], ResultWrapper[KeylessCertificate]), ) def get( @@ -289,7 +285,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificate: + ) -> Optional[KeylessCertificate]: """ Get details for one Keyless SSL configuration. @@ -319,9 +315,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[KeylessCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[KeylessCertificate]]._unwrapper, ), - cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]), + cast_to=cast(Type[Optional[KeylessCertificate]], ResultWrapper[KeylessCertificate]), ) @@ -350,7 +346,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificate: + ) -> Optional[KeylessCertificate]: """ Create Keyless SSL Configuration @@ -401,9 +397,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[KeylessCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[KeylessCertificate]]._unwrapper, ), - cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]), + cast_to=cast(Type[Optional[KeylessCertificate]], ResultWrapper[KeylessCertificate]), ) def list( @@ -447,14 +443,13 @@ async def delete( keyless_certificate_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificateDeleteResponse: + ) -> Optional[KeylessCertificateDeleteResponse]: """ Delete Keyless SSL Configuration @@ -479,15 +474,16 @@ async def delete( ) return await self._delete( f"/zones/{zone_id}/keyless_certificates/{keyless_certificate_id}", - body=await async_maybe_transform(body, keyless_certificate_delete_params.KeylessCertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[KeylessCertificateDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[KeylessCertificateDeleteResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[KeylessCertificateDeleteResponse]], ResultWrapper[KeylessCertificateDeleteResponse] ), - cast_to=cast(Type[KeylessCertificateDeleteResponse], ResultWrapper[KeylessCertificateDeleteResponse]), ) async def edit( @@ -506,7 +502,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificate: + ) -> Optional[KeylessCertificate]: """This will update attributes of a Keyless SSL. Consists of one or more of the @@ -559,9 +555,9 @@ async def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[KeylessCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[KeylessCertificate]]._unwrapper, ), - cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]), + cast_to=cast(Type[Optional[KeylessCertificate]], ResultWrapper[KeylessCertificate]), ) async def get( @@ -575,7 +571,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificate: + ) -> Optional[KeylessCertificate]: """ Get details for one Keyless SSL configuration. @@ -605,9 +601,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[KeylessCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[KeylessCertificate]]._unwrapper, ), - cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]), + cast_to=cast(Type[Optional[KeylessCertificate]], ResultWrapper[KeylessCertificate]), ) diff --git a/src/cloudflare/resources/kv/namespaces/bulk.py b/src/cloudflare/resources/kv/namespaces/bulk.py index 0df5b19e076..9c9ee270e5c 100644 --- a/src/cloudflare/resources/kv/namespaces/bulk.py +++ b/src/cloudflare/resources/kv/namespaces/bulk.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Iterable, cast +from typing import Any, Iterable, cast import httpx @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.kv.namespaces import bulk_delete_params, bulk_update_params +from ....types.kv.namespaces import bulk_update_params from ....types.kv.namespaces.bulk_delete_response import BulkDeleteResponse from ....types.kv.namespaces.bulk_update_response import BulkUpdateResponse @@ -101,7 +101,6 @@ def delete( namespace_id: str, *, account_id: str, - body: List[str], # 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. extra_headers: Headers | None = None, @@ -135,7 +134,6 @@ def delete( BulkDeleteResponse, self._delete( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/bulk", - body=maybe_transform(body, bulk_delete_params.BulkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -221,7 +219,6 @@ async def delete( namespace_id: str, *, account_id: str, - body: List[str], # 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. extra_headers: Headers | None = None, @@ -255,7 +252,6 @@ async def delete( BulkDeleteResponse, await self._delete( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/bulk", - body=await async_maybe_transform(body, bulk_delete_params.BulkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/kv/namespaces/namespaces.py b/src/cloudflare/resources/kv/namespaces/namespaces.py index 0eda74e6c1c..ae2f40cc23f 100644 --- a/src/cloudflare/resources/kv/namespaces/namespaces.py +++ b/src/cloudflare/resources/kv/namespaces/namespaces.py @@ -45,12 +45,7 @@ async_maybe_transform, ) from ...._compat import cached_property -from ....types.kv import ( - namespace_list_params, - namespace_create_params, - namespace_delete_params, - namespace_update_params, -) +from ....types.kv import namespace_list_params, namespace_create_params, namespace_update_params from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( to_raw_response_wrapper, @@ -260,7 +255,6 @@ def delete( namespace_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -292,7 +286,6 @@ def delete( NamespaceDeleteResponse, self._delete( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}", - body=maybe_transform(body, namespace_delete_params.NamespaceDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -496,7 +489,6 @@ async def delete( namespace_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -528,7 +520,6 @@ async def delete( NamespaceDeleteResponse, await self._delete( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}", - body=await async_maybe_transform(body, namespace_delete_params.NamespaceDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/kv/namespaces/values.py b/src/cloudflare/resources/kv/namespaces/values.py index 358a679aaf9..011fb16adde 100644 --- a/src/cloudflare/resources/kv/namespaces/values.py +++ b/src/cloudflare/resources/kv/namespaces/values.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.kv.namespaces import value_delete_params, value_update_params +from ....types.kv.namespaces import value_update_params from ....types.kv.namespaces.value_delete_response import ValueDeleteResponse from ....types.kv.namespaces.value_update_response import ValueUpdateResponse @@ -119,7 +119,6 @@ def delete( *, account_id: str, namespace_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -158,7 +157,6 @@ def delete( ValueDeleteResponse, self._delete( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", - body=maybe_transform(body, value_delete_params.ValueDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -313,7 +311,6 @@ async def delete( *, account_id: str, namespace_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -352,7 +349,6 @@ async def delete( ValueDeleteResponse, await self._delete( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", - body=await async_maybe_transform(body, value_delete_params.ValueDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/load_balancers/load_balancers.py b/src/cloudflare/resources/load_balancers/load_balancers.py index 829ffadc328..251ee8f97bb 100644 --- a/src/cloudflare/resources/load_balancers/load_balancers.py +++ b/src/cloudflare/resources/load_balancers/load_balancers.py @@ -3,7 +3,6 @@ from __future__ import annotations from typing import List, Type, Iterable, cast -from typing_extensions import Literal import httpx @@ -69,14 +68,17 @@ ) from .monitors.monitors import MonitorsResource, AsyncMonitorsResource from ...types.load_balancers import ( + SteeringPolicy, + SessionAffinity, load_balancer_edit_params, load_balancer_create_params, - load_balancer_delete_params, load_balancer_update_params, ) from ...types.load_balancers.rules_param import RulesParam from ...types.load_balancers.default_pools import DefaultPools from ...types.load_balancers.load_balancer import LoadBalancer +from ...types.load_balancers.steering_policy import SteeringPolicy +from ...types.load_balancers.session_affinity import SessionAffinity from ...types.load_balancers.random_steering_param import RandomSteeringParam from ...types.load_balancers.adaptive_routing_param import AdaptiveRoutingParam from ...types.load_balancers.location_strategy_param import LocationStrategyParam @@ -131,20 +133,10 @@ def create( random_steering: RandomSteeringParam | NotGiven = NOT_GIVEN, region_pools: object | NotGiven = NOT_GIVEN, rules: Iterable[RulesParam] | NotGiven = NOT_GIVEN, - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] | NotGiven = NOT_GIVEN, + session_affinity: SessionAffinity | NotGiven = NOT_GIVEN, session_affinity_attributes: SessionAffinityAttributesParam | NotGiven = NOT_GIVEN, session_affinity_ttl: float | NotGiven = NOT_GIVEN, - steering_policy: Literal[ - "off", - "geo", - "random", - "dynamic_latency", - "proximity", - "least_outstanding_requests", - "least_connections", - '""', - ] - | NotGiven = NOT_GIVEN, + steering_policy: SteeringPolicy | NotGiven = NOT_GIVEN, ttl: float | 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. @@ -331,20 +323,10 @@ def update( random_steering: RandomSteeringParam | NotGiven = NOT_GIVEN, region_pools: object | NotGiven = NOT_GIVEN, rules: Iterable[RulesParam] | NotGiven = NOT_GIVEN, - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] | NotGiven = NOT_GIVEN, + session_affinity: SessionAffinity | NotGiven = NOT_GIVEN, session_affinity_attributes: SessionAffinityAttributesParam | NotGiven = NOT_GIVEN, session_affinity_ttl: float | NotGiven = NOT_GIVEN, - steering_policy: Literal[ - "off", - "geo", - "random", - "dynamic_latency", - "proximity", - "least_outstanding_requests", - "least_connections", - '""', - ] - | NotGiven = NOT_GIVEN, + steering_policy: SteeringPolicy | NotGiven = NOT_GIVEN, ttl: float | 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. @@ -557,7 +539,6 @@ def delete( load_balancer_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -583,7 +564,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `load_balancer_id` but received {load_balancer_id!r}") return self._delete( f"/zones/{zone_id}/load_balancers/{load_balancer_id}", - body=maybe_transform(body, load_balancer_delete_params.LoadBalancerDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -612,20 +592,10 @@ def edit( random_steering: RandomSteeringParam | NotGiven = NOT_GIVEN, region_pools: object | NotGiven = NOT_GIVEN, rules: Iterable[RulesParam] | NotGiven = NOT_GIVEN, - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] | NotGiven = NOT_GIVEN, + session_affinity: SessionAffinity | NotGiven = NOT_GIVEN, session_affinity_attributes: SessionAffinityAttributesParam | NotGiven = NOT_GIVEN, session_affinity_ttl: float | NotGiven = NOT_GIVEN, - steering_policy: Literal[ - "off", - "geo", - "random", - "dynamic_latency", - "proximity", - "least_outstanding_requests", - "least_connections", - '""', - ] - | NotGiven = NOT_GIVEN, + steering_policy: SteeringPolicy | NotGiven = NOT_GIVEN, ttl: float | 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. @@ -885,20 +855,10 @@ async def create( random_steering: RandomSteeringParam | NotGiven = NOT_GIVEN, region_pools: object | NotGiven = NOT_GIVEN, rules: Iterable[RulesParam] | NotGiven = NOT_GIVEN, - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] | NotGiven = NOT_GIVEN, + session_affinity: SessionAffinity | NotGiven = NOT_GIVEN, session_affinity_attributes: SessionAffinityAttributesParam | NotGiven = NOT_GIVEN, session_affinity_ttl: float | NotGiven = NOT_GIVEN, - steering_policy: Literal[ - "off", - "geo", - "random", - "dynamic_latency", - "proximity", - "least_outstanding_requests", - "least_connections", - '""', - ] - | NotGiven = NOT_GIVEN, + steering_policy: SteeringPolicy | NotGiven = NOT_GIVEN, ttl: float | 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. @@ -1085,20 +1045,10 @@ async def update( random_steering: RandomSteeringParam | NotGiven = NOT_GIVEN, region_pools: object | NotGiven = NOT_GIVEN, rules: Iterable[RulesParam] | NotGiven = NOT_GIVEN, - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] | NotGiven = NOT_GIVEN, + session_affinity: SessionAffinity | NotGiven = NOT_GIVEN, session_affinity_attributes: SessionAffinityAttributesParam | NotGiven = NOT_GIVEN, session_affinity_ttl: float | NotGiven = NOT_GIVEN, - steering_policy: Literal[ - "off", - "geo", - "random", - "dynamic_latency", - "proximity", - "least_outstanding_requests", - "least_connections", - '""', - ] - | NotGiven = NOT_GIVEN, + steering_policy: SteeringPolicy | NotGiven = NOT_GIVEN, ttl: float | 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. @@ -1311,7 +1261,6 @@ async def delete( load_balancer_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -1337,7 +1286,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `load_balancer_id` but received {load_balancer_id!r}") return await self._delete( f"/zones/{zone_id}/load_balancers/{load_balancer_id}", - body=await async_maybe_transform(body, load_balancer_delete_params.LoadBalancerDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -1366,20 +1314,10 @@ async def edit( random_steering: RandomSteeringParam | NotGiven = NOT_GIVEN, region_pools: object | NotGiven = NOT_GIVEN, rules: Iterable[RulesParam] | NotGiven = NOT_GIVEN, - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] | NotGiven = NOT_GIVEN, + session_affinity: SessionAffinity | NotGiven = NOT_GIVEN, session_affinity_attributes: SessionAffinityAttributesParam | NotGiven = NOT_GIVEN, session_affinity_ttl: float | NotGiven = NOT_GIVEN, - steering_policy: Literal[ - "off", - "geo", - "random", - "dynamic_latency", - "proximity", - "least_outstanding_requests", - "least_connections", - '""', - ] - | NotGiven = NOT_GIVEN, + steering_policy: SteeringPolicy | NotGiven = NOT_GIVEN, ttl: float | 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/cloudflare/resources/load_balancers/monitors/monitors.py b/src/cloudflare/resources/load_balancers/monitors/monitors.py index 1a963337a6d..d416ac7f341 100644 --- a/src/cloudflare/resources/load_balancers/monitors/monitors.py +++ b/src/cloudflare/resources/load_balancers/monitors/monitors.py @@ -42,12 +42,7 @@ AsyncPaginator, make_request_options, ) -from ....types.load_balancers import ( - monitor_edit_params, - monitor_create_params, - monitor_delete_params, - monitor_update_params, -) +from ....types.load_balancers import monitor_edit_params, monitor_create_params, monitor_update_params from ....types.load_balancers.monitor import Monitor from ....types.load_balancers.monitor_delete_response import MonitorDeleteResponse @@ -365,7 +360,6 @@ def delete( monitor_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -393,7 +387,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `monitor_id` but received {monitor_id!r}") return self._delete( f"/accounts/{account_id}/load_balancers/monitors/{monitor_id}", - body=maybe_transform(body, monitor_delete_params.MonitorDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -886,7 +879,6 @@ async def delete( monitor_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -914,7 +906,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `monitor_id` but received {monitor_id!r}") return await self._delete( f"/accounts/{account_id}/load_balancers/monitors/{monitor_id}", - body=await async_maybe_transform(body, monitor_delete_params.MonitorDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/load_balancers/pools/pools.py b/src/cloudflare/resources/load_balancers/pools/pools.py index f72a395e9fb..1652a3bed56 100644 --- a/src/cloudflare/resources/load_balancers/pools/pools.py +++ b/src/cloudflare/resources/load_balancers/pools/pools.py @@ -45,7 +45,6 @@ pool_edit_params, pool_list_params, pool_create_params, - pool_delete_params, pool_update_params, ) from ....types.load_balancers.pool import Pool @@ -347,7 +346,6 @@ def delete( pool_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -375,7 +373,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `pool_id` but received {pool_id!r}") return self._delete( f"/accounts/{account_id}/load_balancers/pools/{pool_id}", - body=maybe_transform(body, pool_delete_params.PoolDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -832,7 +829,6 @@ async def delete( pool_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -860,7 +856,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `pool_id` but received {pool_id!r}") return await self._delete( f"/accounts/{account_id}/load_balancers/pools/{pool_id}", - body=await async_maybe_transform(body, pool_delete_params.PoolDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/logpush/datasets/fields.py b/src/cloudflare/resources/logpush/datasets/fields.py index 8fd43b17e1c..611c0f0f15a 100644 --- a/src/cloudflare/resources/logpush/datasets/fields.py +++ b/src/cloudflare/resources/logpush/datasets/fields.py @@ -51,7 +51,8 @@ def get( key-value pairs, where keys are field names, and values are descriptions. Args: - dataset_id: Name of the dataset. + dataset_id: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -120,7 +121,8 @@ async def get( key-value pairs, where keys are field names, and values are descriptions. Args: - dataset_id: Name of the dataset. + dataset_id: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. diff --git a/src/cloudflare/resources/logpush/datasets/jobs.py b/src/cloudflare/resources/logpush/datasets/jobs.py index 92dc0138053..4da84bf1027 100644 --- a/src/cloudflare/resources/logpush/datasets/jobs.py +++ b/src/cloudflare/resources/logpush/datasets/jobs.py @@ -50,7 +50,8 @@ def get( Lists Logpush jobs for an account or zone for a dataset. Args: - dataset_id: Name of the dataset. + dataset_id: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -117,7 +118,8 @@ async def get( Lists Logpush jobs for an account or zone for a dataset. Args: - dataset_id: Name of the dataset. + dataset_id: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index 1262ffd13fd..b91faac731a 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -26,7 +26,7 @@ AsyncPaginator, make_request_options, ) -from ...types.logpush import job_create_params, job_delete_params, job_update_params +from ...types.logpush import job_create_params, job_update_params from ...types.logpush.logpush_job import LogpushJob from ...types.logpush.output_options_param import OutputOptionsParam @@ -51,7 +51,11 @@ def create( dataset: Optional[str] | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, + kind: Optional[Literal["edge"]] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, + max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -74,13 +78,19 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - dataset: Name of the dataset. + dataset: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). enabled: Flag that indicates if the job is enabled. - frequency: The frequency at which Cloudflare sends batches of logs to your destination. - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + frequency: This field is deprecated. Please use `max_upload_*` parameters instead. The + frequency at which Cloudflare sends batches of logs to your destination. Setting + frequency to high sends your logs in larger quantities of smaller files. Setting + frequency to low sends logs in smaller quantities of larger files. + + kind: The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -88,6 +98,23 @@ def create( here, and logpush will keep on making this call for you, setting start and end times appropriately. + max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must + be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + minimum file size; this means that log files may be much smaller than this batch + size. This parameter is not available for jobs with `edge` as its kind. + + max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 + and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + a minimum interval for log batches; this means that log files may be sent in + shorter intervals than this. This parameter is only used for jobs with `edge` as + its kind. + + max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and + 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + number of log lines per batch; this means that log files may contain many fewer + lines than this. This parameter is not available for jobs with `edge` as its + kind. + name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify your job. @@ -125,7 +152,11 @@ def create( "dataset": dataset, "enabled": enabled, "frequency": frequency, + "kind": kind, "logpull_options": logpull_options, + "max_upload_bytes": max_upload_bytes, + "max_upload_interval_seconds": max_upload_interval_seconds, + "max_upload_records": max_upload_records, "name": name, "output_options": output_options, "ownership_challenge": ownership_challenge, @@ -151,7 +182,11 @@ def update( destination_conf: str | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, + kind: Optional[Literal["edge"]] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, + max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -177,9 +212,14 @@ def update( enabled: Flag that indicates if the job is enabled. - frequency: The frequency at which Cloudflare sends batches of logs to your destination. - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + frequency: This field is deprecated. Please use `max_upload_*` parameters instead. The + frequency at which Cloudflare sends batches of logs to your destination. Setting + frequency to high sends your logs in larger quantities of smaller files. Setting + frequency to low sends logs in smaller quantities of larger files. + + kind: The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -187,6 +227,23 @@ def update( here, and logpush will keep on making this call for you, setting start and end times appropriately. + max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must + be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + minimum file size; this means that log files may be much smaller than this batch + size. This parameter is not available for jobs with `edge` as its kind. + + max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 + and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + a minimum interval for log batches; this means that log files may be sent in + shorter intervals than this. This parameter is only used for jobs with `edge` as + its kind. + + max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and + 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + number of log lines per batch; this means that log files may contain many fewer + lines than this. This parameter is not available for jobs with `edge` as its + kind. + output_options: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. @@ -219,7 +276,11 @@ def update( "destination_conf": destination_conf, "enabled": enabled, "frequency": frequency, + "kind": kind, "logpull_options": logpull_options, + "max_upload_bytes": max_upload_bytes, + "max_upload_interval_seconds": max_upload_interval_seconds, + "max_upload_records": max_upload_records, "output_options": output_options, "ownership_challenge": ownership_challenge, }, @@ -288,7 +349,6 @@ def delete( self, job_id: int, *, - body: object, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -330,7 +390,6 @@ def delete( account_or_zone_id = zone_id return self._delete( f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs/{job_id}", - body=maybe_transform(body, job_delete_params.JobDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -415,7 +474,11 @@ async def create( dataset: Optional[str] | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, + kind: Optional[Literal["edge"]] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, + max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -438,13 +501,19 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - dataset: Name of the dataset. + dataset: Name of the dataset. A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). enabled: Flag that indicates if the job is enabled. - frequency: The frequency at which Cloudflare sends batches of logs to your destination. - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + frequency: This field is deprecated. Please use `max_upload_*` parameters instead. The + frequency at which Cloudflare sends batches of logs to your destination. Setting + frequency to high sends your logs in larger quantities of smaller files. Setting + frequency to low sends logs in smaller quantities of larger files. + + kind: The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -452,6 +521,23 @@ async def create( here, and logpush will keep on making this call for you, setting start and end times appropriately. + max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must + be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + minimum file size; this means that log files may be much smaller than this batch + size. This parameter is not available for jobs with `edge` as its kind. + + max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 + and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + a minimum interval for log batches; this means that log files may be sent in + shorter intervals than this. This parameter is only used for jobs with `edge` as + its kind. + + max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and + 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + number of log lines per batch; this means that log files may contain many fewer + lines than this. This parameter is not available for jobs with `edge` as its + kind. + name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify your job. @@ -489,7 +575,11 @@ async def create( "dataset": dataset, "enabled": enabled, "frequency": frequency, + "kind": kind, "logpull_options": logpull_options, + "max_upload_bytes": max_upload_bytes, + "max_upload_interval_seconds": max_upload_interval_seconds, + "max_upload_records": max_upload_records, "name": name, "output_options": output_options, "ownership_challenge": ownership_challenge, @@ -515,7 +605,11 @@ async def update( destination_conf: str | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, + kind: Optional[Literal["edge"]] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, + max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -541,9 +635,14 @@ async def update( enabled: Flag that indicates if the job is enabled. - frequency: The frequency at which Cloudflare sends batches of logs to your destination. - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + frequency: This field is deprecated. Please use `max_upload_*` parameters instead. The + frequency at which Cloudflare sends batches of logs to your destination. Setting + frequency to high sends your logs in larger quantities of smaller files. Setting + frequency to low sends logs in smaller quantities of larger files. + + kind: The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -551,6 +650,23 @@ async def update( here, and logpush will keep on making this call for you, setting start and end times appropriately. + max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must + be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + minimum file size; this means that log files may be much smaller than this batch + size. This parameter is not available for jobs with `edge` as its kind. + + max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 + and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + a minimum interval for log batches; this means that log files may be sent in + shorter intervals than this. This parameter is only used for jobs with `edge` as + its kind. + + max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and + 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + number of log lines per batch; this means that log files may contain many fewer + lines than this. This parameter is not available for jobs with `edge` as its + kind. + output_options: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. @@ -583,7 +699,11 @@ async def update( "destination_conf": destination_conf, "enabled": enabled, "frequency": frequency, + "kind": kind, "logpull_options": logpull_options, + "max_upload_bytes": max_upload_bytes, + "max_upload_interval_seconds": max_upload_interval_seconds, + "max_upload_records": max_upload_records, "output_options": output_options, "ownership_challenge": ownership_challenge, }, @@ -652,7 +772,6 @@ async def delete( self, job_id: int, *, - body: object, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -694,7 +813,6 @@ async def delete( account_or_zone_id = zone_id return await self._delete( f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs/{job_id}", - body=await async_maybe_transform(body, job_delete_params.JobDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/logs/control/cmb/config.py b/src/cloudflare/resources/logs/control/cmb/config.py index 3c13ce3f56e..b1c4353d078 100644 --- a/src/cloudflare/resources/logs/control/cmb/config.py +++ b/src/cloudflare/resources/logs/control/cmb/config.py @@ -23,7 +23,7 @@ from ....._base_client import ( make_request_options, ) -from .....types.logs.control.cmb import config_create_params, config_delete_params +from .....types.logs.control.cmb import config_create_params from .....types.logs.control.cmb.cmb_config import CmbConfig __all__ = ["ConfigResource", "AsyncConfigResource"] @@ -85,7 +85,6 @@ def delete( self, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -111,7 +110,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._delete( f"/accounts/{account_id}/logs/control/cmb/config", - body=maybe_transform(body, config_delete_params.ConfigDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -218,7 +216,6 @@ async def delete( self, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -244,7 +241,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._delete( f"/accounts/{account_id}/logs/control/cmb/config", - body=await async_maybe_transform(body, config_delete_params.ConfigDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py index aa26e9f620f..c5588ee35fb 100644 --- a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py +++ b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py @@ -31,12 +31,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.magic_network_monitoring import ( - config_edit_params, - config_create_params, - config_delete_params, - config_update_params, -) +from ....types.magic_network_monitoring import config_edit_params, config_create_params, config_update_params from ....types.magic_network_monitoring.configuration import Configuration __all__ = ["ConfigsResource", "AsyncConfigsResource"] @@ -138,7 +133,6 @@ def delete( self, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -162,7 +156,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._delete( f"/accounts/{account_id}/mnm/config", - body=maybe_transform(body, config_delete_params.ConfigDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -346,7 +339,6 @@ async def delete( self, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -370,7 +362,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._delete( f"/accounts/{account_id}/mnm/config", - body=await async_maybe_transform(body, config_delete_params.ConfigDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py index fb7429d9f99..5d1deee2646 100644 --- a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py +++ b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py @@ -33,12 +33,7 @@ AsyncPaginator, make_request_options, ) -from ....types.magic_network_monitoring import ( - rule_edit_params, - rule_create_params, - rule_delete_params, - rule_update_params, -) +from ....types.magic_network_monitoring import rule_edit_params, rule_create_params, rule_update_params from ....types.magic_network_monitoring.magic_network_monitoring_rule import MagicNetworkMonitoringRule __all__ = ["RulesResource", "AsyncRulesResource"] @@ -176,7 +171,6 @@ def delete( rule_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -204,7 +198,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `rule_id` but received {rule_id!r}") return self._delete( f"/accounts/{account_id}/mnm/rules/{rule_id}", - body=maybe_transform(body, rule_delete_params.RuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -434,7 +427,6 @@ async def delete( rule_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -462,7 +454,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `rule_id` but received {rule_id!r}") return await self._delete( f"/accounts/{account_id}/mnm/rules/{rule_id}", - body=await async_maybe_transform(body, rule_delete_params.RuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/magic_transit/gre_tunnels.py b/src/cloudflare/resources/magic_transit/gre_tunnels.py index 02f978ed886..7129aeb334e 100644 --- a/src/cloudflare/resources/magic_transit/gre_tunnels.py +++ b/src/cloudflare/resources/magic_transit/gre_tunnels.py @@ -23,11 +23,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.magic_transit import ( - gre_tunnel_create_params, - gre_tunnel_delete_params, - gre_tunnel_update_params, -) +from ...types.magic_transit import gre_tunnel_create_params, gre_tunnel_update_params from ...types.magic_transit.health_check_param import HealthCheckParam from ...types.magic_transit.gre_tunnel_get_response import GRETunnelGetResponse from ...types.magic_transit.gre_tunnel_list_response import GRETunnelListResponse @@ -219,7 +215,6 @@ def delete( tunnel_identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -251,7 +246,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") return self._delete( f"/accounts/{account_id}/magic/gre_tunnels/{tunnel_identifier}", - body=maybe_transform(body, gre_tunnel_delete_params.GRETunnelDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -488,7 +482,6 @@ async def delete( tunnel_identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -520,7 +513,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") return await self._delete( f"/accounts/{account_id}/magic/gre_tunnels/{tunnel_identifier}", - body=await async_maybe_transform(body, gre_tunnel_delete_params.GRETunnelDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py index 12c21e755d4..02240b292b4 100644 --- a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py +++ b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py @@ -25,7 +25,6 @@ ) from ...types.magic_transit import ( ipsec_tunnel_create_params, - ipsec_tunnel_delete_params, ipsec_tunnel_update_params, ipsec_tunnel_psk_generate_params, ) @@ -260,7 +259,6 @@ def delete( tunnel_identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -292,7 +290,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") return self._delete( f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}", - body=maybe_transform(body, ipsec_tunnel_delete_params.IPSECTunnelDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -618,7 +615,6 @@ async def delete( tunnel_identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -650,7 +646,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") return await self._delete( f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}", - body=await async_maybe_transform(body, ipsec_tunnel_delete_params.IPSECTunnelDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/magic_transit/routes.py b/src/cloudflare/resources/magic_transit/routes.py index 31cc36c643d..d8eef542fc5 100644 --- a/src/cloudflare/resources/magic_transit/routes.py +++ b/src/cloudflare/resources/magic_transit/routes.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, cast +from typing import Type, cast import httpx @@ -23,12 +23,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.magic_transit import ( - route_empty_params, - route_create_params, - route_delete_params, - route_update_params, -) +from ...types.magic_transit import route_create_params, route_update_params from ...types.magic_transit.scope_param import ScopeParam from ...types.magic_transit.route_get_response import RouteGetResponse from ...types.magic_transit.route_list_response import RouteListResponse @@ -211,7 +206,6 @@ def delete( route_identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -241,7 +235,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `route_identifier` but received {route_identifier!r}") return self._delete( f"/accounts/{account_id}/magic/routes/{route_identifier}", - body=maybe_transform(body, route_delete_params.RouteDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -256,7 +249,6 @@ def empty( self, *, account_id: str, - routes: Iterable[route_empty_params.Route], # 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. extra_headers: Headers | None = None, @@ -282,7 +274,6 @@ def empty( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._delete( f"/accounts/{account_id}/magic/routes", - body=maybe_transform({"routes": routes}, route_empty_params.RouteEmptyParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -509,7 +500,6 @@ async def delete( route_identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -539,7 +529,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `route_identifier` but received {route_identifier!r}") return await self._delete( f"/accounts/{account_id}/magic/routes/{route_identifier}", - body=await async_maybe_transform(body, route_delete_params.RouteDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -554,7 +543,6 @@ async def empty( self, *, account_id: str, - routes: Iterable[route_empty_params.Route], # 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. extra_headers: Headers | None = None, @@ -580,7 +568,6 @@ async def empty( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._delete( f"/accounts/{account_id}/magic/routes", - body=await async_maybe_transform({"routes": routes}, route_empty_params.RouteEmptyParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/magic_transit/sites/acls.py b/src/cloudflare/resources/magic_transit/sites/acls.py index a58dd7a33db..4d850273bdf 100644 --- a/src/cloudflare/resources/magic_transit/sites/acls.py +++ b/src/cloudflare/resources/magic_transit/sites/acls.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.magic_transit.sites import acl_create_params, acl_delete_params, acl_update_params +from ....types.magic_transit.sites import acl_create_params, acl_update_params from ....types.magic_transit.sites.acl import ACL from ....types.magic_transit.sites.allowed_protocol import AllowedProtocol from ....types.magic_transit.sites.acl_configuration_param import ACLConfigurationParam @@ -234,7 +234,6 @@ def delete( *, account_id: str, site_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -268,7 +267,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") return self._delete( f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - body=maybe_transform(body, acl_delete_params.ACLDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -530,7 +528,6 @@ async def delete( *, account_id: str, site_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -564,7 +561,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") return await self._delete( f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - body=await async_maybe_transform(body, acl_delete_params.ACLDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/magic_transit/sites/lans.py b/src/cloudflare/resources/magic_transit/sites/lans.py index 6eba19aed92..cdb2d94456a 100644 --- a/src/cloudflare/resources/magic_transit/sites/lans.py +++ b/src/cloudflare/resources/magic_transit/sites/lans.py @@ -25,11 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.magic_transit.sites import ( - lan_create_params, - lan_delete_params, - lan_update_params, -) +from ....types.magic_transit.sites import lan_create_params, lan_update_params from ....types.magic_transit.sites.lan import LAN from ....types.magic_transit.sites.nat_param import NatParam from ....types.magic_transit.sites.lan_create_response import LANCreateResponse @@ -241,7 +237,6 @@ def delete( *, account_id: str, site_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -275,7 +270,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `lan_id` but received {lan_id!r}") return self._delete( f"/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}", - body=maybe_transform(body, lan_delete_params.LANDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -538,7 +532,6 @@ async def delete( *, account_id: str, site_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -572,7 +565,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `lan_id` but received {lan_id!r}") return await self._delete( f"/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}", - body=await async_maybe_transform(body, lan_delete_params.LANDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/magic_transit/sites/sites.py b/src/cloudflare/resources/magic_transit/sites/sites.py index fdb6388000c..b36d0ef691e 100644 --- a/src/cloudflare/resources/magic_transit/sites/sites.py +++ b/src/cloudflare/resources/magic_transit/sites/sites.py @@ -49,12 +49,7 @@ AsyncPaginator, make_request_options, ) -from ....types.magic_transit import ( - site_list_params, - site_create_params, - site_delete_params, - site_update_params, -) +from ....types.magic_transit import site_list_params, site_create_params, site_update_params from ....types.magic_transit.site import Site from ....types.magic_transit.site_location_param import SiteLocationParam @@ -267,7 +262,6 @@ def delete( site_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -297,7 +291,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") return self._delete( f"/accounts/{account_id}/magic/sites/{site_id}", - body=maybe_transform(body, site_delete_params.SiteDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -559,7 +552,6 @@ async def delete( site_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -589,7 +581,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") return await self._delete( f"/accounts/{account_id}/magic/sites/{site_id}", - body=await async_maybe_transform(body, site_delete_params.SiteDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/magic_transit/sites/wans.py b/src/cloudflare/resources/magic_transit/sites/wans.py index 36a1cecd8b3..c41c8985728 100644 --- a/src/cloudflare/resources/magic_transit/sites/wans.py +++ b/src/cloudflare/resources/magic_transit/sites/wans.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.magic_transit.sites import wan_create_params, wan_delete_params, wan_update_params +from ....types.magic_transit.sites import wan_create_params, wan_update_params from ....types.magic_transit.sites.wan import WAN from ....types.magic_transit.sites.wan_create_response import WANCreateResponse from ....types.magic_transit.sites.wan_static_addressing_param import WANStaticAddressingParam @@ -222,7 +222,6 @@ def delete( *, account_id: str, site_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -256,7 +255,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `wan_id` but received {wan_id!r}") return self._delete( f"/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}", - body=maybe_transform(body, wan_delete_params.WANDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -506,7 +504,6 @@ async def delete( *, account_id: str, site_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -540,7 +537,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `wan_id` but received {wan_id!r}") return await self._delete( f"/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}", - body=await async_maybe_transform(body, wan_delete_params.WANDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/memberships.py b/src/cloudflare/resources/memberships.py index 81efde2394b..aac512175a7 100644 --- a/src/cloudflare/resources/memberships.py +++ b/src/cloudflare/resources/memberships.py @@ -26,7 +26,7 @@ AsyncPaginator, make_request_options, ) -from ..types.memberships import membership_list_params, membership_delete_params, membership_update_params +from ..types.memberships import membership_list_params, membership_update_params from ..types.memberships.membership import Membership from ..types.memberships.membership_get_response import MembershipGetResponse from ..types.memberships.membership_delete_response import MembershipDeleteResponse @@ -161,7 +161,6 @@ def delete( self, membership_id: str, *, - body: object, # 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. extra_headers: Headers | None = None, @@ -187,7 +186,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `membership_id` but received {membership_id!r}") return self._delete( f"/memberships/{membership_id}", - body=maybe_transform(body, membership_delete_params.MembershipDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -369,7 +367,6 @@ async def delete( self, membership_id: str, *, - body: object, # 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. extra_headers: Headers | None = None, @@ -395,7 +392,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `membership_id` but received {membership_id!r}") return await self._delete( f"/memberships/{membership_id}", - body=await async_maybe_transform(body, membership_delete_params.MembershipDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py index c5da4fc9b8e..d6d4f1a60d8 100644 --- a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py +++ b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -33,7 +33,7 @@ AsyncPaginator, make_request_options, ) -from ...types.mtls_certificates import mtls_certificate_create_params, mtls_certificate_delete_params +from ...types.mtls_certificates import mtls_certificate_create_params from ...types.mtls_certificates.mtls_certificate import MTLSCertificate from ...types.mtls_certificates.mtls_certificate_create_response import MTLSCertificateCreateResponse @@ -67,7 +67,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificateCreateResponse: + ) -> Optional[MTLSCertificateCreateResponse]: """ Upload a certificate that you want to use with mTLS-enabled Cloudflare services. @@ -108,9 +108,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MTLSCertificateCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[MTLSCertificateCreateResponse]]._unwrapper, ), - cast_to=cast(Type[MTLSCertificateCreateResponse], ResultWrapper[MTLSCertificateCreateResponse]), + cast_to=cast(Type[Optional[MTLSCertificateCreateResponse]], ResultWrapper[MTLSCertificateCreateResponse]), ) def list( @@ -154,14 +154,13 @@ def delete( mtls_certificate_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificate: + ) -> Optional[MTLSCertificate]: """ Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services. @@ -187,15 +186,14 @@ def delete( ) return self._delete( f"/accounts/{account_id}/mtls_certificates/{mtls_certificate_id}", - body=maybe_transform(body, mtls_certificate_delete_params.MTLSCertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MTLSCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[MTLSCertificate]]._unwrapper, ), - cast_to=cast(Type[MTLSCertificate], ResultWrapper[MTLSCertificate]), + cast_to=cast(Type[Optional[MTLSCertificate]], ResultWrapper[MTLSCertificate]), ) def get( @@ -209,7 +207,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificate: + ) -> Optional[MTLSCertificate]: """ Fetches a single mTLS certificate. @@ -239,9 +237,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MTLSCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[MTLSCertificate]]._unwrapper, ), - cast_to=cast(Type[MTLSCertificate], ResultWrapper[MTLSCertificate]), + cast_to=cast(Type[Optional[MTLSCertificate]], ResultWrapper[MTLSCertificate]), ) @@ -272,7 +270,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificateCreateResponse: + ) -> Optional[MTLSCertificateCreateResponse]: """ Upload a certificate that you want to use with mTLS-enabled Cloudflare services. @@ -313,9 +311,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MTLSCertificateCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[MTLSCertificateCreateResponse]]._unwrapper, ), - cast_to=cast(Type[MTLSCertificateCreateResponse], ResultWrapper[MTLSCertificateCreateResponse]), + cast_to=cast(Type[Optional[MTLSCertificateCreateResponse]], ResultWrapper[MTLSCertificateCreateResponse]), ) def list( @@ -359,14 +357,13 @@ async def delete( mtls_certificate_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificate: + ) -> Optional[MTLSCertificate]: """ Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services. @@ -392,15 +389,14 @@ async def delete( ) return await self._delete( f"/accounts/{account_id}/mtls_certificates/{mtls_certificate_id}", - body=await async_maybe_transform(body, mtls_certificate_delete_params.MTLSCertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MTLSCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[MTLSCertificate]]._unwrapper, ), - cast_to=cast(Type[MTLSCertificate], ResultWrapper[MTLSCertificate]), + cast_to=cast(Type[Optional[MTLSCertificate]], ResultWrapper[MTLSCertificate]), ) async def get( @@ -414,7 +410,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificate: + ) -> Optional[MTLSCertificate]: """ Fetches a single mTLS certificate. @@ -444,9 +440,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[MTLSCertificate]._unwrapper, + post_parser=ResultWrapper[Optional[MTLSCertificate]]._unwrapper, ), - cast_to=cast(Type[MTLSCertificate], ResultWrapper[MTLSCertificate]), + cast_to=cast(Type[Optional[MTLSCertificate]], ResultWrapper[MTLSCertificate]), ) diff --git a/src/cloudflare/resources/origin_ca_certificates.py b/src/cloudflare/resources/origin_ca_certificates.py index 1ffdea60be4..0469f455fb2 100644 --- a/src/cloudflare/resources/origin_ca_certificates.py +++ b/src/cloudflare/resources/origin_ca_certificates.py @@ -2,8 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Iterable, cast -from typing_extensions import Literal +from typing import Any, Type, Iterable, Optional, cast import httpx @@ -21,16 +20,15 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper +from ..types.ssl import RequestValidity from ..pagination import SyncSinglePage, AsyncSinglePage from .._base_client import ( AsyncPaginator, make_request_options, ) -from ..types.origin_ca_certificates import ( - origin_ca_certificate_list_params, - origin_ca_certificate_create_params, - origin_ca_certificate_delete_params, -) +from ..types.ssl.request_validity import RequestValidity +from ..types.origin_ca_certificates import origin_ca_certificate_list_params, origin_ca_certificate_create_params +from ..types.shared.certificate_request_type import CertificateRequestType from ..types.origin_ca_certificates.origin_ca_certificate import OriginCACertificate from ..types.origin_ca_certificates.origin_ca_certificate_get_response import OriginCACertificateGetResponse from ..types.origin_ca_certificates.origin_ca_certificate_create_response import OriginCACertificateCreateResponse @@ -53,15 +51,15 @@ def create( *, csr: str | NotGiven = NOT_GIVEN, hostnames: Iterable[object] | NotGiven = NOT_GIVEN, - request_type: Literal["origin-rsa", "origin-ecc", "keyless-certificate"] | NotGiven = NOT_GIVEN, - requested_validity: Literal[7, 30, 90, 365, 730, 1095, 5475] | NotGiven = NOT_GIVEN, + request_type: CertificateRequestType | NotGiven = NOT_GIVEN, + requested_validity: RequestValidity | 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginCACertificateCreateResponse: + ) -> Optional[OriginCACertificateCreateResponse]: """Create an Origin CA certificate. Use your Origin CA Key as your User Service Key @@ -87,7 +85,7 @@ def create( timeout: Override the client-level default timeout for this request, in seconds """ return cast( - OriginCACertificateCreateResponse, + Optional[OriginCACertificateCreateResponse], self._post( "/certificates", body=maybe_transform( @@ -104,7 +102,7 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginCACertificateCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginCACertificateCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginCACertificateCreateResponse] @@ -115,7 +113,7 @@ def create( def list( self, *, - identifier: str | NotGiven = NOT_GIVEN, + zone_id: str | 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. extra_headers: Headers | None = None, @@ -130,7 +128,7 @@ def list( ([see above](#requests)). Args: - identifier: Identifier + zone_id: Identifier extra_headers: Send extra headers @@ -149,7 +147,7 @@ def list( extra_body=extra_body, timeout=timeout, query=maybe_transform( - {"identifier": identifier}, origin_ca_certificate_list_params.OriginCACertificateListParams + {"zone_id": zone_id}, origin_ca_certificate_list_params.OriginCACertificateListParams ), ), model=OriginCACertificate, @@ -159,14 +157,13 @@ def delete( self, certificate_id: str, *, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginCACertificateDeleteResponse: + ) -> Optional[OriginCACertificateDeleteResponse]: """Revoke an existing Origin CA certificate by its serial number. Use your Origin @@ -188,15 +185,16 @@ def delete( raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return self._delete( f"/certificates/{certificate_id}", - body=maybe_transform(body, origin_ca_certificate_delete_params.OriginCACertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginCACertificateDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginCACertificateDeleteResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[OriginCACertificateDeleteResponse]], ResultWrapper[OriginCACertificateDeleteResponse] ), - cast_to=cast(Type[OriginCACertificateDeleteResponse], ResultWrapper[OriginCACertificateDeleteResponse]), ) def get( @@ -209,7 +207,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginCACertificateGetResponse: + ) -> Optional[OriginCACertificateGetResponse]: """Get an existing Origin CA certificate by its serial number. Use your Origin CA @@ -230,7 +228,7 @@ def get( if not certificate_id: raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return cast( - OriginCACertificateGetResponse, + Optional[OriginCACertificateGetResponse], self._get( f"/certificates/{certificate_id}", options=make_request_options( @@ -238,7 +236,7 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginCACertificateGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginCACertificateGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginCACertificateGetResponse] @@ -261,15 +259,15 @@ async def create( *, csr: str | NotGiven = NOT_GIVEN, hostnames: Iterable[object] | NotGiven = NOT_GIVEN, - request_type: Literal["origin-rsa", "origin-ecc", "keyless-certificate"] | NotGiven = NOT_GIVEN, - requested_validity: Literal[7, 30, 90, 365, 730, 1095, 5475] | NotGiven = NOT_GIVEN, + request_type: CertificateRequestType | NotGiven = NOT_GIVEN, + requested_validity: RequestValidity | 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginCACertificateCreateResponse: + ) -> Optional[OriginCACertificateCreateResponse]: """Create an Origin CA certificate. Use your Origin CA Key as your User Service Key @@ -295,7 +293,7 @@ async def create( timeout: Override the client-level default timeout for this request, in seconds """ return cast( - OriginCACertificateCreateResponse, + Optional[OriginCACertificateCreateResponse], await self._post( "/certificates", body=await async_maybe_transform( @@ -312,7 +310,7 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginCACertificateCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginCACertificateCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginCACertificateCreateResponse] @@ -323,7 +321,7 @@ async def create( def list( self, *, - identifier: str | NotGiven = NOT_GIVEN, + zone_id: str | 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. extra_headers: Headers | None = None, @@ -338,7 +336,7 @@ def list( ([see above](#requests)). Args: - identifier: Identifier + zone_id: Identifier extra_headers: Send extra headers @@ -357,7 +355,7 @@ def list( extra_body=extra_body, timeout=timeout, query=maybe_transform( - {"identifier": identifier}, origin_ca_certificate_list_params.OriginCACertificateListParams + {"zone_id": zone_id}, origin_ca_certificate_list_params.OriginCACertificateListParams ), ), model=OriginCACertificate, @@ -367,14 +365,13 @@ async def delete( self, certificate_id: str, *, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginCACertificateDeleteResponse: + ) -> Optional[OriginCACertificateDeleteResponse]: """Revoke an existing Origin CA certificate by its serial number. Use your Origin @@ -396,15 +393,16 @@ async def delete( raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return await self._delete( f"/certificates/{certificate_id}", - body=await async_maybe_transform(body, origin_ca_certificate_delete_params.OriginCACertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginCACertificateDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginCACertificateDeleteResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[OriginCACertificateDeleteResponse]], ResultWrapper[OriginCACertificateDeleteResponse] ), - cast_to=cast(Type[OriginCACertificateDeleteResponse], ResultWrapper[OriginCACertificateDeleteResponse]), ) async def get( @@ -417,7 +415,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginCACertificateGetResponse: + ) -> Optional[OriginCACertificateGetResponse]: """Get an existing Origin CA certificate by its serial number. Use your Origin CA @@ -438,7 +436,7 @@ async def get( if not certificate_id: raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return cast( - OriginCACertificateGetResponse, + Optional[OriginCACertificateGetResponse], await self._get( f"/certificates/{certificate_id}", options=make_request_options( @@ -446,7 +444,7 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginCACertificateGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginCACertificateGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginCACertificateGetResponse] diff --git a/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py b/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py index a46067f12cc..9375047412c 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py +++ b/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.origin_tls_client_auth.hostnames import certificate_create_params, certificate_delete_params +from ....types.origin_tls_client_auth.hostnames import certificate_create_params from ....types.origin_tls_client_auth.authenticated_origin_pull import AuthenticatedOriginPull from ....types.origin_tls_client_auth.hostnames.certificate_get_response import CertificateGetResponse from ....types.origin_tls_client_auth.hostnames.certificate_create_response import CertificateCreateResponse @@ -55,7 +55,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateCreateResponse: + ) -> Optional[CertificateCreateResponse]: """Upload a certificate to be used for client authentication on a hostname. 10 @@ -92,9 +92,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificateCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificateCreateResponse]]._unwrapper, ), - cast_to=cast(Type[CertificateCreateResponse], ResultWrapper[CertificateCreateResponse]), + cast_to=cast(Type[Optional[CertificateCreateResponse]], ResultWrapper[CertificateCreateResponse]), ) def list( @@ -138,14 +138,13 @@ def delete( certificate_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateDeleteResponse: + ) -> Optional[CertificateDeleteResponse]: """ Delete Hostname Client Certificate @@ -168,15 +167,14 @@ def delete( raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return self._delete( f"/zones/{zone_id}/origin_tls_client_auth/hostnames/certificates/{certificate_id}", - body=maybe_transform(body, certificate_delete_params.CertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificateDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificateDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[CertificateDeleteResponse], ResultWrapper[CertificateDeleteResponse]), + cast_to=cast(Type[Optional[CertificateDeleteResponse]], ResultWrapper[CertificateDeleteResponse]), ) def get( @@ -190,7 +188,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateGetResponse: + ) -> Optional[CertificateGetResponse]: """ Get the certificate by ID to be used for client authentication on a hostname. @@ -218,9 +216,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificateGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificateGetResponse]]._unwrapper, ), - cast_to=cast(Type[CertificateGetResponse], ResultWrapper[CertificateGetResponse]), + cast_to=cast(Type[Optional[CertificateGetResponse]], ResultWrapper[CertificateGetResponse]), ) @@ -245,7 +243,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateCreateResponse: + ) -> Optional[CertificateCreateResponse]: """Upload a certificate to be used for client authentication on a hostname. 10 @@ -282,9 +280,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificateCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificateCreateResponse]]._unwrapper, ), - cast_to=cast(Type[CertificateCreateResponse], ResultWrapper[CertificateCreateResponse]), + cast_to=cast(Type[Optional[CertificateCreateResponse]], ResultWrapper[CertificateCreateResponse]), ) def list( @@ -328,14 +326,13 @@ async def delete( certificate_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateDeleteResponse: + ) -> Optional[CertificateDeleteResponse]: """ Delete Hostname Client Certificate @@ -358,15 +355,14 @@ async def delete( raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return await self._delete( f"/zones/{zone_id}/origin_tls_client_auth/hostnames/certificates/{certificate_id}", - body=await async_maybe_transform(body, certificate_delete_params.CertificateDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificateDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificateDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[CertificateDeleteResponse], ResultWrapper[CertificateDeleteResponse]), + cast_to=cast(Type[Optional[CertificateDeleteResponse]], ResultWrapper[CertificateDeleteResponse]), ) async def get( @@ -380,7 +376,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateGetResponse: + ) -> Optional[CertificateGetResponse]: """ Get the certificate by ID to be used for client authentication on a hostname. @@ -408,9 +404,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificateGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificateGetResponse]]._unwrapper, ), - cast_to=cast(Type[CertificateGetResponse], ResultWrapper[CertificateGetResponse]), + cast_to=cast(Type[Optional[CertificateGetResponse]], ResultWrapper[CertificateGetResponse]), ) diff --git a/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py b/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py index d5654039bca..438508acb12 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py +++ b/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py @@ -107,7 +107,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AuthenticatedOriginPull: + ) -> Optional[AuthenticatedOriginPull]: """ Get the Hostname Status for Client Authentication @@ -136,9 +136,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[AuthenticatedOriginPull]._unwrapper, + post_parser=ResultWrapper[Optional[AuthenticatedOriginPull]]._unwrapper, ), - cast_to=cast(Type[AuthenticatedOriginPull], ResultWrapper[AuthenticatedOriginPull]), + cast_to=cast(Type[Optional[AuthenticatedOriginPull]], ResultWrapper[AuthenticatedOriginPull]), ) @@ -211,7 +211,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AuthenticatedOriginPull: + ) -> Optional[AuthenticatedOriginPull]: """ Get the Hostname Status for Client Authentication @@ -240,9 +240,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[AuthenticatedOriginPull]._unwrapper, + post_parser=ResultWrapper[Optional[AuthenticatedOriginPull]]._unwrapper, ), - cast_to=cast(Type[AuthenticatedOriginPull], ResultWrapper[AuthenticatedOriginPull]), + cast_to=cast(Type[Optional[AuthenticatedOriginPull]], ResultWrapper[AuthenticatedOriginPull]), ) diff --git a/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py b/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py index 5d0d50f7e9d..f1899c77cdf 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py +++ b/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, cast +from typing import Any, Optional, cast import httpx @@ -42,7 +42,7 @@ make_request_options, ) from .hostnames.hostnames import HostnamesResource, AsyncHostnamesResource -from ...types.origin_tls_client_auth import origin_tls_client_auth_create_params, origin_tls_client_auth_delete_params +from ...types.origin_tls_client_auth import origin_tls_client_auth_create_params from ...types.origin_tls_client_auth.zone_authenticated_origin_pull import ZoneAuthenticatedOriginPull from ...types.origin_tls_client_auth.origin_tls_client_auth_get_response import OriginTLSClientAuthGetResponse from ...types.origin_tls_client_auth.origin_tls_client_auth_create_response import OriginTLSClientAuthCreateResponse @@ -80,7 +80,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginTLSClientAuthCreateResponse: + ) -> Optional[OriginTLSClientAuthCreateResponse]: """ Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is @@ -106,7 +106,7 @@ def create( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - OriginTLSClientAuthCreateResponse, + Optional[OriginTLSClientAuthCreateResponse], self._post( f"/zones/{zone_id}/origin_tls_client_auth", body=maybe_transform( @@ -121,7 +121,7 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginTLSClientAuthCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginTLSClientAuthCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginTLSClientAuthCreateResponse] @@ -170,14 +170,13 @@ def delete( certificate_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginTLSClientAuthDeleteResponse: + ) -> Optional[OriginTLSClientAuthDeleteResponse]: """ Delete Certificate @@ -199,16 +198,15 @@ def delete( if not certificate_id: raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return cast( - OriginTLSClientAuthDeleteResponse, + Optional[OriginTLSClientAuthDeleteResponse], self._delete( f"/zones/{zone_id}/origin_tls_client_auth/{certificate_id}", - body=maybe_transform(body, origin_tls_client_auth_delete_params.OriginTLSClientAuthDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginTLSClientAuthDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginTLSClientAuthDeleteResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginTLSClientAuthDeleteResponse] @@ -227,7 +225,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginTLSClientAuthGetResponse: + ) -> Optional[OriginTLSClientAuthGetResponse]: """ Get Certificate Details @@ -249,7 +247,7 @@ def get( if not certificate_id: raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return cast( - OriginTLSClientAuthGetResponse, + Optional[OriginTLSClientAuthGetResponse], self._get( f"/zones/{zone_id}/origin_tls_client_auth/{certificate_id}", options=make_request_options( @@ -257,7 +255,7 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginTLSClientAuthGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginTLSClientAuthGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginTLSClientAuthGetResponse] @@ -295,7 +293,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginTLSClientAuthCreateResponse: + ) -> Optional[OriginTLSClientAuthCreateResponse]: """ Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is @@ -321,7 +319,7 @@ async def create( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - OriginTLSClientAuthCreateResponse, + Optional[OriginTLSClientAuthCreateResponse], await self._post( f"/zones/{zone_id}/origin_tls_client_auth", body=await async_maybe_transform( @@ -336,7 +334,7 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginTLSClientAuthCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginTLSClientAuthCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginTLSClientAuthCreateResponse] @@ -385,14 +383,13 @@ async def delete( certificate_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginTLSClientAuthDeleteResponse: + ) -> Optional[OriginTLSClientAuthDeleteResponse]: """ Delete Certificate @@ -414,18 +411,15 @@ async def delete( if not certificate_id: raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return cast( - OriginTLSClientAuthDeleteResponse, + Optional[OriginTLSClientAuthDeleteResponse], await self._delete( f"/zones/{zone_id}/origin_tls_client_auth/{certificate_id}", - body=await async_maybe_transform( - body, origin_tls_client_auth_delete_params.OriginTLSClientAuthDeleteParams - ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginTLSClientAuthDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginTLSClientAuthDeleteResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginTLSClientAuthDeleteResponse] @@ -444,7 +438,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OriginTLSClientAuthGetResponse: + ) -> Optional[OriginTLSClientAuthGetResponse]: """ Get Certificate Details @@ -466,7 +460,7 @@ async def get( if not certificate_id: raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") return cast( - OriginTLSClientAuthGetResponse, + Optional[OriginTLSClientAuthGetResponse], await self._get( f"/zones/{zone_id}/origin_tls_client_auth/{certificate_id}", options=make_request_options( @@ -474,7 +468,7 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OriginTLSClientAuthGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OriginTLSClientAuthGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[OriginTLSClientAuthGetResponse] diff --git a/src/cloudflare/resources/origin_tls_client_auth/settings.py b/src/cloudflare/resources/origin_tls_client_auth/settings.py index ac8304e1edd..67fc7cdba8e 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/settings.py +++ b/src/cloudflare/resources/origin_tls_client_auth/settings.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -50,7 +50,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingUpdateResponse: + ) -> Optional[SettingUpdateResponse]: """Enable or disable zone-level authenticated origin pulls. 'enabled' should be set @@ -80,9 +80,9 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[SettingUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[SettingUpdateResponse]]._unwrapper, ), - cast_to=cast(Type[SettingUpdateResponse], ResultWrapper[SettingUpdateResponse]), + cast_to=cast(Type[Optional[SettingUpdateResponse]], ResultWrapper[SettingUpdateResponse]), ) def get( @@ -95,7 +95,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingGetResponse: + ) -> Optional[SettingGetResponse]: """Get whether zone-level authenticated origin pulls is enabled or not. It is false @@ -121,9 +121,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[SettingGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[SettingGetResponse]]._unwrapper, ), - cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]), + cast_to=cast(Type[Optional[SettingGetResponse]], ResultWrapper[SettingGetResponse]), ) @@ -147,7 +147,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingUpdateResponse: + ) -> Optional[SettingUpdateResponse]: """Enable or disable zone-level authenticated origin pulls. 'enabled' should be set @@ -177,9 +177,9 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[SettingUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[SettingUpdateResponse]]._unwrapper, ), - cast_to=cast(Type[SettingUpdateResponse], ResultWrapper[SettingUpdateResponse]), + cast_to=cast(Type[Optional[SettingUpdateResponse]], ResultWrapper[SettingUpdateResponse]), ) async def get( @@ -192,7 +192,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingGetResponse: + ) -> Optional[SettingGetResponse]: """Get whether zone-level authenticated origin pulls is enabled or not. It is false @@ -218,9 +218,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[SettingGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[SettingGetResponse]]._unwrapper, ), - cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]), + cast_to=cast(Type[Optional[SettingGetResponse]], ResultWrapper[SettingGetResponse]), ) diff --git a/src/cloudflare/resources/pagerules/pagerules.py b/src/cloudflare/resources/pagerules/pagerules.py index cc4dc3a4bdf..e27797213d8 100644 --- a/src/cloudflare/resources/pagerules/pagerules.py +++ b/src/cloudflare/resources/pagerules/pagerules.py @@ -36,7 +36,6 @@ pagerule_edit_params, pagerule_list_params, pagerule_create_params, - pagerule_delete_params, pagerule_update_params, ) from ...types.pagerules.route_param import RouteParam @@ -277,7 +276,6 @@ def delete( pagerule_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -307,7 +305,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `pagerule_id` but received {pagerule_id!r}") return self._delete( f"/zones/{zone_id}/pagerules/{pagerule_id}", - body=maybe_transform(body, pagerule_delete_params.PageruleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -669,7 +666,6 @@ async def delete( pagerule_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -699,7 +695,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `pagerule_id` but received {pagerule_id!r}") return await self._delete( f"/zones/{zone_id}/pagerules/{pagerule_id}", - body=await async_maybe_transform(body, pagerule_delete_params.PageruleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/pages/projects/deployments/deployments.py b/src/cloudflare/resources/pages/projects/deployments/deployments.py index afc233c1feb..366eb26eacd 100644 --- a/src/cloudflare/resources/pages/projects/deployments/deployments.py +++ b/src/cloudflare/resources/pages/projects/deployments/deployments.py @@ -39,7 +39,6 @@ deployment_list_params, deployment_retry_params, deployment_create_params, - deployment_delete_params, deployment_rollback_params, ) from .....types.pages.deployment import Deployment @@ -165,7 +164,6 @@ def delete( *, account_id: str, project_name: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -199,7 +197,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}") return self._delete( f"/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}", - body=maybe_transform(body, deployment_delete_params.DeploymentDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -478,7 +475,6 @@ async def delete( *, account_id: str, project_name: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -512,7 +508,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}") return await self._delete( f"/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}", - body=await async_maybe_transform(body, deployment_delete_params.DeploymentDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/pages/projects/domains.py b/src/cloudflare/resources/pages/projects/domains.py index d968c436061..65054b9aa45 100644 --- a/src/cloudflare/resources/pages/projects/domains.py +++ b/src/cloudflare/resources/pages/projects/domains.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.pages.projects import domain_edit_params, domain_create_params, domain_delete_params +from ....types.pages.projects import domain_edit_params, domain_create_params from ....types.pages.projects.domain_get_response import DomainGetResponse from ....types.pages.projects.domain_edit_response import DomainEditResponse from ....types.pages.projects.domain_create_response import DomainCreateResponse @@ -140,7 +140,6 @@ def delete( *, account_id: str, project_name: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -174,7 +173,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `domain_name` but received {domain_name!r}") return self._delete( f"/accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}", - body=maybe_transform(body, domain_delete_params.DomainDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -399,7 +397,6 @@ async def delete( *, account_id: str, project_name: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -433,7 +430,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `domain_name` but received {domain_name!r}") return await self._delete( f"/accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}", - body=await async_maybe_transform(body, domain_delete_params.DomainDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/pages/projects/projects.py b/src/cloudflare/resources/pages/projects/projects.py index d2090062d4f..09b5912fffb 100644 --- a/src/cloudflare/resources/pages/projects/projects.py +++ b/src/cloudflare/resources/pages/projects/projects.py @@ -37,7 +37,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ....types.pages import Deployment, project_edit_params, project_create_params, project_delete_params +from ....types.pages import Deployment, project_edit_params, project_create_params from ...._base_client import ( AsyncPaginator, make_request_options, @@ -179,7 +179,6 @@ def delete( project_name: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -209,7 +208,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}") return self._delete( f"/accounts/{account_id}/pages/projects/{project_name}", - body=maybe_transform(body, project_delete_params.ProjectDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -481,7 +479,6 @@ async def delete( project_name: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -511,7 +508,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}") return await self._delete( f"/accounts/{account_id}/pages/projects/{project_name}", - body=await async_maybe_transform(body, project_delete_params.ProjectDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/queues/consumers.py b/src/cloudflare/resources/queues/consumers.py index b7b0ce5e999..9854d15ce64 100644 --- a/src/cloudflare/resources/queues/consumers.py +++ b/src/cloudflare/resources/queues/consumers.py @@ -23,7 +23,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.queues import consumer_create_params, consumer_delete_params, consumer_update_params +from ...types.queues import consumer_create_params, consumer_update_params from ...types.queues.consumer_get_response import ConsumerGetResponse from ...types.queues.consumer_create_response import ConsumerCreateResponse from ...types.queues.consumer_delete_response import ConsumerDeleteResponse @@ -144,7 +144,6 @@ def delete( *, account_id: str, queue_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -180,7 +179,6 @@ def delete( Optional[ConsumerDeleteResponse], self._delete( f"/accounts/{account_id}/queues/{queue_id}/consumers/{consumer_id}", - body=maybe_transform(body, consumer_delete_params.ConsumerDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -351,7 +349,6 @@ async def delete( *, account_id: str, queue_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -387,7 +384,6 @@ async def delete( Optional[ConsumerDeleteResponse], await self._delete( f"/accounts/{account_id}/queues/{queue_id}/consumers/{consumer_id}", - body=await async_maybe_transform(body, consumer_delete_params.ConsumerDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/queues/queues.py b/src/cloudflare/resources/queues/queues.py index f2fcb6c814c..39a6012d574 100644 --- a/src/cloudflare/resources/queues/queues.py +++ b/src/cloudflare/resources/queues/queues.py @@ -41,7 +41,7 @@ AsyncPaginator, make_request_options, ) -from ...types.queues import queue_create_params, queue_delete_params, queue_update_params +from ...types.queues import queue_create_params, queue_update_params from ...types.queues.queue import Queue from ...types.queues.queue_created import QueueCreated from ...types.queues.queue_updated import QueueUpdated @@ -195,7 +195,6 @@ def delete( queue_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -227,7 +226,6 @@ def delete( Optional[QueueDeleteResponse], self._delete( f"/accounts/{account_id}/queues/{queue_id}", - body=maybe_transform(body, queue_delete_params.QueueDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -431,7 +429,6 @@ async def delete( queue_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -463,7 +460,6 @@ async def delete( Optional[QueueDeleteResponse], await self._delete( f"/accounts/{account_id}/queues/{queue_id}", - body=await async_maybe_transform(body, queue_delete_params.QueueDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/radar/http/summary.py b/src/cloudflare/resources/radar/http/summary.py index 7e71b2aa987..12defd73b00 100644 --- a/src/cloudflare/resources/radar/http/summary.py +++ b/src/cloudflare/resources/radar/http/summary.py @@ -32,6 +32,7 @@ summary_device_type_params, summary_tls_version_params, summary_http_version_params, + summary_post_quantum_params, summary_http_protocol_params, ) from ....types.radar.http.summary_os_response import SummaryOSResponse @@ -40,6 +41,7 @@ from ....types.radar.http.summary_device_type_response import SummaryDeviceTypeResponse from ....types.radar.http.summary_tls_version_response import SummaryTLSVersionResponse from ....types.radar.http.summary_http_version_response import SummaryHTTPVersionResponse +from ....types.radar.http.summary_post_quantum_response import SummaryPostQuantumResponse from ....types.radar.http.summary_http_protocol_response import SummaryHTTPProtocolResponse __all__ = ["SummaryResource", "AsyncSummaryResource"] @@ -803,6 +805,135 @@ def os( cast_to=cast(Type[SummaryOSResponse], ResultWrapper[SummaryOSResponse]), ) + def post_quantum( + self, + *, + asn: List[str] | NotGiven = NOT_GIVEN, + bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[ + Literal[ + "1d", + "2d", + "7d", + "14d", + "28d", + "12w", + "24w", + "52w", + "1dControl", + "2dControl", + "7dControl", + "14dControl", + "28dControl", + "12wControl", + "24wControl", + ] + ] + | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[str] | NotGiven = NOT_GIVEN, + os: List[Literal["WINDOWS", "MACOSX", "IOS", "ANDROID", "CHROMEOS", "LINUX", "SMART_TV"]] + | NotGiven = NOT_GIVEN, + tls_version: List[Literal["TLSv1_0", "TLSv1_1", "TLSv1_2", "TLSv1_3", "TLSvQUIC"]] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SummaryPostQuantumResponse: + """ + Percentage distribution of traffic per Post Quantum support over a given time + period. + + Args: + asn: Array of comma separated list of ASNs, start with `-` to exclude from results. + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + + bot_class: Filter for bot class. Refer to + [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + + continent: Array of comma separated list of continents (alpha-2 continent codes). Start + with `-` to exclude from results. For example, `-EU,NA` excludes results from + Europe, but includes results from North America. + + date_end: End of the date range (inclusive). + + date_range: For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + + date_start: Array of datetimes to filter the start of a series. + + device_type: Filter for device type. + + format: Format results are returned in. + + http_protocol: Filter for http protocol. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + + location: Array of comma separated list of locations (alpha-2 country codes). Start with + `-` to exclude from results. For example, `-US,PT` excludes results from the US, + but includes results from PT. + + name: Array of names that will be used to name the series in responses. + + os: Filter for os name. + + tls_version: Filter for tls version. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/radar/http/summary/post_quantum", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "asn": asn, + "bot_class": bot_class, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "device_type": device_type, + "format": format, + "http_protocol": http_protocol, + "http_version": http_version, + "ip_version": ip_version, + "location": location, + "name": name, + "os": os, + "tls_version": tls_version, + }, + summary_post_quantum_params.SummaryPostQuantumParams, + ), + post_parser=ResultWrapper[SummaryPostQuantumResponse]._unwrapper, + ), + cast_to=cast(Type[SummaryPostQuantumResponse], ResultWrapper[SummaryPostQuantumResponse]), + ) + def tls_version( self, *, @@ -1687,6 +1818,135 @@ async def os( cast_to=cast(Type[SummaryOSResponse], ResultWrapper[SummaryOSResponse]), ) + async def post_quantum( + self, + *, + asn: List[str] | NotGiven = NOT_GIVEN, + bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[ + Literal[ + "1d", + "2d", + "7d", + "14d", + "28d", + "12w", + "24w", + "52w", + "1dControl", + "2dControl", + "7dControl", + "14dControl", + "28dControl", + "12wControl", + "24wControl", + ] + ] + | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[str] | NotGiven = NOT_GIVEN, + os: List[Literal["WINDOWS", "MACOSX", "IOS", "ANDROID", "CHROMEOS", "LINUX", "SMART_TV"]] + | NotGiven = NOT_GIVEN, + tls_version: List[Literal["TLSv1_0", "TLSv1_1", "TLSv1_2", "TLSv1_3", "TLSvQUIC"]] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SummaryPostQuantumResponse: + """ + Percentage distribution of traffic per Post Quantum support over a given time + period. + + Args: + asn: Array of comma separated list of ASNs, start with `-` to exclude from results. + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + + bot_class: Filter for bot class. Refer to + [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + + continent: Array of comma separated list of continents (alpha-2 continent codes). Start + with `-` to exclude from results. For example, `-EU,NA` excludes results from + Europe, but includes results from North America. + + date_end: End of the date range (inclusive). + + date_range: For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + + date_start: Array of datetimes to filter the start of a series. + + device_type: Filter for device type. + + format: Format results are returned in. + + http_protocol: Filter for http protocol. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + + location: Array of comma separated list of locations (alpha-2 country codes). Start with + `-` to exclude from results. For example, `-US,PT` excludes results from the US, + but includes results from PT. + + name: Array of names that will be used to name the series in responses. + + os: Filter for os name. + + tls_version: Filter for tls version. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/radar/http/summary/post_quantum", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "asn": asn, + "bot_class": bot_class, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "device_type": device_type, + "format": format, + "http_protocol": http_protocol, + "http_version": http_version, + "ip_version": ip_version, + "location": location, + "name": name, + "os": os, + "tls_version": tls_version, + }, + summary_post_quantum_params.SummaryPostQuantumParams, + ), + post_parser=ResultWrapper[SummaryPostQuantumResponse]._unwrapper, + ), + cast_to=cast(Type[SummaryPostQuantumResponse], ResultWrapper[SummaryPostQuantumResponse]), + ) + async def tls_version( self, *, @@ -1835,6 +2095,9 @@ def __init__(self, summary: SummaryResource) -> None: self.os = to_raw_response_wrapper( summary.os, ) + self.post_quantum = to_raw_response_wrapper( + summary.post_quantum, + ) self.tls_version = to_raw_response_wrapper( summary.tls_version, ) @@ -1862,6 +2125,9 @@ def __init__(self, summary: AsyncSummaryResource) -> None: self.os = async_to_raw_response_wrapper( summary.os, ) + self.post_quantum = async_to_raw_response_wrapper( + summary.post_quantum, + ) self.tls_version = async_to_raw_response_wrapper( summary.tls_version, ) @@ -1889,6 +2155,9 @@ def __init__(self, summary: SummaryResource) -> None: self.os = to_streamed_response_wrapper( summary.os, ) + self.post_quantum = to_streamed_response_wrapper( + summary.post_quantum, + ) self.tls_version = to_streamed_response_wrapper( summary.tls_version, ) @@ -1916,6 +2185,9 @@ def __init__(self, summary: AsyncSummaryResource) -> None: self.os = async_to_streamed_response_wrapper( summary.os, ) + self.post_quantum = async_to_streamed_response_wrapper( + summary.post_quantum, + ) self.tls_version = async_to_streamed_response_wrapper( summary.tls_version, ) diff --git a/src/cloudflare/resources/radar/http/timeseries_groups.py b/src/cloudflare/resources/radar/http/timeseries_groups.py index 4ba8bea28f9..6dcf5fd060d 100644 --- a/src/cloudflare/resources/radar/http/timeseries_groups.py +++ b/src/cloudflare/resources/radar/http/timeseries_groups.py @@ -33,6 +33,7 @@ timeseries_group_device_type_params, timeseries_group_tls_version_params, timeseries_group_http_version_params, + timeseries_group_post_quantum_params, timeseries_group_http_protocol_params, timeseries_group_browser_family_params, ) @@ -43,6 +44,7 @@ from ....types.radar.http.timeseries_group_device_type_response import TimeseriesGroupDeviceTypeResponse from ....types.radar.http.timeseries_group_tls_version_response import TimeseriesGroupTLSVersionResponse from ....types.radar.http.timeseries_group_http_version_response import TimeseriesGroupHTTPVersionResponse +from ....types.radar.http.timeseries_group_post_quantum_response import TimeseriesGroupPostQuantumResponse from ....types.radar.http.timeseries_group_http_protocol_response import TimeseriesGroupHTTPProtocolResponse from ....types.radar.http.timeseries_group_browser_family_response import TimeseriesGroupBrowserFamilyResponse @@ -1119,6 +1121,141 @@ def os( cast_to=cast(Type[TimeseriesGroupOSResponse], ResultWrapper[TimeseriesGroupOSResponse]), ) + def post_quantum( + self, + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[ + Literal[ + "1d", + "2d", + "7d", + "14d", + "28d", + "12w", + "24w", + "52w", + "1dControl", + "2dControl", + "7dControl", + "14dControl", + "28dControl", + "12wControl", + "24wControl", + ] + ] + | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[str] | NotGiven = NOT_GIVEN, + os: List[Literal["WINDOWS", "MACOSX", "IOS", "ANDROID", "CHROMEOS", "LINUX", "SMART_TV"]] + | NotGiven = NOT_GIVEN, + tls_version: List[Literal["TLSv1_0", "TLSv1_1", "TLSv1_2", "TLSv1_3", "TLSvQUIC"]] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> TimeseriesGroupPostQuantumResponse: + """ + Get a time series of the percentage distribution of traffic per Post Quantum + suport. + + Args: + agg_interval: Aggregation interval results should be returned in (for example, in 15 minutes + or 1 hour intervals). Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Array of comma separated list of ASNs, start with `-` to exclude from results. + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + + bot_class: Filter for bot class. Refer to + [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + + continent: Array of comma separated list of continents (alpha-2 continent codes). Start + with `-` to exclude from results. For example, `-EU,NA` excludes results from + Europe, but includes results from North America. + + date_end: End of the date range (inclusive). + + date_range: For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + + date_start: Array of datetimes to filter the start of a series. + + device_type: Filter for device type. + + format: Format results are returned in. + + http_protocol: Filter for http protocol. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + + location: Array of comma separated list of locations (alpha-2 country codes). Start with + `-` to exclude from results. For example, `-US,PT` excludes results from the US, + but includes results from PT. + + name: Array of names that will be used to name the series in responses. + + os: Filter for os name. + + tls_version: Filter for tls version. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/radar/http/timeseries_groups/post_quantum", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot_class": bot_class, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "device_type": device_type, + "format": format, + "http_protocol": http_protocol, + "http_version": http_version, + "ip_version": ip_version, + "location": location, + "name": name, + "os": os, + "tls_version": tls_version, + }, + timeseries_group_post_quantum_params.TimeseriesGroupPostQuantumParams, + ), + post_parser=ResultWrapper[TimeseriesGroupPostQuantumResponse]._unwrapper, + ), + cast_to=cast(Type[TimeseriesGroupPostQuantumResponse], ResultWrapper[TimeseriesGroupPostQuantumResponse]), + ) + def tls_version( self, *, @@ -2321,6 +2458,141 @@ async def os( cast_to=cast(Type[TimeseriesGroupOSResponse], ResultWrapper[TimeseriesGroupOSResponse]), ) + async def post_quantum( + self, + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[ + Literal[ + "1d", + "2d", + "7d", + "14d", + "28d", + "12w", + "24w", + "52w", + "1dControl", + "2dControl", + "7dControl", + "14dControl", + "28dControl", + "12wControl", + "24wControl", + ] + ] + | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + device_type: List[Literal["DESKTOP", "MOBILE", "OTHER"]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, + http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, + ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[str] | NotGiven = NOT_GIVEN, + os: List[Literal["WINDOWS", "MACOSX", "IOS", "ANDROID", "CHROMEOS", "LINUX", "SMART_TV"]] + | NotGiven = NOT_GIVEN, + tls_version: List[Literal["TLSv1_0", "TLSv1_1", "TLSv1_2", "TLSv1_3", "TLSvQUIC"]] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> TimeseriesGroupPostQuantumResponse: + """ + Get a time series of the percentage distribution of traffic per Post Quantum + suport. + + Args: + agg_interval: Aggregation interval results should be returned in (for example, in 15 minutes + or 1 hour intervals). Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Array of comma separated list of ASNs, start with `-` to exclude from results. + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + + bot_class: Filter for bot class. Refer to + [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + + continent: Array of comma separated list of continents (alpha-2 continent codes). Start + with `-` to exclude from results. For example, `-EU,NA` excludes results from + Europe, but includes results from North America. + + date_end: End of the date range (inclusive). + + date_range: For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + + date_start: Array of datetimes to filter the start of a series. + + device_type: Filter for device type. + + format: Format results are returned in. + + http_protocol: Filter for http protocol. + + http_version: Filter for http version. + + ip_version: Filter for ip version. + + location: Array of comma separated list of locations (alpha-2 country codes). Start with + `-` to exclude from results. For example, `-US,PT` excludes results from the US, + but includes results from PT. + + name: Array of names that will be used to name the series in responses. + + os: Filter for os name. + + tls_version: Filter for tls version. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/radar/http/timeseries_groups/post_quantum", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot_class": bot_class, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "device_type": device_type, + "format": format, + "http_protocol": http_protocol, + "http_version": http_version, + "ip_version": ip_version, + "location": location, + "name": name, + "os": os, + "tls_version": tls_version, + }, + timeseries_group_post_quantum_params.TimeseriesGroupPostQuantumParams, + ), + post_parser=ResultWrapper[TimeseriesGroupPostQuantumResponse]._unwrapper, + ), + cast_to=cast(Type[TimeseriesGroupPostQuantumResponse], ResultWrapper[TimeseriesGroupPostQuantumResponse]), + ) + async def tls_version( self, *, @@ -2481,6 +2753,9 @@ def __init__(self, timeseries_groups: TimeseriesGroupsResource) -> None: self.os = to_raw_response_wrapper( timeseries_groups.os, ) + self.post_quantum = to_raw_response_wrapper( + timeseries_groups.post_quantum, + ) self.tls_version = to_raw_response_wrapper( timeseries_groups.tls_version, ) @@ -2514,6 +2789,9 @@ def __init__(self, timeseries_groups: AsyncTimeseriesGroupsResource) -> None: self.os = async_to_raw_response_wrapper( timeseries_groups.os, ) + self.post_quantum = async_to_raw_response_wrapper( + timeseries_groups.post_quantum, + ) self.tls_version = async_to_raw_response_wrapper( timeseries_groups.tls_version, ) @@ -2547,6 +2825,9 @@ def __init__(self, timeseries_groups: TimeseriesGroupsResource) -> None: self.os = to_streamed_response_wrapper( timeseries_groups.os, ) + self.post_quantum = to_streamed_response_wrapper( + timeseries_groups.post_quantum, + ) self.tls_version = to_streamed_response_wrapper( timeseries_groups.tls_version, ) @@ -2580,6 +2861,9 @@ def __init__(self, timeseries_groups: AsyncTimeseriesGroupsResource) -> None: self.os = async_to_streamed_response_wrapper( timeseries_groups.os, ) + self.post_quantum = async_to_streamed_response_wrapper( + timeseries_groups.post_quantum, + ) self.tls_version = async_to_streamed_response_wrapper( timeseries_groups.tls_version, ) diff --git a/src/cloudflare/resources/rate_limits.py b/src/cloudflare/resources/rate_limits.py index 0cd9e9f3118..caae09d9f21 100644 --- a/src/cloudflare/resources/rate_limits.py +++ b/src/cloudflare/resources/rate_limits.py @@ -25,12 +25,7 @@ AsyncPaginator, make_request_options, ) -from ..types.rate_limits import ( - rate_limit_edit_params, - rate_limit_list_params, - rate_limit_create_params, - rate_limit_delete_params, -) +from ..types.rate_limits import rate_limit_edit_params, rate_limit_list_params, rate_limit_create_params from ..types.rate_limits.rate_limit import RateLimit from ..types.rate_limits.rate_limit_get_response import RateLimitGetResponse from ..types.rate_limits.rate_limit_edit_response import RateLimitEditResponse @@ -155,7 +150,6 @@ def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -185,7 +179,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._delete( f"/zones/{zone_identifier}/rate_limits/{id}", - body=maybe_transform(body, rate_limit_delete_params.RateLimitDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -412,7 +405,6 @@ async def delete( id: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -442,7 +434,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._delete( f"/zones/{zone_identifier}/rate_limits/{id}", - body=await async_maybe_transform(body, rate_limit_delete_params.RateLimitDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/rules/lists/items.py b/src/cloudflare/resources/rules/lists/items.py index 40d4f5062cc..7e101796486 100644 --- a/src/cloudflare/resources/rules/lists/items.py +++ b/src/cloudflare/resources/rules/lists/items.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.rules.lists import item_list_params, item_create_params, item_delete_params, item_update_params +from ....types.rules.lists import item_list_params, item_create_params, item_update_params from ....types.rules.lists.item_get_response import ItemGetResponse from ....types.rules.lists.item_create_response import ItemCreateResponse from ....types.rules.lists.item_delete_response import ItemDeleteResponse @@ -218,7 +218,6 @@ def delete( list_id: str, *, account_id: str, - items: Iterable[item_delete_params.Item] | 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. extra_headers: Headers | None = None, @@ -253,7 +252,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") return self._delete( f"/accounts/{account_id}/rules/lists/{list_id}/items", - body=maybe_transform({"items": items}, item_delete_params.ItemDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -503,7 +501,6 @@ async def delete( list_id: str, *, account_id: str, - items: Iterable[item_delete_params.Item] | 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. extra_headers: Headers | None = None, @@ -538,7 +535,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") return await self._delete( f"/accounts/{account_id}/rules/lists/{list_id}/items", - body=await async_maybe_transform({"items": items}, item_delete_params.ItemDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/rules/lists/lists.py b/src/cloudflare/resources/rules/lists/lists.py index e871dfed56a..31f16742c7d 100644 --- a/src/cloudflare/resources/rules/lists/lists.py +++ b/src/cloudflare/resources/rules/lists/lists.py @@ -30,7 +30,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ....types.rules import list_create_params, list_delete_params, list_update_params +from ....types.rules import list_create_params, list_update_params from ...._base_client import ( AsyncPaginator, make_request_options, @@ -212,7 +212,6 @@ def delete( list_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -242,7 +241,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") return self._delete( f"/accounts/{account_id}/rules/lists/{list_id}", - body=maybe_transform(body, list_delete_params.ListDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -461,7 +459,6 @@ async def delete( list_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -491,7 +488,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") return await self._delete( f"/accounts/{account_id}/rules/lists/{list_id}", - body=await async_maybe_transform(body, list_delete_params.ListDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/rulesets/phases/phases.py b/src/cloudflare/resources/rulesets/phases/phases.py index 05b1b1c7e49..5cb0317d0fa 100644 --- a/src/cloudflare/resources/rulesets/phases/phases.py +++ b/src/cloudflare/resources/rulesets/phases/phases.py @@ -3,7 +3,6 @@ from __future__ import annotations from typing import Type, Iterable, cast -from typing_extensions import Literal import httpx @@ -32,7 +31,9 @@ from ...._base_client import ( make_request_options, ) -from ....types.rulesets import phase_update_params +from ....types.rulesets import Kind, Phase, phase_update_params +from ....types.rulesets.kind import Kind +from ....types.rulesets.phase import Phase from ....types.rulesets.phase_get_response import PhaseGetResponse from ....types.rulesets.phase_update_response import PhaseUpdateResponse @@ -54,64 +55,15 @@ def with_streaming_response(self) -> PhasesResourceWithStreamingResponse: def update( self, - ruleset_phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + ruleset_phase: Phase, *, rules: Iterable[phase_update_params.Rule], account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, - kind: Literal["managed", "custom", "root", "zone"] | NotGiven = NOT_GIVEN, + kind: Kind | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - | NotGiven = NOT_GIVEN, + phase: Phase | 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. extra_headers: Headers | None = None, @@ -185,31 +137,7 @@ def update( def get( self, - ruleset_phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + ruleset_phase: Phase, *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, @@ -281,64 +209,15 @@ def with_streaming_response(self) -> AsyncPhasesResourceWithStreamingResponse: async def update( self, - ruleset_phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + ruleset_phase: Phase, *, rules: Iterable[phase_update_params.Rule], account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, - kind: Literal["managed", "custom", "root", "zone"] | NotGiven = NOT_GIVEN, + kind: Kind | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - | NotGiven = NOT_GIVEN, + phase: Phase | 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. extra_headers: Headers | None = None, @@ -412,31 +291,7 @@ async def update( async def get( self, - ruleset_phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + ruleset_phase: Phase, *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/rulesets/phases/versions.py b/src/cloudflare/resources/rulesets/phases/versions.py index 96e68eee754..60967a5872f 100644 --- a/src/cloudflare/resources/rulesets/phases/versions.py +++ b/src/cloudflare/resources/rulesets/phases/versions.py @@ -3,7 +3,6 @@ from __future__ import annotations from typing import Type, cast -from typing_extensions import Literal import httpx @@ -22,6 +21,8 @@ AsyncPaginator, make_request_options, ) +from ....types.rulesets import Phase +from ....types.rulesets.phase import Phase from ....types.rulesets.ruleset import Ruleset from ....types.rulesets.phases.version_get_response import VersionGetResponse @@ -39,31 +40,7 @@ def with_streaming_response(self) -> VersionsResourceWithStreamingResponse: def list( self, - ruleset_phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + ruleset_phase: Phase, *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, @@ -119,31 +96,7 @@ def get( self, ruleset_version: str, *, - ruleset_phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + ruleset_phase: Phase, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -213,31 +166,7 @@ def with_streaming_response(self) -> AsyncVersionsResourceWithStreamingResponse: def list( self, - ruleset_phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + ruleset_phase: Phase, *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, @@ -293,31 +222,7 @@ async def get( self, ruleset_version: str, *, - ruleset_phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + ruleset_phase: Phase, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | 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/cloudflare/resources/rulesets/rulesets.py b/src/cloudflare/resources/rulesets/rulesets.py index 5c040db3ff0..f28542d39f5 100644 --- a/src/cloudflare/resources/rulesets/rulesets.py +++ b/src/cloudflare/resources/rulesets/rulesets.py @@ -3,7 +3,6 @@ from __future__ import annotations from typing import Type, Iterable, cast -from typing_extensions import Literal import httpx @@ -51,8 +50,10 @@ AsyncPaginator, make_request_options, ) -from ...types.rulesets import ruleset_create_params, ruleset_update_params +from ...types.rulesets import Kind, Phase, ruleset_create_params, ruleset_update_params from .versions.versions import VersionsResource, AsyncVersionsResource +from ...types.rulesets.kind import Kind +from ...types.rulesets.phase import Phase from ...types.rulesets.ruleset import Ruleset from ...types.rulesets.ruleset_get_response import RulesetGetResponse from ...types.rulesets.ruleset_create_response import RulesetCreateResponse @@ -85,33 +86,9 @@ def with_streaming_response(self) -> RulesetsResourceWithStreamingResponse: def create( self, *, - kind: Literal["managed", "custom", "root", "zone"], + kind: Kind, name: str, - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + phase: Phase, rules: Iterable[ruleset_create_params.Rule], account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, @@ -191,34 +168,9 @@ def update( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, - kind: Literal["managed", "custom", "root", "zone"] | NotGiven = NOT_GIVEN, + kind: Kind | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - | NotGiven = NOT_GIVEN, + phase: Phase | 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. extra_headers: Headers | None = None, @@ -475,33 +427,9 @@ def with_streaming_response(self) -> AsyncRulesetsResourceWithStreamingResponse: async def create( self, *, - kind: Literal["managed", "custom", "root", "zone"], + kind: Kind, name: str, - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ], + phase: Phase, rules: Iterable[ruleset_create_params.Rule], account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, @@ -581,34 +509,9 @@ async def update( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, - kind: Literal["managed", "custom", "root", "zone"] | NotGiven = NOT_GIVEN, + kind: Kind | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - | NotGiven = NOT_GIVEN, + phase: Phase | 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. extra_headers: Headers | None = None, diff --git a/src/cloudflare/resources/secondary_dns/acls.py b/src/cloudflare/resources/secondary_dns/acls.py index 8041320f105..ec5c89c6865 100644 --- a/src/cloudflare/resources/secondary_dns/acls.py +++ b/src/cloudflare/resources/secondary_dns/acls.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ...types.secondary_dns import acl_create_params, acl_delete_params, acl_update_params +from ...types.secondary_dns import acl_create_params, acl_update_params from ...types.secondary_dns.acl import ACL from ...types.secondary_dns.acl_delete_response import ACLDeleteResponse @@ -176,7 +176,6 @@ def delete( acl_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -202,7 +201,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") return self._delete( f"/accounts/{account_id}/secondary_dns/acls/{acl_id}", - body=maybe_transform(body, acl_delete_params.ACLDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -398,7 +396,6 @@ async def delete( acl_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -424,7 +421,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") return await self._delete( f"/accounts/{account_id}/secondary_dns/acls/{acl_id}", - body=await async_maybe_transform(body, acl_delete_params.ACLDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/secondary_dns/incoming.py b/src/cloudflare/resources/secondary_dns/incoming.py index 6d5bc100692..1b6e5aa3d6a 100644 --- a/src/cloudflare/resources/secondary_dns/incoming.py +++ b/src/cloudflare/resources/secondary_dns/incoming.py @@ -23,7 +23,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.secondary_dns import incoming_create_params, incoming_delete_params, incoming_update_params +from ...types.secondary_dns import incoming_create_params, incoming_update_params from ...types.secondary_dns.incoming_get_response import IncomingGetResponse from ...types.secondary_dns.incoming_create_response import IncomingCreateResponse from ...types.secondary_dns.incoming_delete_response import IncomingDeleteResponse @@ -155,7 +155,6 @@ def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -179,7 +178,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._delete( f"/zones/{zone_id}/secondary_dns/incoming", - body=maybe_transform(body, incoming_delete_params.IncomingDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -351,7 +349,6 @@ async def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -375,7 +372,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return await self._delete( f"/zones/{zone_id}/secondary_dns/incoming", - body=await async_maybe_transform(body, incoming_delete_params.IncomingDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py b/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py index d330c9bd0e0..080b2ce8f1a 100644 --- a/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py +++ b/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py @@ -33,7 +33,6 @@ ) from ....types.secondary_dns import ( outgoing_create_params, - outgoing_delete_params, outgoing_enable_params, outgoing_update_params, outgoing_disable_params, @@ -167,7 +166,6 @@ def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -191,7 +189,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._delete( f"/zones/{zone_id}/secondary_dns/outgoing", - body=maybe_transform(body, outgoing_delete_params.OutgoingDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -475,7 +472,6 @@ async def delete( self, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -499,7 +495,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return await self._delete( f"/zones/{zone_id}/secondary_dns/outgoing", - body=await async_maybe_transform(body, outgoing_delete_params.OutgoingDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/secondary_dns/peers.py b/src/cloudflare/resources/secondary_dns/peers.py index 7e1d1344036..843cf963c96 100644 --- a/src/cloudflare/resources/secondary_dns/peers.py +++ b/src/cloudflare/resources/secondary_dns/peers.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ...types.secondary_dns import peer_create_params, peer_delete_params, peer_update_params +from ...types.secondary_dns import peer_create_params, peer_update_params from ...types.secondary_dns.peer import Peer from ...types.secondary_dns.peer_delete_response import PeerDeleteResponse @@ -190,7 +190,6 @@ def delete( peer_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -216,7 +215,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `peer_id` but received {peer_id!r}") return self._delete( f"/accounts/{account_id}/secondary_dns/peers/{peer_id}", - body=maybe_transform(body, peer_delete_params.PeerDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -426,7 +424,6 @@ async def delete( peer_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -452,7 +449,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `peer_id` but received {peer_id!r}") return await self._delete( f"/accounts/{account_id}/secondary_dns/peers/{peer_id}", - body=await async_maybe_transform(body, peer_delete_params.PeerDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/secondary_dns/tsigs.py b/src/cloudflare/resources/secondary_dns/tsigs.py index f1e73271efd..90ba72b0053 100644 --- a/src/cloudflare/resources/secondary_dns/tsigs.py +++ b/src/cloudflare/resources/secondary_dns/tsigs.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ...types.secondary_dns import tsig_create_params, tsig_delete_params, tsig_update_params +from ...types.secondary_dns import tsig_create_params, tsig_update_params from ...types.secondary_dns.tsig import TSIG from ...types.secondary_dns.tsig_delete_response import TSIGDeleteResponse @@ -191,7 +191,6 @@ def delete( tsig_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -217,7 +216,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `tsig_id` but received {tsig_id!r}") return self._delete( f"/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}", - body=maybe_transform(body, tsig_delete_params.TSIGDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -428,7 +426,6 @@ async def delete( tsig_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -454,7 +451,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `tsig_id` but received {tsig_id!r}") return await self._delete( f"/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}", - body=await async_maybe_transform(body, tsig_delete_params.TSIGDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/snippets/content.py b/src/cloudflare/resources/snippets/content.py index 3c010cbae16..a0b6d8f5a28 100644 --- a/src/cloudflare/resources/snippets/content.py +++ b/src/cloudflare/resources/snippets/content.py @@ -37,7 +37,7 @@ def get( self, snippet_name: str, *, - zone_identifier: str, + zone_id: str, # 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. extra_headers: Headers | None = None, @@ -49,7 +49,7 @@ def get( Snippet Content Args: - zone_identifier: Identifier + zone_id: Identifier snippet_name: Snippet identifying name @@ -61,13 +61,13 @@ def get( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") extra_headers = {"Accept": "multipart/form-data", **(extra_headers or {})} return self._get( - f"/zones/{zone_identifier}/snippets/{snippet_name}/content", + f"/zones/{zone_id}/snippets/{snippet_name}/content", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -88,7 +88,7 @@ async def get( self, snippet_name: str, *, - zone_identifier: str, + zone_id: str, # 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. extra_headers: Headers | None = None, @@ -100,7 +100,7 @@ async def get( Snippet Content Args: - zone_identifier: Identifier + zone_id: Identifier snippet_name: Snippet identifying name @@ -112,13 +112,13 @@ async def get( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") extra_headers = {"Accept": "multipart/form-data", **(extra_headers or {})} return await self._get( - f"/zones/{zone_identifier}/snippets/{snippet_name}/content", + f"/zones/{zone_id}/snippets/{snippet_name}/content", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/snippets/rules.py b/src/cloudflare/resources/snippets/rules.py index 29923f06348..5405a709a12 100644 --- a/src/cloudflare/resources/snippets/rules.py +++ b/src/cloudflare/resources/snippets/rules.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, cast +from typing import Type, Iterable, Optional, cast import httpx @@ -43,8 +43,8 @@ def with_streaming_response(self) -> RulesResourceWithStreamingResponse: def update( self, - zone_identifier: str, *, + zone_id: str, rules: Iterable[rule_update_params.Rule] | 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. @@ -52,12 +52,12 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleUpdateResponse: + ) -> Optional[RuleUpdateResponse]: """ Put Rules Args: - zone_identifier: Identifier + zone_id: Identifier rules: List of snippet rules @@ -69,25 +69,25 @@ def update( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._put( - f"/zones/{zone_identifier}/snippets/snippet_rules", + f"/zones/{zone_id}/snippets/snippet_rules", body=maybe_transform({"rules": rules}, rule_update_params.RuleUpdateParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[RuleUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[RuleUpdateResponse]]._unwrapper, ), - cast_to=cast(Type[RuleUpdateResponse], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), ) def list( self, - zone_identifier: str, *, + zone_id: str, # 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. extra_headers: Headers | None = None, @@ -99,7 +99,7 @@ def list( Rules Args: - zone_identifier: Identifier + zone_id: Identifier extra_headers: Send extra headers @@ -109,10 +109,10 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( - f"/zones/{zone_identifier}/snippets/snippet_rules", + f"/zones/{zone_id}/snippets/snippet_rules", page=SyncSinglePage[RuleListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout @@ -132,8 +132,8 @@ def with_streaming_response(self) -> AsyncRulesResourceWithStreamingResponse: async def update( self, - zone_identifier: str, *, + zone_id: str, rules: Iterable[rule_update_params.Rule] | 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. @@ -141,12 +141,12 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleUpdateResponse: + ) -> Optional[RuleUpdateResponse]: """ Put Rules Args: - zone_identifier: Identifier + zone_id: Identifier rules: List of snippet rules @@ -158,25 +158,25 @@ async def update( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return await self._put( - f"/zones/{zone_identifier}/snippets/snippet_rules", + f"/zones/{zone_id}/snippets/snippet_rules", body=await async_maybe_transform({"rules": rules}, rule_update_params.RuleUpdateParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[RuleUpdateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[RuleUpdateResponse]]._unwrapper, ), - cast_to=cast(Type[RuleUpdateResponse], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), ) def list( self, - zone_identifier: str, *, + zone_id: str, # 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. extra_headers: Headers | None = None, @@ -188,7 +188,7 @@ def list( Rules Args: - zone_identifier: Identifier + zone_id: Identifier extra_headers: Send extra headers @@ -198,10 +198,10 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( - f"/zones/{zone_identifier}/snippets/snippet_rules", + f"/zones/{zone_id}/snippets/snippet_rules", page=AsyncSinglePage[RuleListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout diff --git a/src/cloudflare/resources/snippets/snippets.py b/src/cloudflare/resources/snippets/snippets.py index 15d503d6bd1..5c1a0bb75b0 100644 --- a/src/cloudflare/resources/snippets/snippets.py +++ b/src/cloudflare/resources/snippets/snippets.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, cast +from typing import Type, Optional, cast import httpx @@ -69,7 +69,7 @@ def update( self, snippet_name: str, *, - zone_identifier: str, + zone_id: str, files: str | NotGiven = NOT_GIVEN, metadata: snippet_update_params.Metadata | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -78,12 +78,12 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Snippet: + ) -> Optional[Snippet]: """ Put Snippet Args: - zone_identifier: Identifier + zone_id: Identifier snippet_name: Snippet identifying name @@ -97,12 +97,12 @@ def update( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") return self._put( - f"/zones/{zone_identifier}/snippets/{snippet_name}", + f"/zones/{zone_id}/snippets/{snippet_name}", body=maybe_transform( { "files": files, @@ -115,15 +115,15 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Snippet]._unwrapper, + post_parser=ResultWrapper[Optional[Snippet]]._unwrapper, ), - cast_to=cast(Type[Snippet], ResultWrapper[Snippet]), + cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]), ) def list( self, - zone_identifier: str, *, + zone_id: str, # 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. extra_headers: Headers | None = None, @@ -135,7 +135,7 @@ def list( All Snippets Args: - zone_identifier: Identifier + zone_id: Identifier extra_headers: Send extra headers @@ -145,10 +145,10 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( - f"/zones/{zone_identifier}/snippets", + f"/zones/{zone_id}/snippets", page=SyncSinglePage[Snippet], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout @@ -160,7 +160,7 @@ def delete( self, snippet_name: str, *, - zone_identifier: str, + zone_id: str, # 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. extra_headers: Headers | None = None, @@ -172,7 +172,7 @@ def delete( Delete Snippet Args: - zone_identifier: Identifier + zone_id: Identifier snippet_name: Snippet identifying name @@ -184,44 +184,35 @@ def delete( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") - return cast( - SnippetDeleteResponse, - self._delete( - f"/zones/{zone_identifier}/snippets/{snippet_name}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[SnippetDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[SnippetDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._delete( + f"/zones/{zone_id}/snippets/{snippet_name}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=SnippetDeleteResponse, ) def get( self, snippet_name: str, *, - zone_identifier: str, + zone_id: str, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Snippet: + ) -> Optional[Snippet]: """ Snippet Args: - zone_identifier: Identifier + zone_id: Identifier snippet_name: Snippet identifying name @@ -233,20 +224,20 @@ def get( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") return self._get( - f"/zones/{zone_identifier}/snippets/{snippet_name}", + f"/zones/{zone_id}/snippets/{snippet_name}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Snippet]._unwrapper, + post_parser=ResultWrapper[Optional[Snippet]]._unwrapper, ), - cast_to=cast(Type[Snippet], ResultWrapper[Snippet]), + cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]), ) @@ -271,7 +262,7 @@ async def update( self, snippet_name: str, *, - zone_identifier: str, + zone_id: str, files: str | NotGiven = NOT_GIVEN, metadata: snippet_update_params.Metadata | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -280,12 +271,12 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Snippet: + ) -> Optional[Snippet]: """ Put Snippet Args: - zone_identifier: Identifier + zone_id: Identifier snippet_name: Snippet identifying name @@ -299,12 +290,12 @@ async def update( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") return await self._put( - f"/zones/{zone_identifier}/snippets/{snippet_name}", + f"/zones/{zone_id}/snippets/{snippet_name}", body=await async_maybe_transform( { "files": files, @@ -317,15 +308,15 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Snippet]._unwrapper, + post_parser=ResultWrapper[Optional[Snippet]]._unwrapper, ), - cast_to=cast(Type[Snippet], ResultWrapper[Snippet]), + cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]), ) def list( self, - zone_identifier: str, *, + zone_id: str, # 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. extra_headers: Headers | None = None, @@ -337,7 +328,7 @@ def list( All Snippets Args: - zone_identifier: Identifier + zone_id: Identifier extra_headers: Send extra headers @@ -347,10 +338,10 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( - f"/zones/{zone_identifier}/snippets", + f"/zones/{zone_id}/snippets", page=AsyncSinglePage[Snippet], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout @@ -362,7 +353,7 @@ async def delete( self, snippet_name: str, *, - zone_identifier: str, + zone_id: str, # 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. extra_headers: Headers | None = None, @@ -374,7 +365,7 @@ async def delete( Delete Snippet Args: - zone_identifier: Identifier + zone_id: Identifier snippet_name: Snippet identifying name @@ -386,44 +377,35 @@ async def delete( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") - return cast( - SnippetDeleteResponse, - await self._delete( - f"/zones/{zone_identifier}/snippets/{snippet_name}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[SnippetDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[SnippetDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._delete( + f"/zones/{zone_id}/snippets/{snippet_name}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=SnippetDeleteResponse, ) async def get( self, snippet_name: str, *, - zone_identifier: str, + zone_id: str, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Snippet: + ) -> Optional[Snippet]: """ Snippet Args: - zone_identifier: Identifier + zone_id: Identifier snippet_name: Snippet identifying name @@ -435,20 +417,20 @@ async def get( timeout: Override the client-level default timeout for this request, in seconds """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") return await self._get( - f"/zones/{zone_identifier}/snippets/{snippet_name}", + f"/zones/{zone_id}/snippets/{snippet_name}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Snippet]._unwrapper, + post_parser=ResultWrapper[Optional[Snippet]]._unwrapper, ), - cast_to=cast(Type[Snippet], ResultWrapper[Snippet]), + cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]), ) diff --git a/src/cloudflare/resources/spectrum/apps.py b/src/cloudflare/resources/spectrum/apps.py index 625cbb07ce5..2d29796de6e 100644 --- a/src/cloudflare/resources/spectrum/apps.py +++ b/src/cloudflare/resources/spectrum/apps.py @@ -26,12 +26,7 @@ AsyncPaginator, make_request_options, ) -from ...types.spectrum import ( - app_list_params, - app_create_params, - app_delete_params, - app_update_params, -) +from ...types.spectrum import app_list_params, app_create_params, app_update_params from ...types.spectrum.dns_param import DNSParam from ...types.spectrum.edge_ips_param import EdgeIPsParam from ...types.spectrum.app_get_response import AppGetResponse @@ -323,7 +318,6 @@ def delete( app_id: str, *, zone: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -353,7 +347,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `app_id` but received {app_id!r}") return self._delete( f"/zones/{zone}/spectrum/apps/{app_id}", - body=maybe_transform(body, app_delete_params.AppDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -693,7 +686,6 @@ async def delete( app_id: str, *, zone: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -723,7 +715,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `app_id` but received {app_id!r}") return await self._delete( f"/zones/{zone}/spectrum/apps/{app_id}", - body=await async_maybe_transform(body, app_delete_params.AppDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/speed/__init__.py b/src/cloudflare/resources/speed/__init__.py index c94c9837fa9..2c45eaaa70e 100644 --- a/src/cloudflare/resources/speed/__init__.py +++ b/src/cloudflare/resources/speed/__init__.py @@ -16,14 +16,6 @@ SpeedResourceWithStreamingResponse, AsyncSpeedResourceWithStreamingResponse, ) -from .tests import ( - TestsResource, - AsyncTestsResource, - TestsResourceWithRawResponse, - AsyncTestsResourceWithRawResponse, - TestsResourceWithStreamingResponse, - AsyncTestsResourceWithStreamingResponse, -) from .schedule import ( ScheduleResource, AsyncScheduleResource, @@ -42,12 +34,6 @@ ) __all__ = [ - "TestsResource", - "AsyncTestsResource", - "TestsResourceWithRawResponse", - "AsyncTestsResourceWithRawResponse", - "TestsResourceWithStreamingResponse", - "AsyncTestsResourceWithStreamingResponse", "ScheduleResource", "AsyncScheduleResource", "ScheduleResourceWithRawResponse", diff --git a/src/cloudflare/resources/speed/pages.py b/src/cloudflare/resources/speed/pages.py deleted file mode 100644 index b75c1c6d06b..00000000000 --- a/src/cloudflare/resources/speed/pages.py +++ /dev/null @@ -1,151 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) -from ...types.speed.page_list_response import PageListResponse - -__all__ = ["PagesResource", "AsyncPagesResource"] - - -class PagesResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> PagesResourceWithRawResponse: - return PagesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> PagesResourceWithStreamingResponse: - return PagesResourceWithStreamingResponse(self) - - def list( - self, - *, - zone_id: str, - # 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncSinglePage[PageListResponse]: - """ - Lists all webpages which have been tested. - - Args: - zone_id: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get_api_list( - f"/zones/{zone_id}/speed_api/pages", - page=SyncSinglePage[PageListResponse], - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - model=PageListResponse, - ) - - -class AsyncPagesResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncPagesResourceWithRawResponse: - return AsyncPagesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncPagesResourceWithStreamingResponse: - return AsyncPagesResourceWithStreamingResponse(self) - - def list( - self, - *, - zone_id: str, - # 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[PageListResponse, AsyncSinglePage[PageListResponse]]: - """ - Lists all webpages which have been tested. - - Args: - zone_id: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get_api_list( - f"/zones/{zone_id}/speed_api/pages", - page=AsyncSinglePage[PageListResponse], - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - model=PageListResponse, - ) - - -class PagesResourceWithRawResponse: - def __init__(self, pages: PagesResource) -> None: - self._pages = pages - - self.list = to_raw_response_wrapper( - pages.list, - ) - - -class AsyncPagesResourceWithRawResponse: - def __init__(self, pages: AsyncPagesResource) -> None: - self._pages = pages - - self.list = async_to_raw_response_wrapper( - pages.list, - ) - - -class PagesResourceWithStreamingResponse: - def __init__(self, pages: PagesResource) -> None: - self._pages = pages - - self.list = to_streamed_response_wrapper( - pages.list, - ) - - -class AsyncPagesResourceWithStreamingResponse: - def __init__(self, pages: AsyncPagesResource) -> None: - self._pages = pages - - self.list = async_to_streamed_response_wrapper( - pages.list, - ) diff --git a/src/cloudflare/resources/speed/pages/__init__.py b/src/cloudflare/resources/speed/pages/__init__.py new file mode 100644 index 00000000000..4c4bb43a6b6 --- /dev/null +++ b/src/cloudflare/resources/speed/pages/__init__.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .pages import ( + PagesResource, + AsyncPagesResource, + PagesResourceWithRawResponse, + AsyncPagesResourceWithRawResponse, + PagesResourceWithStreamingResponse, + AsyncPagesResourceWithStreamingResponse, +) +from .tests import ( + TestsResource, + AsyncTestsResource, + TestsResourceWithRawResponse, + AsyncTestsResourceWithRawResponse, + TestsResourceWithStreamingResponse, + AsyncTestsResourceWithStreamingResponse, +) + +__all__ = [ + "TestsResource", + "AsyncTestsResource", + "TestsResourceWithRawResponse", + "AsyncTestsResourceWithRawResponse", + "TestsResourceWithStreamingResponse", + "AsyncTestsResourceWithStreamingResponse", + "PagesResource", + "AsyncPagesResource", + "PagesResourceWithRawResponse", + "AsyncPagesResourceWithRawResponse", + "PagesResourceWithStreamingResponse", + "AsyncPagesResourceWithStreamingResponse", +] diff --git a/src/cloudflare/resources/speed/pages/pages.py b/src/cloudflare/resources/speed/pages/pages.py new file mode 100644 index 00000000000..7eab8c6dcf9 --- /dev/null +++ b/src/cloudflare/resources/speed/pages/pages.py @@ -0,0 +1,388 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, Union, Optional, cast +from datetime import datetime +from typing_extensions import Literal + +import httpx + +from .tests import ( + TestsResource, + AsyncTestsResource, + TestsResourceWithRawResponse, + AsyncTestsResourceWithRawResponse, + TestsResourceWithStreamingResponse, + AsyncTestsResourceWithStreamingResponse, +) +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import ( + maybe_transform, + async_maybe_transform, +) +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage +from ....types.speed import page_trend_params +from ...._base_client import ( + AsyncPaginator, + make_request_options, +) +from ....types.speed.trend import Trend +from ....types.speed.page_list_response import PageListResponse + +__all__ = ["PagesResource", "AsyncPagesResource"] + + +class PagesResource(SyncAPIResource): + @cached_property + def tests(self) -> TestsResource: + return TestsResource(self._client) + + @cached_property + def with_raw_response(self) -> PagesResourceWithRawResponse: + return PagesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> PagesResourceWithStreamingResponse: + return PagesResourceWithStreamingResponse(self) + + def list( + self, + *, + zone_id: str, + # 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncSinglePage[PageListResponse]: + """ + Lists all webpages which have been tested. + + Args: + zone_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + return self._get_api_list( + f"/zones/{zone_id}/speed_api/pages", + page=SyncSinglePage[PageListResponse], + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + model=PageListResponse, + ) + + def trend( + self, + url: str, + *, + zone_id: str, + device_type: Literal["DESKTOP", "MOBILE"], + metrics: str, + region: Literal[ + "asia-east1", + "asia-northeast1", + "asia-northeast2", + "asia-south1", + "asia-southeast1", + "australia-southeast1", + "europe-north1", + "europe-southwest1", + "europe-west1", + "europe-west2", + "europe-west3", + "europe-west4", + "europe-west8", + "europe-west9", + "me-west1", + "southamerica-east1", + "us-central1", + "us-east1", + "us-east4", + "us-south1", + "us-west1", + ], + start: Union[str, datetime], + tz: str, + end: Union[str, datetime] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[Trend]: + """ + Lists the core web vital metrics trend over time for a specific page. + + Args: + zone_id: Identifier + + url: A URL. + + device_type: The type of device. + + metrics: A comma-separated list of metrics to include in the results. + + region: A test region. + + tz: The timezone of the start and end timestamps. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not url: + raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") + return self._get( + f"/zones/{zone_id}/speed_api/pages/{url}/trend", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "device_type": device_type, + "metrics": metrics, + "region": region, + "start": start, + "tz": tz, + "end": end, + }, + page_trend_params.PageTrendParams, + ), + post_parser=ResultWrapper[Optional[Trend]]._unwrapper, + ), + cast_to=cast(Type[Optional[Trend]], ResultWrapper[Trend]), + ) + + +class AsyncPagesResource(AsyncAPIResource): + @cached_property + def tests(self) -> AsyncTestsResource: + return AsyncTestsResource(self._client) + + @cached_property + def with_raw_response(self) -> AsyncPagesResourceWithRawResponse: + return AsyncPagesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncPagesResourceWithStreamingResponse: + return AsyncPagesResourceWithStreamingResponse(self) + + def list( + self, + *, + zone_id: str, + # 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[PageListResponse, AsyncSinglePage[PageListResponse]]: + """ + Lists all webpages which have been tested. + + Args: + zone_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + return self._get_api_list( + f"/zones/{zone_id}/speed_api/pages", + page=AsyncSinglePage[PageListResponse], + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + model=PageListResponse, + ) + + async def trend( + self, + url: str, + *, + zone_id: str, + device_type: Literal["DESKTOP", "MOBILE"], + metrics: str, + region: Literal[ + "asia-east1", + "asia-northeast1", + "asia-northeast2", + "asia-south1", + "asia-southeast1", + "australia-southeast1", + "europe-north1", + "europe-southwest1", + "europe-west1", + "europe-west2", + "europe-west3", + "europe-west4", + "europe-west8", + "europe-west9", + "me-west1", + "southamerica-east1", + "us-central1", + "us-east1", + "us-east4", + "us-south1", + "us-west1", + ], + start: Union[str, datetime], + tz: str, + end: Union[str, datetime] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[Trend]: + """ + Lists the core web vital metrics trend over time for a specific page. + + Args: + zone_id: Identifier + + url: A URL. + + device_type: The type of device. + + metrics: A comma-separated list of metrics to include in the results. + + region: A test region. + + tz: The timezone of the start and end timestamps. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not url: + raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") + return await self._get( + f"/zones/{zone_id}/speed_api/pages/{url}/trend", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "device_type": device_type, + "metrics": metrics, + "region": region, + "start": start, + "tz": tz, + "end": end, + }, + page_trend_params.PageTrendParams, + ), + post_parser=ResultWrapper[Optional[Trend]]._unwrapper, + ), + cast_to=cast(Type[Optional[Trend]], ResultWrapper[Trend]), + ) + + +class PagesResourceWithRawResponse: + def __init__(self, pages: PagesResource) -> None: + self._pages = pages + + self.list = to_raw_response_wrapper( + pages.list, + ) + self.trend = to_raw_response_wrapper( + pages.trend, + ) + + @cached_property + def tests(self) -> TestsResourceWithRawResponse: + return TestsResourceWithRawResponse(self._pages.tests) + + +class AsyncPagesResourceWithRawResponse: + def __init__(self, pages: AsyncPagesResource) -> None: + self._pages = pages + + self.list = async_to_raw_response_wrapper( + pages.list, + ) + self.trend = async_to_raw_response_wrapper( + pages.trend, + ) + + @cached_property + def tests(self) -> AsyncTestsResourceWithRawResponse: + return AsyncTestsResourceWithRawResponse(self._pages.tests) + + +class PagesResourceWithStreamingResponse: + def __init__(self, pages: PagesResource) -> None: + self._pages = pages + + self.list = to_streamed_response_wrapper( + pages.list, + ) + self.trend = to_streamed_response_wrapper( + pages.trend, + ) + + @cached_property + def tests(self) -> TestsResourceWithStreamingResponse: + return TestsResourceWithStreamingResponse(self._pages.tests) + + +class AsyncPagesResourceWithStreamingResponse: + def __init__(self, pages: AsyncPagesResource) -> None: + self._pages = pages + + self.list = async_to_streamed_response_wrapper( + pages.list, + ) + self.trend = async_to_streamed_response_wrapper( + pages.trend, + ) + + @cached_property + def tests(self) -> AsyncTestsResourceWithStreamingResponse: + return AsyncTestsResourceWithStreamingResponse(self._pages.tests) diff --git a/src/cloudflare/resources/speed/tests.py b/src/cloudflare/resources/speed/pages/tests.py similarity index 97% rename from src/cloudflare/resources/speed/tests.py rename to src/cloudflare/resources/speed/pages/tests.py index 02a984f30a8..20a1a66f7af 100644 --- a/src/cloudflare/resources/speed/tests.py +++ b/src/cloudflare/resources/speed/pages/tests.py @@ -7,27 +7,27 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import ( maybe_transform, async_maybe_transform, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( to_raw_response_wrapper, to_streamed_response_wrapper, async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._wrappers import ResultWrapper -from ...types.speed import test_list_params, test_create_params, test_delete_params -from ..._base_client import ( +from ...._wrappers import ResultWrapper +from ...._base_client import ( make_request_options, ) -from ...types.speed.test import Test -from ...types.speed.test_list_response import TestListResponse -from ...types.speed.test_delete_response import TestDeleteResponse +from ....types.speed.pages import test_list_params, test_create_params, test_delete_params +from ....types.speed.pages.test import Test +from ....types.speed.pages.test_list_response import TestListResponse +from ....types.speed.pages.test_delete_response import TestDeleteResponse __all__ = ["TestsResource", "AsyncTestsResource"] diff --git a/src/cloudflare/resources/speed/schedule.py b/src/cloudflare/resources/speed/schedule.py index 44ab5e60ffc..1bc4cdf214a 100644 --- a/src/cloudflare/resources/speed/schedule.py +++ b/src/cloudflare/resources/speed/schedule.py @@ -21,11 +21,13 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.speed import schedule_create_params +from ...types.speed import schedule_get_params, schedule_create_params, schedule_delete_params from ..._base_client import ( make_request_options, ) +from ...types.speed.schedule import Schedule from ...types.speed.schedule_create_response import ScheduleCreateResponse +from ...types.speed.schedule_delete_response import ScheduleDeleteResponse __all__ = ["ScheduleResource", "AsyncScheduleResource"] @@ -110,6 +112,148 @@ def create( cast_to=cast(Type[Optional[ScheduleCreateResponse]], ResultWrapper[ScheduleCreateResponse]), ) + def delete( + self, + url: str, + *, + zone_id: str, + region: Literal[ + "asia-east1", + "asia-northeast1", + "asia-northeast2", + "asia-south1", + "asia-southeast1", + "australia-southeast1", + "europe-north1", + "europe-southwest1", + "europe-west1", + "europe-west2", + "europe-west3", + "europe-west4", + "europe-west8", + "europe-west9", + "me-west1", + "southamerica-east1", + "us-central1", + "us-east1", + "us-east4", + "us-south1", + "us-west1", + ] + | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[ScheduleDeleteResponse]: + """ + Deletes a scheduled test for a page. + + Args: + zone_id: Identifier + + url: A URL. + + region: A test region. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not url: + raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") + return self._delete( + f"/zones/{zone_id}/speed_api/schedule/{url}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"region": region}, schedule_delete_params.ScheduleDeleteParams), + post_parser=ResultWrapper[Optional[ScheduleDeleteResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[ScheduleDeleteResponse]], ResultWrapper[ScheduleDeleteResponse]), + ) + + def get( + self, + url: str, + *, + zone_id: str, + region: Literal[ + "asia-east1", + "asia-northeast1", + "asia-northeast2", + "asia-south1", + "asia-southeast1", + "australia-southeast1", + "europe-north1", + "europe-southwest1", + "europe-west1", + "europe-west2", + "europe-west3", + "europe-west4", + "europe-west8", + "europe-west9", + "me-west1", + "southamerica-east1", + "us-central1", + "us-east1", + "us-east4", + "us-south1", + "us-west1", + ] + | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[Schedule]: + """ + Retrieves the test schedule for a page in a specific region. + + Args: + zone_id: Identifier + + url: A URL. + + region: A test region. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not url: + raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") + return self._get( + f"/zones/{zone_id}/speed_api/schedule/{url}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"region": region}, schedule_get_params.ScheduleGetParams), + post_parser=ResultWrapper[Optional[Schedule]]._unwrapper, + ), + cast_to=cast(Type[Optional[Schedule]], ResultWrapper[Schedule]), + ) + class AsyncScheduleResource(AsyncAPIResource): @cached_property @@ -191,6 +335,148 @@ async def create( cast_to=cast(Type[Optional[ScheduleCreateResponse]], ResultWrapper[ScheduleCreateResponse]), ) + async def delete( + self, + url: str, + *, + zone_id: str, + region: Literal[ + "asia-east1", + "asia-northeast1", + "asia-northeast2", + "asia-south1", + "asia-southeast1", + "australia-southeast1", + "europe-north1", + "europe-southwest1", + "europe-west1", + "europe-west2", + "europe-west3", + "europe-west4", + "europe-west8", + "europe-west9", + "me-west1", + "southamerica-east1", + "us-central1", + "us-east1", + "us-east4", + "us-south1", + "us-west1", + ] + | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[ScheduleDeleteResponse]: + """ + Deletes a scheduled test for a page. + + Args: + zone_id: Identifier + + url: A URL. + + region: A test region. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not url: + raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") + return await self._delete( + f"/zones/{zone_id}/speed_api/schedule/{url}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform({"region": region}, schedule_delete_params.ScheduleDeleteParams), + post_parser=ResultWrapper[Optional[ScheduleDeleteResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[ScheduleDeleteResponse]], ResultWrapper[ScheduleDeleteResponse]), + ) + + async def get( + self, + url: str, + *, + zone_id: str, + region: Literal[ + "asia-east1", + "asia-northeast1", + "asia-northeast2", + "asia-south1", + "asia-southeast1", + "australia-southeast1", + "europe-north1", + "europe-southwest1", + "europe-west1", + "europe-west2", + "europe-west3", + "europe-west4", + "europe-west8", + "europe-west9", + "me-west1", + "southamerica-east1", + "us-central1", + "us-east1", + "us-east4", + "us-south1", + "us-west1", + ] + | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[Schedule]: + """ + Retrieves the test schedule for a page in a specific region. + + Args: + zone_id: Identifier + + url: A URL. + + region: A test region. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not url: + raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") + return await self._get( + f"/zones/{zone_id}/speed_api/schedule/{url}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform({"region": region}, schedule_get_params.ScheduleGetParams), + post_parser=ResultWrapper[Optional[Schedule]]._unwrapper, + ), + cast_to=cast(Type[Optional[Schedule]], ResultWrapper[Schedule]), + ) + class ScheduleResourceWithRawResponse: def __init__(self, schedule: ScheduleResource) -> None: @@ -199,6 +485,12 @@ def __init__(self, schedule: ScheduleResource) -> None: self.create = to_raw_response_wrapper( schedule.create, ) + self.delete = to_raw_response_wrapper( + schedule.delete, + ) + self.get = to_raw_response_wrapper( + schedule.get, + ) class AsyncScheduleResourceWithRawResponse: @@ -208,6 +500,12 @@ def __init__(self, schedule: AsyncScheduleResource) -> None: self.create = async_to_raw_response_wrapper( schedule.create, ) + self.delete = async_to_raw_response_wrapper( + schedule.delete, + ) + self.get = async_to_raw_response_wrapper( + schedule.get, + ) class ScheduleResourceWithStreamingResponse: @@ -217,6 +515,12 @@ def __init__(self, schedule: ScheduleResource) -> None: self.create = to_streamed_response_wrapper( schedule.create, ) + self.delete = to_streamed_response_wrapper( + schedule.delete, + ) + self.get = to_streamed_response_wrapper( + schedule.get, + ) class AsyncScheduleResourceWithStreamingResponse: @@ -226,3 +530,9 @@ def __init__(self, schedule: AsyncScheduleResource) -> None: self.create = async_to_streamed_response_wrapper( schedule.create, ) + self.delete = async_to_streamed_response_wrapper( + schedule.delete, + ) + self.get = async_to_streamed_response_wrapper( + schedule.get, + ) diff --git a/src/cloudflare/resources/speed/speed.py b/src/cloudflare/resources/speed/speed.py index 478aad8507c..83abbebfa82 100644 --- a/src/cloudflare/resources/speed/speed.py +++ b/src/cloudflare/resources/speed/speed.py @@ -2,12 +2,6 @@ from __future__ import annotations -from typing import Type, Union, Optional, cast -from datetime import datetime -from typing_extensions import Literal - -import httpx - from .pages import ( PagesResource, AsyncPagesResource, @@ -16,19 +10,6 @@ PagesResourceWithStreamingResponse, AsyncPagesResourceWithStreamingResponse, ) -from .tests import ( - TestsResource, - AsyncTestsResource, - TestsResourceWithRawResponse, - AsyncTestsResourceWithRawResponse, - TestsResourceWithStreamingResponse, - AsyncTestsResourceWithStreamingResponse, -) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) from .schedule import ( ScheduleResource, AsyncScheduleResource, @@ -39,17 +20,7 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._wrappers import ResultWrapper -from ...types.speed import speed_delete_params, speed_trends_list_params, speed_schedule_get_params -from ..._base_client import ( - make_request_options, -) +from .pages.pages import PagesResource, AsyncPagesResource from .availabilities import ( AvailabilitiesResource, AsyncAvailabilitiesResource, @@ -58,18 +29,11 @@ AvailabilitiesResourceWithStreamingResponse, AsyncAvailabilitiesResourceWithStreamingResponse, ) -from ...types.speed.trend import Trend -from ...types.speed.schedule import Schedule -from ...types.speed.speed_delete_response import SpeedDeleteResponse __all__ = ["SpeedResource", "AsyncSpeedResource"] class SpeedResource(SyncAPIResource): - @cached_property - def tests(self) -> TestsResource: - return TestsResource(self._client) - @cached_property def schedule(self) -> ScheduleResource: return ScheduleResource(self._client) @@ -90,245 +54,8 @@ def with_raw_response(self) -> SpeedResourceWithRawResponse: def with_streaming_response(self) -> SpeedResourceWithStreamingResponse: return SpeedResourceWithStreamingResponse(self) - def delete( - self, - url: str, - *, - zone_id: str, - region: Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ] - | 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SpeedDeleteResponse]: - """ - Deletes a scheduled test for a page. - - Args: - zone_id: Identifier - - url: A URL. - - region: A test region. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - if not url: - raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") - return self._delete( - f"/zones/{zone_id}/speed_api/schedule/{url}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform({"region": region}, speed_delete_params.SpeedDeleteParams), - post_parser=ResultWrapper[Optional[SpeedDeleteResponse]]._unwrapper, - ), - cast_to=cast(Type[Optional[SpeedDeleteResponse]], ResultWrapper[SpeedDeleteResponse]), - ) - - def schedule_get( - self, - url: str, - *, - zone_id: str, - region: Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ] - | 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Schedule]: - """ - Retrieves the test schedule for a page in a specific region. - - Args: - zone_id: Identifier - - url: A URL. - - region: A test region. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - if not url: - raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") - return self._get( - f"/zones/{zone_id}/speed_api/schedule/{url}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform({"region": region}, speed_schedule_get_params.SpeedScheduleGetParams), - post_parser=ResultWrapper[Optional[Schedule]]._unwrapper, - ), - cast_to=cast(Type[Optional[Schedule]], ResultWrapper[Schedule]), - ) - - def trends_list( - self, - url: str, - *, - zone_id: str, - device_type: Literal["DESKTOP", "MOBILE"], - metrics: str, - region: Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ], - start: Union[str, datetime], - tz: str, - end: Union[str, datetime] | 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Trend]: - """ - Lists the core web vital metrics trend over time for a specific page. - - Args: - zone_id: Identifier - - url: A URL. - - device_type: The type of device. - - metrics: A comma-separated list of metrics to include in the results. - - region: A test region. - - tz: The timezone of the start and end timestamps. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - if not url: - raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") - return self._get( - f"/zones/{zone_id}/speed_api/pages/{url}/trend", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "device_type": device_type, - "metrics": metrics, - "region": region, - "start": start, - "tz": tz, - "end": end, - }, - speed_trends_list_params.SpeedTrendsListParams, - ), - post_parser=ResultWrapper[Optional[Trend]]._unwrapper, - ), - cast_to=cast(Type[Optional[Trend]], ResultWrapper[Trend]), - ) - class AsyncSpeedResource(AsyncAPIResource): - @cached_property - def tests(self) -> AsyncTestsResource: - return AsyncTestsResource(self._client) - @cached_property def schedule(self) -> AsyncScheduleResource: return AsyncScheduleResource(self._client) @@ -349,258 +76,11 @@ def with_raw_response(self) -> AsyncSpeedResourceWithRawResponse: def with_streaming_response(self) -> AsyncSpeedResourceWithStreamingResponse: return AsyncSpeedResourceWithStreamingResponse(self) - async def delete( - self, - url: str, - *, - zone_id: str, - region: Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ] - | 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SpeedDeleteResponse]: - """ - Deletes a scheduled test for a page. - - Args: - zone_id: Identifier - - url: A URL. - - region: A test region. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - if not url: - raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") - return await self._delete( - f"/zones/{zone_id}/speed_api/schedule/{url}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform({"region": region}, speed_delete_params.SpeedDeleteParams), - post_parser=ResultWrapper[Optional[SpeedDeleteResponse]]._unwrapper, - ), - cast_to=cast(Type[Optional[SpeedDeleteResponse]], ResultWrapper[SpeedDeleteResponse]), - ) - - async def schedule_get( - self, - url: str, - *, - zone_id: str, - region: Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ] - | 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Schedule]: - """ - Retrieves the test schedule for a page in a specific region. - - Args: - zone_id: Identifier - - url: A URL. - - region: A test region. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - if not url: - raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") - return await self._get( - f"/zones/{zone_id}/speed_api/schedule/{url}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform({"region": region}, speed_schedule_get_params.SpeedScheduleGetParams), - post_parser=ResultWrapper[Optional[Schedule]]._unwrapper, - ), - cast_to=cast(Type[Optional[Schedule]], ResultWrapper[Schedule]), - ) - - async def trends_list( - self, - url: str, - *, - zone_id: str, - device_type: Literal["DESKTOP", "MOBILE"], - metrics: str, - region: Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ], - start: Union[str, datetime], - tz: str, - end: Union[str, datetime] | 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Trend]: - """ - Lists the core web vital metrics trend over time for a specific page. - - Args: - zone_id: Identifier - - url: A URL. - - device_type: The type of device. - - metrics: A comma-separated list of metrics to include in the results. - - region: A test region. - - tz: The timezone of the start and end timestamps. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - if not url: - raise ValueError(f"Expected a non-empty value for `url` but received {url!r}") - return await self._get( - f"/zones/{zone_id}/speed_api/pages/{url}/trend", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - { - "device_type": device_type, - "metrics": metrics, - "region": region, - "start": start, - "tz": tz, - "end": end, - }, - speed_trends_list_params.SpeedTrendsListParams, - ), - post_parser=ResultWrapper[Optional[Trend]]._unwrapper, - ), - cast_to=cast(Type[Optional[Trend]], ResultWrapper[Trend]), - ) - class SpeedResourceWithRawResponse: def __init__(self, speed: SpeedResource) -> None: self._speed = speed - self.delete = to_raw_response_wrapper( - speed.delete, - ) - self.schedule_get = to_raw_response_wrapper( - speed.schedule_get, - ) - self.trends_list = to_raw_response_wrapper( - speed.trends_list, - ) - - @cached_property - def tests(self) -> TestsResourceWithRawResponse: - return TestsResourceWithRawResponse(self._speed.tests) - @cached_property def schedule(self) -> ScheduleResourceWithRawResponse: return ScheduleResourceWithRawResponse(self._speed.schedule) @@ -618,20 +98,6 @@ class AsyncSpeedResourceWithRawResponse: def __init__(self, speed: AsyncSpeedResource) -> None: self._speed = speed - self.delete = async_to_raw_response_wrapper( - speed.delete, - ) - self.schedule_get = async_to_raw_response_wrapper( - speed.schedule_get, - ) - self.trends_list = async_to_raw_response_wrapper( - speed.trends_list, - ) - - @cached_property - def tests(self) -> AsyncTestsResourceWithRawResponse: - return AsyncTestsResourceWithRawResponse(self._speed.tests) - @cached_property def schedule(self) -> AsyncScheduleResourceWithRawResponse: return AsyncScheduleResourceWithRawResponse(self._speed.schedule) @@ -649,20 +115,6 @@ class SpeedResourceWithStreamingResponse: def __init__(self, speed: SpeedResource) -> None: self._speed = speed - self.delete = to_streamed_response_wrapper( - speed.delete, - ) - self.schedule_get = to_streamed_response_wrapper( - speed.schedule_get, - ) - self.trends_list = to_streamed_response_wrapper( - speed.trends_list, - ) - - @cached_property - def tests(self) -> TestsResourceWithStreamingResponse: - return TestsResourceWithStreamingResponse(self._speed.tests) - @cached_property def schedule(self) -> ScheduleResourceWithStreamingResponse: return ScheduleResourceWithStreamingResponse(self._speed.schedule) @@ -680,20 +132,6 @@ class AsyncSpeedResourceWithStreamingResponse: def __init__(self, speed: AsyncSpeedResource) -> None: self._speed = speed - self.delete = async_to_streamed_response_wrapper( - speed.delete, - ) - self.schedule_get = async_to_streamed_response_wrapper( - speed.schedule_get, - ) - self.trends_list = async_to_streamed_response_wrapper( - speed.trends_list, - ) - - @cached_property - def tests(self) -> AsyncTestsResourceWithStreamingResponse: - return AsyncTestsResourceWithStreamingResponse(self._speed.tests) - @cached_property def schedule(self) -> AsyncScheduleResourceWithStreamingResponse: return AsyncScheduleResourceWithStreamingResponse(self._speed.schedule) diff --git a/src/cloudflare/resources/ssl/analyze.py b/src/cloudflare/resources/ssl/analyze.py index 12396528143..7736fb778a3 100644 --- a/src/cloudflare/resources/ssl/analyze.py +++ b/src/cloudflare/resources/ssl/analyze.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, cast +from typing import Any, Optional, cast import httpx @@ -52,7 +52,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AnalyzeCreateResponse: + ) -> Optional[AnalyzeCreateResponse]: """ Returns the set of hostnames, the signature algorithm, and the expiration date of the certificate. @@ -78,7 +78,7 @@ def create( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - AnalyzeCreateResponse, + Optional[AnalyzeCreateResponse], self._post( f"/zones/{zone_id}/ssl/analyze", body=maybe_transform( @@ -93,7 +93,7 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[AnalyzeCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[AnalyzeCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[AnalyzeCreateResponse] @@ -123,7 +123,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AnalyzeCreateResponse: + ) -> Optional[AnalyzeCreateResponse]: """ Returns the set of hostnames, the signature algorithm, and the expiration date of the certificate. @@ -149,7 +149,7 @@ async def create( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - AnalyzeCreateResponse, + Optional[AnalyzeCreateResponse], await self._post( f"/zones/{zone_id}/ssl/analyze", body=await async_maybe_transform( @@ -164,7 +164,7 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[AnalyzeCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[AnalyzeCreateResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[AnalyzeCreateResponse] diff --git a/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py b/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py index 895db8720e1..b1d841e10ca 100644 --- a/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py +++ b/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, cast +from typing import Any, Type, Optional, cast from typing_extensions import Literal import httpx @@ -37,7 +37,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....types.ssl import certificate_pack_edit_params, certificate_pack_list_params, certificate_pack_delete_params +from ....types.ssl import certificate_pack_edit_params, certificate_pack_list_params from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( AsyncPaginator, @@ -115,14 +115,13 @@ def delete( certificate_pack_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificatePackDeleteResponse: + ) -> Optional[CertificatePackDeleteResponse]: """ For a given zone, delete an advanced certificate pack. @@ -147,15 +146,14 @@ def delete( ) return self._delete( f"/zones/{zone_id}/ssl/certificate_packs/{certificate_pack_id}", - body=maybe_transform(body, certificate_pack_delete_params.CertificatePackDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificatePackDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificatePackDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[CertificatePackDeleteResponse], ResultWrapper[CertificatePackDeleteResponse]), + cast_to=cast(Type[Optional[CertificatePackDeleteResponse]], ResultWrapper[CertificatePackDeleteResponse]), ) def edit( @@ -170,7 +168,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificatePackEditResponse: + ) -> Optional[CertificatePackEditResponse]: """For a given zone, restart validation for an advanced certificate pack. This is @@ -204,9 +202,9 @@ def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificatePackEditResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificatePackEditResponse]]._unwrapper, ), - cast_to=cast(Type[CertificatePackEditResponse], ResultWrapper[CertificatePackEditResponse]), + cast_to=cast(Type[Optional[CertificatePackEditResponse]], ResultWrapper[CertificatePackEditResponse]), ) def get( @@ -220,7 +218,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificatePackGetResponse: + ) -> Optional[CertificatePackGetResponse]: """ For a given zone, get a certificate pack. @@ -244,7 +242,7 @@ def get( f"Expected a non-empty value for `certificate_pack_id` but received {certificate_pack_id!r}" ) return cast( - CertificatePackGetResponse, + Optional[CertificatePackGetResponse], self._get( f"/zones/{zone_id}/ssl/certificate_packs/{certificate_pack_id}", options=make_request_options( @@ -252,7 +250,7 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificatePackGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificatePackGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[CertificatePackGetResponse] @@ -326,14 +324,13 @@ async def delete( certificate_pack_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificatePackDeleteResponse: + ) -> Optional[CertificatePackDeleteResponse]: """ For a given zone, delete an advanced certificate pack. @@ -358,15 +355,14 @@ async def delete( ) return await self._delete( f"/zones/{zone_id}/ssl/certificate_packs/{certificate_pack_id}", - body=await async_maybe_transform(body, certificate_pack_delete_params.CertificatePackDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificatePackDeleteResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificatePackDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[CertificatePackDeleteResponse], ResultWrapper[CertificatePackDeleteResponse]), + cast_to=cast(Type[Optional[CertificatePackDeleteResponse]], ResultWrapper[CertificatePackDeleteResponse]), ) async def edit( @@ -381,7 +377,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificatePackEditResponse: + ) -> Optional[CertificatePackEditResponse]: """For a given zone, restart validation for an advanced certificate pack. This is @@ -415,9 +411,9 @@ async def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificatePackEditResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificatePackEditResponse]]._unwrapper, ), - cast_to=cast(Type[CertificatePackEditResponse], ResultWrapper[CertificatePackEditResponse]), + cast_to=cast(Type[Optional[CertificatePackEditResponse]], ResultWrapper[CertificatePackEditResponse]), ) async def get( @@ -431,7 +427,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificatePackGetResponse: + ) -> Optional[CertificatePackGetResponse]: """ For a given zone, get a certificate pack. @@ -455,7 +451,7 @@ async def get( f"Expected a non-empty value for `certificate_pack_id` but received {certificate_pack_id!r}" ) return cast( - CertificatePackGetResponse, + Optional[CertificatePackGetResponse], await self._get( f"/zones/{zone_id}/ssl/certificate_packs/{certificate_pack_id}", options=make_request_options( @@ -463,7 +459,7 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[CertificatePackGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[CertificatePackGetResponse]]._unwrapper, ), cast_to=cast( Any, ResultWrapper[CertificatePackGetResponse] diff --git a/src/cloudflare/resources/ssl/certificate_packs/order.py b/src/cloudflare/resources/ssl/certificate_packs/order.py index 05885aa8747..2f1e7e4e871 100644 --- a/src/cloudflare/resources/ssl/certificate_packs/order.py +++ b/src/cloudflare/resources/ssl/certificate_packs/order.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Type, cast +from typing import List, Type, Optional, cast from typing_extensions import Literal import httpx @@ -56,7 +56,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OrderCreateResponse: + ) -> Optional[OrderCreateResponse]: """ For a given zone, order an advanced certificate pack. @@ -107,9 +107,9 @@ def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OrderCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OrderCreateResponse]]._unwrapper, ), - cast_to=cast(Type[OrderCreateResponse], ResultWrapper[OrderCreateResponse]), + cast_to=cast(Type[Optional[OrderCreateResponse]], ResultWrapper[OrderCreateResponse]), ) @@ -138,7 +138,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OrderCreateResponse: + ) -> Optional[OrderCreateResponse]: """ For a given zone, order an advanced certificate pack. @@ -189,9 +189,9 @@ async def create( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[OrderCreateResponse]._unwrapper, + post_parser=ResultWrapper[Optional[OrderCreateResponse]]._unwrapper, ), - cast_to=cast(Type[OrderCreateResponse], ResultWrapper[OrderCreateResponse]), + cast_to=cast(Type[Optional[OrderCreateResponse]], ResultWrapper[OrderCreateResponse]), ) diff --git a/src/cloudflare/resources/ssl/certificate_packs/quota.py b/src/cloudflare/resources/ssl/certificate_packs/quota.py index 33bd534e992..c641a1906e8 100644 --- a/src/cloudflare/resources/ssl/certificate_packs/quota.py +++ b/src/cloudflare/resources/ssl/certificate_packs/quota.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -43,7 +43,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> QuotaGetResponse: + ) -> Optional[QuotaGetResponse]: """ For a given zone, list certificate pack quotas. @@ -67,9 +67,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[QuotaGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[QuotaGetResponse]]._unwrapper, ), - cast_to=cast(Type[QuotaGetResponse], ResultWrapper[QuotaGetResponse]), + cast_to=cast(Type[Optional[QuotaGetResponse]], ResultWrapper[QuotaGetResponse]), ) @@ -92,7 +92,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> QuotaGetResponse: + ) -> Optional[QuotaGetResponse]: """ For a given zone, list certificate pack quotas. @@ -116,9 +116,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[QuotaGetResponse]._unwrapper, + post_parser=ResultWrapper[Optional[QuotaGetResponse]]._unwrapper, ), - cast_to=cast(Type[QuotaGetResponse], ResultWrapper[QuotaGetResponse]), + cast_to=cast(Type[Optional[QuotaGetResponse]], ResultWrapper[QuotaGetResponse]), ) diff --git a/src/cloudflare/resources/ssl/universal/settings.py b/src/cloudflare/resources/ssl/universal/settings.py index fb5657634bd..b50248a086a 100644 --- a/src/cloudflare/resources/ssl/universal/settings.py +++ b/src/cloudflare/resources/ssl/universal/settings.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Type, Optional, cast import httpx @@ -49,7 +49,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UniversalSSLSettings: + ) -> Optional[UniversalSSLSettings]: """ Patch Universal SSL Settings for a Zone. @@ -100,9 +100,9 @@ def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[UniversalSSLSettings]._unwrapper, + post_parser=ResultWrapper[Optional[UniversalSSLSettings]]._unwrapper, ), - cast_to=cast(Type[UniversalSSLSettings], ResultWrapper[UniversalSSLSettings]), + cast_to=cast(Type[Optional[UniversalSSLSettings]], ResultWrapper[UniversalSSLSettings]), ) def get( @@ -115,7 +115,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UniversalSSLSettings: + ) -> Optional[UniversalSSLSettings]: """ Get Universal SSL Settings for a Zone. @@ -139,9 +139,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[UniversalSSLSettings]._unwrapper, + post_parser=ResultWrapper[Optional[UniversalSSLSettings]]._unwrapper, ), - cast_to=cast(Type[UniversalSSLSettings], ResultWrapper[UniversalSSLSettings]), + cast_to=cast(Type[Optional[UniversalSSLSettings]], ResultWrapper[UniversalSSLSettings]), ) @@ -165,7 +165,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UniversalSSLSettings: + ) -> Optional[UniversalSSLSettings]: """ Patch Universal SSL Settings for a Zone. @@ -216,9 +216,9 @@ async def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[UniversalSSLSettings]._unwrapper, + post_parser=ResultWrapper[Optional[UniversalSSLSettings]]._unwrapper, ), - cast_to=cast(Type[UniversalSSLSettings], ResultWrapper[UniversalSSLSettings]), + cast_to=cast(Type[Optional[UniversalSSLSettings]], ResultWrapper[UniversalSSLSettings]), ) async def get( @@ -231,7 +231,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UniversalSSLSettings: + ) -> Optional[UniversalSSLSettings]: """ Get Universal SSL Settings for a Zone. @@ -255,9 +255,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[UniversalSSLSettings]._unwrapper, + post_parser=ResultWrapper[Optional[UniversalSSLSettings]]._unwrapper, ), - cast_to=cast(Type[UniversalSSLSettings], ResultWrapper[UniversalSSLSettings]), + cast_to=cast(Type[Optional[UniversalSSLSettings]], ResultWrapper[UniversalSSLSettings]), ) diff --git a/src/cloudflare/resources/ssl/verification.py b/src/cloudflare/resources/ssl/verification.py index d55186e3bb5..832d313ec8b 100644 --- a/src/cloudflare/resources/ssl/verification.py +++ b/src/cloudflare/resources/ssl/verification.py @@ -52,7 +52,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VerificationEditResponse: + ) -> Optional[VerificationEditResponse]: """Edit SSL validation method for a certificate pack. A PATCH request will request @@ -91,9 +91,9 @@ def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[VerificationEditResponse]._unwrapper, + post_parser=ResultWrapper[Optional[VerificationEditResponse]]._unwrapper, ), - cast_to=cast(Type[VerificationEditResponse], ResultWrapper[VerificationEditResponse]), + cast_to=cast(Type[Optional[VerificationEditResponse]], ResultWrapper[VerificationEditResponse]), ) def get( @@ -161,7 +161,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VerificationEditResponse: + ) -> Optional[VerificationEditResponse]: """Edit SSL validation method for a certificate pack. A PATCH request will request @@ -200,9 +200,9 @@ async def edit( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[VerificationEditResponse]._unwrapper, + post_parser=ResultWrapper[Optional[VerificationEditResponse]]._unwrapper, ), - cast_to=cast(Type[VerificationEditResponse], ResultWrapper[VerificationEditResponse]), + cast_to=cast(Type[Optional[VerificationEditResponse]], ResultWrapper[VerificationEditResponse]), ) async def get( diff --git a/src/cloudflare/resources/stream/captions/language/language.py b/src/cloudflare/resources/stream/captions/language/language.py index 67482e4a9a7..34ca70cdff5 100644 --- a/src/cloudflare/resources/stream/captions/language/language.py +++ b/src/cloudflare/resources/stream/captions/language/language.py @@ -32,7 +32,7 @@ make_request_options, ) from .....types.stream.caption import Caption -from .....types.stream.captions import language_delete_params, language_update_params +from .....types.stream.captions import language_update_params from .....types.stream.captions.language_delete_response import LanguageDeleteResponse __all__ = ["LanguageResource", "AsyncLanguageResource"] @@ -111,7 +111,6 @@ def delete( *, account_id: str, identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -145,7 +144,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `language` but received {language!r}") return self._delete( f"/accounts/{account_id}/stream/{identifier}/captions/{language}", - body=maybe_transform(body, language_delete_params.LanguageDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -279,7 +277,6 @@ async def delete( *, account_id: str, identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -313,7 +310,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `language` but received {language!r}") return await self._delete( f"/accounts/{account_id}/stream/{identifier}/captions/{language}", - body=await async_maybe_transform(body, language_delete_params.LanguageDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/stream/keys.py b/src/cloudflare/resources/stream/keys.py index 979b687da15..dee3531fb43 100644 --- a/src/cloudflare/resources/stream/keys.py +++ b/src/cloudflare/resources/stream/keys.py @@ -23,7 +23,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.stream import key_create_params, key_delete_params +from ...types.stream import key_create_params from ...types.stream.keys import Keys from ...types.stream.key_get_response import KeyGetResponse from ...types.stream.key_delete_response import KeyDeleteResponse @@ -89,7 +89,6 @@ def delete( identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -121,7 +120,6 @@ def delete( Optional[KeyDeleteResponse], self._delete( f"/accounts/{account_id}/stream/keys/{identifier}", - body=maybe_transform(body, key_delete_params.KeyDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -233,7 +231,6 @@ async def delete( identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -265,7 +262,6 @@ async def delete( Optional[KeyDeleteResponse], await self._delete( f"/accounts/{account_id}/stream/keys/{identifier}", - body=await async_maybe_transform(body, key_delete_params.KeyDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/stream/live_inputs/live_inputs.py b/src/cloudflare/resources/stream/live_inputs/live_inputs.py index 23522cf5456..442706aab62 100644 --- a/src/cloudflare/resources/stream/live_inputs/live_inputs.py +++ b/src/cloudflare/resources/stream/live_inputs/live_inputs.py @@ -31,12 +31,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.stream import ( - live_input_list_params, - live_input_create_params, - live_input_delete_params, - live_input_update_params, -) +from ....types.stream import live_input_list_params, live_input_create_params, live_input_update_params from ....types.stream.live_input import LiveInput from ....types.stream.live_input_list_response import LiveInputListResponse @@ -249,7 +244,6 @@ def delete( live_input_identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -283,7 +277,6 @@ def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( f"/accounts/{account_id}/stream/live_inputs/{live_input_identifier}", - body=maybe_transform(body, live_input_delete_params.LiveInputDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -545,7 +538,6 @@ async def delete( live_input_identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -579,7 +571,6 @@ async def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( f"/accounts/{account_id}/stream/live_inputs/{live_input_identifier}", - body=await async_maybe_transform(body, live_input_delete_params.LiveInputDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/stream/live_inputs/outputs.py b/src/cloudflare/resources/stream/live_inputs/outputs.py index f786543bccc..af1464d04a7 100644 --- a/src/cloudflare/resources/stream/live_inputs/outputs.py +++ b/src/cloudflare/resources/stream/live_inputs/outputs.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.stream.live_inputs import output_create_params, output_delete_params, output_update_params +from ....types.stream.live_inputs import output_create_params, output_update_params from ....types.stream.live_inputs.output import Output __all__ = ["OutputsResource", "AsyncOutputsResource"] @@ -217,7 +217,6 @@ def delete( *, account_id: str, live_input_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -254,7 +253,6 @@ def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( f"/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs/{output_identifier}", - body=maybe_transform(body, output_delete_params.OutputDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -448,7 +446,6 @@ async def delete( *, account_id: str, live_input_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -485,7 +482,6 @@ async def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( f"/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs/{output_identifier}", - body=await async_maybe_transform(body, output_delete_params.OutputDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/stream/stream.py b/src/cloudflare/resources/stream/stream.py index 8504084ea70..4a66a234404 100644 --- a/src/cloudflare/resources/stream/stream.py +++ b/src/cloudflare/resources/stream/stream.py @@ -131,7 +131,7 @@ AsyncPaginator, make_request_options, ) -from ...types.stream import stream_list_params, stream_create_params, stream_delete_params +from ...types.stream import stream_list_params, stream_create_params from .captions.captions import CaptionsResource, AsyncCaptionsResource from ...types.stream.video import Video from .live_inputs.live_inputs import LiveInputsResource, AsyncLiveInputsResource @@ -328,7 +328,6 @@ def delete( identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -359,7 +358,6 @@ def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( f"/accounts/{account_id}/stream/{identifier}", - body=maybe_transform(body, stream_delete_params.StreamDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -600,7 +598,6 @@ async def delete( identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -631,7 +628,6 @@ async def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( f"/accounts/{account_id}/stream/{identifier}", - body=await async_maybe_transform(body, stream_delete_params.StreamDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/stream/watermarks.py b/src/cloudflare/resources/stream/watermarks.py index 7eae7369bd7..bb80780d25d 100644 --- a/src/cloudflare/resources/stream/watermarks.py +++ b/src/cloudflare/resources/stream/watermarks.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ...types.stream import watermark_create_params, watermark_delete_params +from ...types.stream import watermark_create_params from ...types.stream.watermark import Watermark from ...types.stream.watermark_delete_response import WatermarkDeleteResponse @@ -160,7 +160,6 @@ def delete( identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -192,7 +191,6 @@ def delete( Optional[WatermarkDeleteResponse], self._delete( f"/accounts/{account_id}/stream/watermarks/{identifier}", - body=maybe_transform(body, watermark_delete_params.WatermarkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -379,7 +377,6 @@ async def delete( identifier: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -411,7 +408,6 @@ async def delete( Optional[WatermarkDeleteResponse], await self._delete( f"/accounts/{account_id}/stream/watermarks/{identifier}", - body=await async_maybe_transform(body, watermark_delete_params.WatermarkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/stream/webhooks.py b/src/cloudflare/resources/stream/webhooks.py index 421ef3e1355..2f3879b43c1 100644 --- a/src/cloudflare/resources/stream/webhooks.py +++ b/src/cloudflare/resources/stream/webhooks.py @@ -23,7 +23,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.stream import webhook_delete_params, webhook_update_params +from ...types.stream import webhook_update_params from ...types.stream.webhook_get_response import WebhookGetResponse from ...types.stream.webhook_delete_response import WebhookDeleteResponse from ...types.stream.webhook_update_response import WebhookUpdateResponse @@ -92,7 +92,6 @@ def delete( self, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -120,7 +119,6 @@ def delete( Optional[WebhookDeleteResponse], self._delete( f"/accounts/{account_id}/stream/webhook", - body=maybe_transform(body, webhook_delete_params.WebhookDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -242,7 +240,6 @@ async def delete( self, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -270,7 +267,6 @@ async def delete( Optional[WebhookDeleteResponse], await self._delete( f"/accounts/{account_id}/stream/webhook", - body=await async_maybe_transform(body, webhook_delete_params.WebhookDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/subscriptions.py b/src/cloudflare/resources/subscriptions.py index 2d4496f23f8..2d30e1af043 100644 --- a/src/cloudflare/resources/subscriptions.py +++ b/src/cloudflare/resources/subscriptions.py @@ -26,7 +26,7 @@ AsyncPaginator, make_request_options, ) -from ..types.subscriptions import subscription_create_params, subscription_delete_params, subscription_update_params +from ..types.subscriptions import subscription_create_params, subscription_update_params from ..types.user.subscription import Subscription from ..types.user.rate_plan_param import RatePlanParam from ..types.user.subscription_zone_param import SubscriptionZoneParam @@ -230,7 +230,6 @@ def delete( subscription_identifier: str, *, account_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -262,7 +261,6 @@ def delete( ) return self._delete( f"/accounts/{account_identifier}/subscriptions/{subscription_identifier}", - body=maybe_transform(body, subscription_delete_params.SubscriptionDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -509,7 +507,6 @@ async def delete( subscription_identifier: str, *, account_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -541,7 +538,6 @@ async def delete( ) return await self._delete( f"/accounts/{account_identifier}/subscriptions/{subscription_identifier}", - body=await async_maybe_transform(body, subscription_delete_params.SubscriptionDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/url_scanner/url_scanner.py b/src/cloudflare/resources/url_scanner/url_scanner.py index f1924bb49e7..92707d1f132 100644 --- a/src/cloudflare/resources/url_scanner/url_scanner.py +++ b/src/cloudflare/resources/url_scanner/url_scanner.py @@ -111,19 +111,19 @@ def scan( page_asn: Filter scans by main page Autonomous System Number (ASN). - page_hostname: Filter scans by main page hostname . + page_hostname: Filter scans by main page hostname (domain of effective URL). page_ip: Filter scans by main page IP address (IPv4 or IPv6). - page_path: Filter scans by exact match URL path (also supports suffix search). + page_path: Filter scans by exact match of effective URL path (also supports suffix search). - page_url: Filter scans by exact match to scanned URL (_after redirects_) + page_url: Filter scans by submitted or scanned URL path: Filter scans by url path of _any_ request made by the webpage. scan_id: Scan uuid - url: Filter scans by exact match URL of _any_ request made by the webpage + url: Filter scans by URL of _any_ request made by the webpage extra_headers: Send extra headers @@ -243,19 +243,19 @@ async def scan( page_asn: Filter scans by main page Autonomous System Number (ASN). - page_hostname: Filter scans by main page hostname . + page_hostname: Filter scans by main page hostname (domain of effective URL). page_ip: Filter scans by main page IP address (IPv4 or IPv6). - page_path: Filter scans by exact match URL path (also supports suffix search). + page_path: Filter scans by exact match of effective URL path (also supports suffix search). - page_url: Filter scans by exact match to scanned URL (_after redirects_) + page_url: Filter scans by submitted or scanned URL path: Filter scans by url path of _any_ request made by the webpage. scan_id: Scan uuid - url: Filter scans by exact match URL of _any_ request made by the webpage + url: Filter scans by URL of _any_ request made by the webpage extra_headers: Send extra headers diff --git a/src/cloudflare/resources/user/organizations.py b/src/cloudflare/resources/user/organizations.py index cf0010f5fd1..daf90da2aed 100644 --- a/src/cloudflare/resources/user/organizations.py +++ b/src/cloudflare/resources/user/organizations.py @@ -8,10 +8,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -22,7 +19,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...types.user import organization_list_params, organization_delete_params +from ...types.user import organization_list_params from ..._base_client import ( AsyncPaginator, make_request_options, @@ -114,7 +111,6 @@ def delete( self, organization_id: str, *, - body: object, # 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. extra_headers: Headers | None = None, @@ -140,7 +136,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `organization_id` but received {organization_id!r}") return self._delete( f"/user/organizations/{organization_id}", - body=maybe_transform(body, organization_delete_params.OrganizationDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -272,7 +267,6 @@ async def delete( self, organization_id: str, *, - body: object, # 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. extra_headers: Headers | None = None, @@ -298,7 +292,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `organization_id` but received {organization_id!r}") return await self._delete( f"/user/organizations/{organization_id}", - body=await async_maybe_transform(body, organization_delete_params.OrganizationDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/user/subscriptions.py b/src/cloudflare/resources/user/subscriptions.py index f91857d27e1..9c2405a54ea 100644 --- a/src/cloudflare/resources/user/subscriptions.py +++ b/src/cloudflare/resources/user/subscriptions.py @@ -21,11 +21,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.user import ( - subscription_edit_params, - subscription_delete_params, - subscription_update_params, -) +from ...types.user import subscription_edit_params, subscription_update_params from ..._base_client import ( make_request_options, ) @@ -120,7 +116,6 @@ def delete( self, identifier: str, *, - body: object, # 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. extra_headers: Headers | None = None, @@ -146,7 +141,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") return self._delete( f"/user/subscriptions/{identifier}", - body=maybe_transform(body, subscription_delete_params.SubscriptionDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -324,7 +318,6 @@ async def delete( self, identifier: str, *, - body: object, # 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. extra_headers: Headers | None = None, @@ -350,7 +343,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") return await self._delete( f"/user/subscriptions/{identifier}", - body=await async_maybe_transform(body, subscription_delete_params.SubscriptionDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/user/tokens/tokens.py b/src/cloudflare/resources/user/tokens/tokens.py index 4903b12823e..5a71d4cfdb1 100644 --- a/src/cloudflare/resources/user/tokens/tokens.py +++ b/src/cloudflare/resources/user/tokens/tokens.py @@ -31,7 +31,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ....types.user import token_list_params, token_create_params, token_delete_params, token_update_params +from ....types.user import token_list_params, token_create_params, token_update_params from ...._base_client import ( AsyncPaginator, make_request_options, @@ -252,7 +252,6 @@ def delete( self, token_id: object, *, - body: object, # 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. extra_headers: Headers | None = None, @@ -274,7 +273,6 @@ def delete( """ return self._delete( f"/user/tokens/{token_id}", - body=maybe_transform(body, token_delete_params.TokenDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -547,7 +545,6 @@ async def delete( self, token_id: object, *, - body: object, # 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. extra_headers: Headers | None = None, @@ -569,7 +566,6 @@ async def delete( """ return await self._delete( f"/user/tokens/{token_id}", - body=await async_maybe_transform(body, token_delete_params.TokenDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/waiting_rooms/events/events.py b/src/cloudflare/resources/waiting_rooms/events/events.py index 62dc803843d..2c4a3998a86 100644 --- a/src/cloudflare/resources/waiting_rooms/events/events.py +++ b/src/cloudflare/resources/waiting_rooms/events/events.py @@ -33,13 +33,7 @@ AsyncPaginator, make_request_options, ) -from ....types.waiting_rooms import ( - event_edit_params, - event_list_params, - event_create_params, - event_delete_params, - event_update_params, -) +from ....types.waiting_rooms import event_edit_params, event_list_params, event_create_params, event_update_params from ....types.waiting_rooms.event import Event from ....types.waiting_rooms.event_delete_response import EventDeleteResponse @@ -365,7 +359,6 @@ def delete( *, zone_id: str, waiting_room_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -395,7 +388,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") return self._delete( f"/zones/{zone_id}/waiting_rooms/{waiting_room_id}/events/{event_id}", - body=maybe_transform(body, event_delete_params.EventDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -892,7 +884,6 @@ async def delete( *, zone_id: str, waiting_room_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -922,7 +913,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") return await self._delete( f"/zones/{zone_id}/waiting_rooms/{waiting_room_id}/events/{event_id}", - body=await async_maybe_transform(body, event_delete_params.EventDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/waiting_rooms/rules.py b/src/cloudflare/resources/waiting_rooms/rules.py index 61f18ee6d83..ca249b40fc6 100644 --- a/src/cloudflare/resources/waiting_rooms/rules.py +++ b/src/cloudflare/resources/waiting_rooms/rules.py @@ -26,7 +26,7 @@ AsyncPaginator, make_request_options, ) -from ...types.waiting_rooms import rule_edit_params, rule_create_params, rule_delete_params, rule_update_params +from ...types.waiting_rooms import rule_edit_params, rule_create_params, rule_update_params from ...types.waiting_rooms.waiting_room_rule import WaitingRoomRule from ...types.waiting_rooms.rule_edit_response import RuleEditResponse from ...types.waiting_rooms.rule_create_response import RuleCreateResponse @@ -201,7 +201,6 @@ def delete( *, zone_id: str, waiting_room_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -233,7 +232,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `rule_id` but received {rule_id!r}") return self._delete( f"/zones/{zone_id}/waiting_rooms/{waiting_room_id}/rules/{rule_id}", - body=maybe_transform(body, rule_delete_params.RuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -482,7 +480,6 @@ async def delete( *, zone_id: str, waiting_room_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -514,7 +511,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `rule_id` but received {rule_id!r}") return await self._delete( f"/zones/{zone_id}/waiting_rooms/{waiting_room_id}/rules/{rule_id}", - body=await async_maybe_transform(body, rule_delete_params.RuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py index e89685b2d40..70d9b6d225d 100644 --- a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py +++ b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py @@ -71,7 +71,6 @@ waiting_room_edit_params, waiting_room_list_params, waiting_room_create_params, - waiting_room_delete_params, waiting_room_update_params, ) from ...types.waiting_rooms.waiting_room import WaitingRoom @@ -881,7 +880,6 @@ def delete( waiting_room_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -909,7 +907,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `waiting_room_id` but received {waiting_room_id!r}") return self._delete( f"/zones/{zone_id}/waiting_rooms/{waiting_room_id}", - body=maybe_transform(body, waiting_room_delete_params.WaitingRoomDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -2120,7 +2117,6 @@ async def delete( waiting_room_id: str, *, zone_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -2148,7 +2144,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `waiting_room_id` but received {waiting_room_id!r}") return await self._delete( f"/zones/{zone_id}/waiting_rooms/{waiting_room_id}", - body=await async_maybe_transform(body, waiting_room_delete_params.WaitingRoomDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/warp_connector.py b/src/cloudflare/resources/warp_connector.py index 72aa5b4b7e4..e614da171ef 100644 --- a/src/cloudflare/resources/warp_connector.py +++ b/src/cloudflare/resources/warp_connector.py @@ -26,12 +26,7 @@ AsyncPaginator, make_request_options, ) -from ..types.warp_connector import ( - warp_connector_edit_params, - warp_connector_list_params, - warp_connector_create_params, - warp_connector_delete_params, -) +from ..types.warp_connector import warp_connector_edit_params, warp_connector_list_params, warp_connector_create_params from ..types.warp_connector.warp_connector_get_response import WARPConnectorGetResponse from ..types.warp_connector.warp_connector_edit_response import WARPConnectorEditResponse from ..types.warp_connector.warp_connector_list_response import WARPConnectorListResponse @@ -184,7 +179,6 @@ def delete( tunnel_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -216,7 +210,6 @@ def delete( WARPConnectorDeleteResponse, self._delete( f"/accounts/{account_id}/warp_connector/{tunnel_id}", - body=maybe_transform(body, warp_connector_delete_params.WARPConnectorDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -537,7 +530,6 @@ async def delete( tunnel_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -569,7 +561,6 @@ async def delete( WARPConnectorDeleteResponse, await self._delete( f"/accounts/{account_id}/warp_connector/{tunnel_id}", - body=await async_maybe_transform(body, warp_connector_delete_params.WARPConnectorDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/web3/hostnames/hostnames.py b/src/cloudflare/resources/web3/hostnames/hostnames.py index f4dd3aa6e91..9bf5ac86e9a 100644 --- a/src/cloudflare/resources/web3/hostnames/hostnames.py +++ b/src/cloudflare/resources/web3/hostnames/hostnames.py @@ -22,7 +22,7 @@ ) from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ....types.web3 import hostname_edit_params, hostname_create_params, hostname_delete_params +from ....types.web3 import hostname_edit_params, hostname_create_params from ...._base_client import ( AsyncPaginator, make_request_options, @@ -152,7 +152,6 @@ def delete( identifier: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -182,7 +181,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") return self._delete( f"/zones/{zone_identifier}/web3/hostnames/{identifier}", - body=maybe_transform(body, hostname_delete_params.HostnameDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -405,7 +403,6 @@ async def delete( identifier: str, *, zone_identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -435,7 +432,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") return await self._delete( f"/zones/{zone_identifier}/web3/hostnames/{identifier}", - body=await async_maybe_transform(body, hostname_delete_params.HostnameDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py index 7bb201431cd..4170fac51c8 100644 --- a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py +++ b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py @@ -24,11 +24,7 @@ from ......_base_client import ( make_request_options, ) -from ......types.web3.hostnames.ipfs_universal_paths.content_lists import ( - entry_create_params, - entry_delete_params, - entry_update_params, -) +from ......types.web3.hostnames.ipfs_universal_paths.content_lists import entry_create_params, entry_update_params from ......types.web3.hostnames.ipfs_universal_paths.content_lists.entry_get_response import EntryGetResponse from ......types.web3.hostnames.ipfs_universal_paths.content_lists.entry_list_response import EntryListResponse from ......types.web3.hostnames.ipfs_universal_paths.content_lists.entry_create_response import EntryCreateResponse @@ -226,7 +222,6 @@ def delete( *, zone_identifier: str, identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -262,7 +257,6 @@ def delete( ) return self._delete( f"/zones/{zone_identifier}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{content_list_entry_identifier}", - body=maybe_transform(body, entry_delete_params.EntryDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -513,7 +507,6 @@ async def delete( *, zone_identifier: str, identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -549,7 +542,6 @@ async def delete( ) return await self._delete( f"/zones/{zone_identifier}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{content_list_entry_identifier}", - body=await async_maybe_transform(body, entry_delete_params.EntryDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/workers/ai.py b/src/cloudflare/resources/workers/ai.py index fa587e8cf49..56733d0cbfd 100644 --- a/src/cloudflare/resources/workers/ai.py +++ b/src/cloudflare/resources/workers/ai.py @@ -195,7 +195,7 @@ def run( model_name: str, *, account_id: str, - audio: Iterable[float] | NotGiven = NOT_GIVEN, + audio: Iterable[float], # 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. extra_headers: Headers | None = None, @@ -231,7 +231,7 @@ def run( model_name: str, *, account_id: str, - image: Iterable[float] | NotGiven = NOT_GIVEN, + image: Iterable[float], # 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. extra_headers: Headers | None = None, @@ -459,8 +459,8 @@ def run( ["account_id", "prompt"], ["account_id", "sentences", "source"], ["account_id", "text"], - ["account_id"], - ["account_id"], + ["account_id", "audio"], + ["account_id", "image"], ["account_id"], ["account_id"], ["account_id", "target_lang", "text"], @@ -711,7 +711,7 @@ async def run( model_name: str, *, account_id: str, - audio: Iterable[float] | NotGiven = NOT_GIVEN, + audio: Iterable[float], # 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. extra_headers: Headers | None = None, @@ -747,7 +747,7 @@ async def run( model_name: str, *, account_id: str, - image: Iterable[float] | NotGiven = NOT_GIVEN, + image: Iterable[float], # 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. extra_headers: Headers | None = None, @@ -975,8 +975,8 @@ async def run( ["account_id", "prompt"], ["account_id", "sentences", "source"], ["account_id", "text"], - ["account_id"], - ["account_id"], + ["account_id", "audio"], + ["account_id", "image"], ["account_id"], ["account_id"], ["account_id", "target_lang", "text"], diff --git a/src/cloudflare/resources/workers/domains.py b/src/cloudflare/resources/workers/domains.py index bcf3872c03a..1ef08b0f762 100644 --- a/src/cloudflare/resources/workers/domains.py +++ b/src/cloudflare/resources/workers/domains.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ...types.workers import domain_list_params, domain_delete_params, domain_update_params +from ...types.workers import domain_list_params, domain_update_params from ...types.workers.domain import Domain __all__ = ["DomainsResource", "AsyncDomainsResource"] @@ -165,7 +165,6 @@ def delete( domain_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -194,7 +193,6 @@ def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( f"/accounts/{account_id}/workers/domains/{domain_id}", - body=maybe_transform(body, domain_delete_params.DomainDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -378,7 +376,6 @@ async def delete( domain_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -407,7 +404,6 @@ async def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( f"/accounts/{account_id}/workers/domains/{domain_id}", - body=await async_maybe_transform(body, domain_delete_params.DomainDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/workers/scripts/scripts.py b/src/cloudflare/resources/workers/scripts/scripts.py index 437479de3a1..2ae2c62f3a7 100644 --- a/src/cloudflare/resources/workers/scripts/scripts.py +++ b/src/cloudflare/resources/workers/scripts/scripts.py @@ -290,7 +290,6 @@ def delete( script_name: str, *, account_id: str, - body: object, force: bool | 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. @@ -327,7 +326,6 @@ def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( f"/accounts/{account_id}/workers/scripts/{script_name}", - body=maybe_transform(body, script_delete_params.ScriptDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -586,7 +584,6 @@ async def delete( script_name: str, *, account_id: str, - body: object, force: bool | 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. @@ -623,7 +620,6 @@ async def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( f"/accounts/{account_id}/workers/scripts/{script_name}", - body=await async_maybe_transform(body, script_delete_params.ScriptDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/workers/scripts/tail.py b/src/cloudflare/resources/workers/scripts/tail.py index c0185a5b22b..b5f293be35c 100644 --- a/src/cloudflare/resources/workers/scripts/tail.py +++ b/src/cloudflare/resources/workers/scripts/tail.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.workers.scripts import tail_create_params, tail_delete_params +from ....types.workers.scripts import tail_create_params from ....types.workers.scripts.tail_get_response import TailGetResponse from ....types.workers.scripts.tail_create_response import TailCreateResponse from ....types.workers.scripts.tail_delete_response import TailDeleteResponse @@ -92,7 +92,6 @@ def delete( *, account_id: str, script_name: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -126,7 +125,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._delete( f"/accounts/{account_id}/workers/scripts/{script_name}/tails/{id}", - body=maybe_transform(body, tail_delete_params.TailDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -239,7 +237,6 @@ async def delete( *, account_id: str, script_name: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -273,7 +270,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._delete( f"/accounts/{account_id}/workers/scripts/{script_name}/tails/{id}", - body=await async_maybe_transform(body, tail_delete_params.TailDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py index 2860f178ff6..eaaece76d7b 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py @@ -237,7 +237,6 @@ def delete( *, account_id: str, dispatch_namespace: str, - body: object, force: bool | 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. @@ -279,7 +278,6 @@ def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}", - body=maybe_transform(body, script_delete_params.ScriptDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -506,7 +504,6 @@ async def delete( *, account_id: str, dispatch_namespace: str, - body: object, force: bool | 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. @@ -548,7 +545,6 @@ async def delete( extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}", - body=await async_maybe_transform(body, script_delete_params.ScriptDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index 784827d16fd..3192d3b31f5 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -3,7 +3,6 @@ from __future__ import annotations from typing import Any, List, Type, Optional, cast, overload -from typing_extensions import Literal import httpx @@ -50,13 +49,17 @@ UserPolicyChecksResourceWithStreamingResponse, AsyncUserPolicyChecksResourceWithStreamingResponse, ) -from .....types.zero_trust.access import application_create_params, application_update_params +from .....types.zero_trust.access import ( + ApplicationType, + application_create_params, + application_update_params, +) from .....types.zero_trust.access.application import Application +from .....types.zero_trust.access.allowed_idps import AllowedIdPs from .....types.zero_trust.access.app_id_param import AppIDParam -from .....types.zero_trust.access.allowed_idpsh import AllowedIdpsh -from .....types.zero_trust.access.custom_pagesh import CustomPagesh +from .....types.zero_trust.access.application_type import ApplicationType from .....types.zero_trust.access.cors_headers_param import CORSHeadersParam -from .....types.zero_trust.access.self_hosted_domainsh import SelfHostedDomainsh +from .....types.zero_trust.access.self_hosted_domains import SelfHostedDomains from .....types.zero_trust.access.application_delete_response import ApplicationDeleteResponse __all__ = ["ApplicationsResource", "AsyncApplicationsResource"] @@ -92,14 +95,14 @@ def create( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -107,7 +110,7 @@ def create( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -204,10 +207,10 @@ def create( *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, saas_app: application_create_params.SaaSApplicationSaaSApp | NotGiven = NOT_GIVEN, @@ -266,14 +269,14 @@ def create( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -281,7 +284,7 @@ def create( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -381,14 +384,14 @@ def create( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -396,7 +399,7 @@ def create( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -491,10 +494,10 @@ def create( def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -538,10 +541,10 @@ def create( def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -585,10 +588,10 @@ def create( def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -682,20 +685,18 @@ def create( self, *, domain: str | NotGiven = NOT_GIVEN, - type: str - | Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - | NotGiven = NOT_GIVEN, + type: str | ApplicationType | NotGiven = NOT_GIVEN, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -703,7 +704,7 @@ def create( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -784,14 +785,14 @@ def update( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -799,7 +800,7 @@ def update( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -899,10 +900,10 @@ def update( *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, saas_app: application_update_params.SaaSApplicationSaaSApp | NotGiven = NOT_GIVEN, @@ -964,14 +965,14 @@ def update( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -979,7 +980,7 @@ def update( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -1082,14 +1083,14 @@ def update( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -1097,7 +1098,7 @@ def update( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -1195,10 +1196,10 @@ def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1245,10 +1246,10 @@ def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1295,10 +1296,10 @@ def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1398,20 +1399,18 @@ def update( app_id: AppIDParam, *, domain: str | NotGiven = NOT_GIVEN, - type: str - | Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - | NotGiven = NOT_GIVEN, + type: str | ApplicationType | NotGiven = NOT_GIVEN, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -1419,7 +1418,7 @@ def update( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -1740,14 +1739,14 @@ async def create( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -1755,7 +1754,7 @@ async def create( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -1852,10 +1851,10 @@ async def create( *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, saas_app: application_create_params.SaaSApplicationSaaSApp | NotGiven = NOT_GIVEN, @@ -1914,14 +1913,14 @@ async def create( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -1929,7 +1928,7 @@ async def create( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -2029,14 +2028,14 @@ async def create( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2044,7 +2043,7 @@ async def create( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -2139,10 +2138,10 @@ async def create( async def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -2186,10 +2185,10 @@ async def create( async def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -2233,10 +2232,10 @@ async def create( async def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -2330,20 +2329,18 @@ async def create( self, *, domain: str | NotGiven = NOT_GIVEN, - type: str - | Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - | NotGiven = NOT_GIVEN, + type: str | ApplicationType | NotGiven = NOT_GIVEN, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2351,7 +2348,7 @@ async def create( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -2432,14 +2429,14 @@ async def update( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2447,7 +2444,7 @@ async def update( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -2547,10 +2544,10 @@ async def update( *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, saas_app: application_update_params.SaaSApplicationSaaSApp | NotGiven = NOT_GIVEN, @@ -2612,14 +2609,14 @@ async def update( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2627,7 +2624,7 @@ async def update( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -2730,14 +2727,14 @@ async def update( account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2745,7 +2742,7 @@ async def update( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, @@ -2843,10 +2840,10 @@ async def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -2893,10 +2890,10 @@ async def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -2943,10 +2940,10 @@ async def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -3046,20 +3043,18 @@ async def update( app_id: AppIDParam, *, domain: str | NotGiven = NOT_GIVEN, - type: str - | Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - | NotGiven = NOT_GIVEN, + type: str | ApplicationType | NotGiven = NOT_GIVEN, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, - allowed_idps: List[AllowedIdpsh] | NotGiven = NOT_GIVEN, + allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: CORSHeadersParam | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPagesh] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -3067,7 +3062,7 @@ async def update( options_preflight_bypass: bool | NotGiven = NOT_GIVEN, path_cookie_attribute: bool | NotGiven = NOT_GIVEN, same_site_cookie_attribute: str | NotGiven = NOT_GIVEN, - self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN, + self_hosted_domains: List[SelfHostedDomains] | NotGiven = NOT_GIVEN, service_auth_401_redirect: bool | NotGiven = NOT_GIVEN, session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/zero_trust/access/bookmarks.py b/src/cloudflare/resources/zero_trust/access/bookmarks.py index 51956d890fa..00f06515c4c 100644 --- a/src/cloudflare/resources/zero_trust/access/bookmarks.py +++ b/src/cloudflare/resources/zero_trust/access/bookmarks.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.zero_trust.access import bookmark_create_params, bookmark_delete_params, bookmark_update_params +from ....types.zero_trust.access import bookmark_create_params, bookmark_update_params from ....types.zero_trust.access.bookmark import Bookmark from ....types.zero_trust.access.bookmark_delete_response import BookmarkDeleteResponse @@ -168,7 +168,6 @@ def delete( uuid: str, *, identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -196,7 +195,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}") return self._delete( f"/accounts/{identifier}/access/bookmarks/{uuid}", - body=maybe_transform(body, bookmark_delete_params.BookmarkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -386,7 +384,6 @@ async def delete( uuid: str, *, identifier: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -414,7 +411,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}") return await self._delete( f"/accounts/{identifier}/access/bookmarks/{uuid}", - body=await async_maybe_transform(body, bookmark_delete_params.BookmarkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/devices/networks.py b/src/cloudflare/resources/zero_trust/devices/networks.py index 645114237fe..32906413a72 100644 --- a/src/cloudflare/resources/zero_trust/devices/networks.py +++ b/src/cloudflare/resources/zero_trust/devices/networks.py @@ -26,7 +26,7 @@ AsyncPaginator, make_request_options, ) -from ....types.zero_trust.devices import network_create_params, network_delete_params, network_update_params +from ....types.zero_trust.devices import network_create_params, network_update_params from ....types.zero_trust.devices.device_network import DeviceNetwork from ....types.zero_trust.devices.network_delete_response import NetworkDeleteResponse @@ -196,7 +196,6 @@ def delete( network_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -225,7 +224,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `network_id` but received {network_id!r}") return self._delete( f"/accounts/{account_id}/devices/networks/{network_id}", - body=maybe_transform(body, network_delete_params.NetworkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -442,7 +440,6 @@ async def delete( network_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -471,7 +468,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `network_id` but received {network_id!r}") return await self._delete( f"/accounts/{account_id}/devices/networks/{network_id}", - body=await async_maybe_transform(body, network_delete_params.NetworkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/devices/policies/policies.py b/src/cloudflare/resources/zero_trust/devices/policies/policies.py index 57b8423f9f1..93b09dbd3c1 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/policies.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/policies.py @@ -57,7 +57,7 @@ FallbackDomainsResourceWithStreamingResponse, AsyncFallbackDomainsResourceWithStreamingResponse, ) -from .....types.zero_trust.devices import policy_edit_params, policy_create_params, policy_delete_params +from .....types.zero_trust.devices import policy_edit_params, policy_create_params from .....types.zero_trust.devices.settings_policy import SettingsPolicy from .....types.zero_trust.devices.policy_delete_response import PolicyDeleteResponse @@ -245,7 +245,6 @@ def delete( policy_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -274,7 +273,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `policy_id` but received {policy_id!r}") return self._delete( f"/accounts/{account_id}/devices/policy/{policy_id}", - body=maybe_transform(body, policy_delete_params.PolicyDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -618,7 +616,6 @@ async def delete( policy_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -647,7 +644,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `policy_id` but received {policy_id!r}") return await self._delete( f"/accounts/{account_id}/devices/policy/{policy_id}", - body=await async_maybe_transform(body, policy_delete_params.PolicyDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py index 160d7a87247..c8570f2c642 100644 --- a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py +++ b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py @@ -26,11 +26,7 @@ AsyncPaginator, make_request_options, ) -from .....types.zero_trust.devices.posture import ( - integration_edit_params, - integration_create_params, - integration_delete_params, -) +from .....types.zero_trust.devices.posture import integration_edit_params, integration_create_params from .....types.zero_trust.devices.posture.integration import Integration from .....types.zero_trust.devices.posture.integration_delete_response import IntegrationDeleteResponse @@ -144,7 +140,6 @@ def delete( integration_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -174,7 +169,6 @@ def delete( IntegrationDeleteResponse, self._delete( f"/accounts/{account_id}/devices/posture/integration/{integration_id}", - body=maybe_transform(body, integration_delete_params.IntegrationDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -403,7 +397,6 @@ async def delete( integration_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -433,7 +426,6 @@ async def delete( IntegrationDeleteResponse, await self._delete( f"/accounts/{account_id}/devices/posture/integration/{integration_id}", - body=await async_maybe_transform(body, integration_delete_params.IntegrationDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/devices/posture/posture.py b/src/cloudflare/resources/zero_trust/devices/posture/posture.py index fedb1495ce2..528888f1557 100644 --- a/src/cloudflare/resources/zero_trust/devices/posture/posture.py +++ b/src/cloudflare/resources/zero_trust/devices/posture/posture.py @@ -34,11 +34,7 @@ AsyncPaginator, make_request_options, ) -from .....types.zero_trust.devices import ( - posture_create_params, - posture_delete_params, - posture_update_params, -) +from .....types.zero_trust.devices import posture_create_params, posture_update_params from .....types.zero_trust.devices.device_input_param import DeviceInputParam from .....types.zero_trust.devices.device_match_param import DeviceMatchParam from .....types.zero_trust.devices.device_posture_rule import DevicePostureRule @@ -288,7 +284,6 @@ def delete( rule_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -316,7 +311,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `rule_id` but received {rule_id!r}") return self._delete( f"/accounts/{account_id}/devices/posture/{rule_id}", - body=maybe_transform(body, posture_delete_params.PostureDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -611,7 +605,6 @@ async def delete( rule_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -639,7 +632,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `rule_id` but received {rule_id!r}") return await self._delete( f"/accounts/{account_id}/devices/posture/{rule_id}", - body=await async_maybe_transform(body, posture_delete_params.PostureDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py b/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py index a9265d0ffc6..7e19dd0cb92 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py @@ -23,7 +23,7 @@ from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.dlp.profiles import custom_create_params, custom_delete_params, custom_update_params +from .....types.zero_trust.dlp.profiles import custom_create_params, custom_update_params from .....types.zero_trust.dlp.context_awareness_param import ContextAwarenessParam from .....types.zero_trust.dlp.profiles.custom_profile import CustomProfile from .....types.zero_trust.dlp.profiles.custom_create_response import CustomCreateResponse @@ -164,7 +164,6 @@ def delete( profile_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -196,7 +195,6 @@ def delete( CustomDeleteResponse, self._delete( f"/accounts/{account_id}/dlp/profiles/custom/{profile_id}", - body=maybe_transform(body, custom_delete_params.CustomDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -387,7 +385,6 @@ async def delete( profile_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -419,7 +416,6 @@ async def delete( CustomDeleteResponse, await self._delete( f"/accounts/{account_id}/dlp/profiles/custom/{profile_id}", - body=await async_maybe_transform(body, custom_delete_params.CustomDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py index f63c0fac6a4..0810dafa367 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py @@ -34,7 +34,7 @@ AsyncPaginator, make_request_options, ) -from .....types.zero_trust.gateway import list_edit_params, list_create_params, list_delete_params, list_update_params +from .....types.zero_trust.gateway import list_edit_params, list_create_params, list_update_params from .....types.zero_trust.gateway.gateway_list import GatewayList from .....types.zero_trust.gateway.gateway_item_param import GatewayItemParam from .....types.zero_trust.gateway.list_create_response import ListCreateResponse @@ -208,7 +208,6 @@ def delete( list_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -238,7 +237,6 @@ def delete( Optional[ListDeleteResponse], self._delete( f"/accounts/{account_id}/gateway/lists/{list_id}", - body=maybe_transform(body, list_delete_params.ListDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -515,7 +513,6 @@ async def delete( list_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -545,7 +542,6 @@ async def delete( Optional[ListDeleteResponse], await self._delete( f"/accounts/{account_id}/gateway/lists/{list_id}", - body=await async_maybe_transform(body, list_delete_params.ListDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/gateway/locations.py b/src/cloudflare/resources/zero_trust/gateway/locations.py index 8c374c6ad27..e77cf3be32d 100644 --- a/src/cloudflare/resources/zero_trust/gateway/locations.py +++ b/src/cloudflare/resources/zero_trust/gateway/locations.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.zero_trust.gateway import location_create_params, location_delete_params, location_update_params +from ....types.zero_trust.gateway import location_create_params, location_update_params from ....types.zero_trust.gateway.location import Location from ....types.zero_trust.gateway.location_network_param import LocationNetworkParam from ....types.zero_trust.gateway.location_delete_response import LocationDeleteResponse @@ -200,7 +200,6 @@ def delete( location_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -228,7 +227,6 @@ def delete( Optional[LocationDeleteResponse], self._delete( f"/accounts/{account_id}/gateway/locations/{location_id}", - body=maybe_transform(body, location_delete_params.LocationDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -450,7 +448,6 @@ async def delete( location_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -478,7 +475,6 @@ async def delete( Optional[LocationDeleteResponse], await self._delete( f"/accounts/{account_id}/gateway/locations/{location_id}", - body=await async_maybe_transform(body, location_delete_params.LocationDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py b/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py index 1c0da998f19..c1b0d3b653f 100644 --- a/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py +++ b/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py @@ -25,11 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.zero_trust.gateway import ( - proxy_endpoint_edit_params, - proxy_endpoint_create_params, - proxy_endpoint_delete_params, -) +from ....types.zero_trust.gateway import proxy_endpoint_edit_params, proxy_endpoint_create_params from ....types.zero_trust.gateway.gateway_ips import GatewayIPs from ....types.zero_trust.gateway.proxy_endpoint import ProxyEndpoint from ....types.zero_trust.gateway.proxy_endpoint_delete_response import ProxyEndpointDeleteResponse @@ -135,7 +131,6 @@ def delete( proxy_endpoint_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -163,7 +158,6 @@ def delete( Optional[ProxyEndpointDeleteResponse], self._delete( f"/accounts/{account_id}/gateway/proxy_endpoints/{proxy_endpoint_id}", - body=maybe_transform(body, proxy_endpoint_delete_params.ProxyEndpointDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -369,7 +363,6 @@ async def delete( proxy_endpoint_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -397,7 +390,6 @@ async def delete( Optional[ProxyEndpointDeleteResponse], await self._delete( f"/accounts/{account_id}/gateway/proxy_endpoints/{proxy_endpoint_id}", - body=await async_maybe_transform(body, proxy_endpoint_delete_params.ProxyEndpointDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/gateway/rules.py b/src/cloudflare/resources/zero_trust/gateway/rules.py index d61fac4c73b..0346b993d38 100644 --- a/src/cloudflare/resources/zero_trust/gateway/rules.py +++ b/src/cloudflare/resources/zero_trust/gateway/rules.py @@ -26,11 +26,7 @@ AsyncPaginator, make_request_options, ) -from ....types.zero_trust.gateway import ( - rule_create_params, - rule_delete_params, - rule_update_params, -) +from ....types.zero_trust.gateway import rule_create_params, rule_update_params from ....types.zero_trust.gateway.gateway_rule import GatewayRule from ....types.zero_trust.gateway.gateway_filter import GatewayFilter from ....types.zero_trust.gateway.schedule_param import ScheduleParam @@ -307,7 +303,6 @@ def delete( rule_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -337,7 +332,6 @@ def delete( Optional[RuleDeleteResponse], self._delete( f"/accounts/{account_id}/gateway/rules/{rule_id}", - body=maybe_transform(body, rule_delete_params.RuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -661,7 +655,6 @@ async def delete( rule_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -691,7 +684,6 @@ async def delete( Optional[RuleDeleteResponse], await self._delete( f"/accounts/{account_id}/gateway/rules/{rule_id}", - body=await async_maybe_transform(body, rule_delete_params.RuleDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/networks/virtual_networks.py b/src/cloudflare/resources/zero_trust/networks/virtual_networks.py index 8c7611adaee..78c9995d771 100644 --- a/src/cloudflare/resources/zero_trust/networks/virtual_networks.py +++ b/src/cloudflare/resources/zero_trust/networks/virtual_networks.py @@ -29,7 +29,6 @@ virtual_network_edit_params, virtual_network_list_params, virtual_network_create_params, - virtual_network_delete_params, ) from ....types.zero_trust.networks.virtual_network import VirtualNetwork from ....types.zero_trust.networks.virtual_network_edit_response import VirtualNetworkEditResponse @@ -176,7 +175,6 @@ def delete( virtual_network_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -208,7 +206,6 @@ def delete( VirtualNetworkDeleteResponse, self._delete( f"/accounts/{account_id}/teamnet/virtual_networks/{virtual_network_id}", - body=maybe_transform(body, virtual_network_delete_params.VirtualNetworkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -426,7 +423,6 @@ async def delete( virtual_network_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -458,7 +454,6 @@ async def delete( VirtualNetworkDeleteResponse, await self._delete( f"/accounts/{account_id}/teamnet/virtual_networks/{virtual_network_id}", - body=await async_maybe_transform(body, virtual_network_delete_params.VirtualNetworkDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/tunnels/connections.py b/src/cloudflare/resources/zero_trust/tunnels/connections.py index f0b505d8e83..2b1e4096eed 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/connections.py +++ b/src/cloudflare/resources/zero_trust/tunnels/connections.py @@ -7,10 +7,6 @@ import httpx from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -23,7 +19,6 @@ from ...._base_client import ( make_request_options, ) -from ....types.zero_trust.tunnels import connection_delete_params from ....types.zero_trust.tunnels.connection_get_response import ConnectionGetResponse from ....types.zero_trust.tunnels.connection_delete_response import ConnectionDeleteResponse @@ -44,7 +39,6 @@ def delete( tunnel_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -78,7 +72,6 @@ def delete( ConnectionDeleteResponse, self._delete( f"/accounts/{account_id}/tunnels/{tunnel_id}/connections", - body=maybe_transform(body, connection_delete_params.ConnectionDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -151,7 +144,6 @@ async def delete( tunnel_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -185,7 +177,6 @@ async def delete( ConnectionDeleteResponse, await self._delete( f"/accounts/{account_id}/tunnels/{tunnel_id}/connections", - body=await async_maybe_transform(body, connection_delete_params.ConnectionDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/tunnels/tunnels.py b/src/cloudflare/resources/zero_trust/tunnels/tunnels.py index 7513cd0df48..228c4044763 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/tunnels.py +++ b/src/cloudflare/resources/zero_trust/tunnels/tunnels.py @@ -66,7 +66,7 @@ AsyncPaginator, make_request_options, ) -from ....types.zero_trust import tunnel_edit_params, tunnel_list_params, tunnel_create_params, tunnel_delete_params +from ....types.zero_trust import tunnel_edit_params, tunnel_list_params, tunnel_create_params from ....types.zero_trust.tunnel_get_response import TunnelGetResponse from ....types.zero_trust.tunnel_edit_response import TunnelEditResponse from ....types.zero_trust.tunnel_list_response import TunnelListResponse @@ -245,7 +245,6 @@ def delete( tunnel_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -275,7 +274,6 @@ def delete( raise ValueError(f"Expected a non-empty value for `tunnel_id` but received {tunnel_id!r}") return self._delete( f"/accounts/{account_id}/tunnels/{tunnel_id}", - body=maybe_transform(body, tunnel_delete_params.TunnelDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -563,7 +561,6 @@ async def delete( tunnel_id: str, *, account_id: str, - body: object, # 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. extra_headers: Headers | None = None, @@ -593,7 +590,6 @@ async def delete( raise ValueError(f"Expected a non-empty value for `tunnel_id` but received {tunnel_id!r}") return await self._delete( f"/accounts/{account_id}/tunnels/{tunnel_id}", - body=await async_maybe_transform(body, tunnel_delete_params.TunnelDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zones/custom_nameservers.py b/src/cloudflare/resources/zones/custom_nameservers.py index ba334b39387..641fd246f32 100644 --- a/src/cloudflare/resources/zones/custom_nameservers.py +++ b/src/cloudflare/resources/zones/custom_nameservers.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Optional, cast +from typing import Type, Optional, cast import httpx @@ -76,28 +76,23 @@ def update( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - Optional[CustomNameserverUpdateResponse], - self._put( - f"/zones/{zone_id}/custom_ns", - body=maybe_transform( - { - "enabled": enabled, - "ns_set": ns_set, - }, - custom_nameserver_update_params.CustomNameserverUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CustomNameserverUpdateResponse]]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[CustomNameserverUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._put( + f"/zones/{zone_id}/custom_ns", + body=maybe_transform( + { + "enabled": enabled, + "ns_set": ns_set, + }, + custom_nameserver_update_params.CustomNameserverUpdateParams, ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomNameserverUpdateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[CustomNameserverUpdateResponse]], ResultWrapper[CustomNameserverUpdateResponse]), ) def get( @@ -127,21 +122,16 @@ def get( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - Optional[CustomNameserverGetResponse], - self._get( - f"/zones/{zone_id}/custom_ns", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CustomNameserverGetResponse]]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[CustomNameserverGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._get( + f"/zones/{zone_id}/custom_ns", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomNameserverGetResponse]]._unwrapper, ), + cast_to=cast(Type[Optional[CustomNameserverGetResponse]], ResultWrapper[CustomNameserverGetResponse]), ) @@ -191,28 +181,23 @@ async def update( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - Optional[CustomNameserverUpdateResponse], - await self._put( - f"/zones/{zone_id}/custom_ns", - body=await async_maybe_transform( - { - "enabled": enabled, - "ns_set": ns_set, - }, - custom_nameserver_update_params.CustomNameserverUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CustomNameserverUpdateResponse]]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[CustomNameserverUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._put( + f"/zones/{zone_id}/custom_ns", + body=await async_maybe_transform( + { + "enabled": enabled, + "ns_set": ns_set, + }, + custom_nameserver_update_params.CustomNameserverUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomNameserverUpdateResponse]]._unwrapper, ), + cast_to=cast(Type[Optional[CustomNameserverUpdateResponse]], ResultWrapper[CustomNameserverUpdateResponse]), ) async def get( @@ -242,21 +227,16 @@ async def get( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - Optional[CustomNameserverGetResponse], - await self._get( - f"/zones/{zone_id}/custom_ns", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[CustomNameserverGetResponse]]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[CustomNameserverGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._get( + f"/zones/{zone_id}/custom_ns", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomNameserverGetResponse]]._unwrapper, ), + cast_to=cast(Type[Optional[CustomNameserverGetResponse]], ResultWrapper[CustomNameserverGetResponse]), ) diff --git a/src/cloudflare/resources/zones/zones.py b/src/cloudflare/resources/zones/zones.py index 2f44b6f7014..6256a5db72a 100644 --- a/src/cloudflare/resources/zones/zones.py +++ b/src/cloudflare/resources/zones/zones.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Type, Optional, cast +from typing import List, Type as TypingType, Optional, cast from typing_extensions import Literal import httpx @@ -68,6 +68,7 @@ AsyncActivationCheckResourceWithStreamingResponse, ) from .settings.settings import SettingsResource, AsyncSettingsResource +from ...types.zones.type import Type as ZonesType from ...types.zones.zone import Zone from .custom_nameservers import ( CustomNameserversResource, @@ -120,7 +121,7 @@ def create( *, account: zone_create_params.Account, name: str, - type: Literal["full", "partial", "secondary"] | NotGiven = NOT_GIVEN, + type: ZonesType | 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. extra_headers: Headers | None = None, @@ -162,7 +163,7 @@ def create( timeout=timeout, post_parser=ResultWrapper[Optional[Zone]]._unwrapper, ), - cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), + cast_to=cast(TypingType[Optional[Zone]], ResultWrapper[Zone]), ) def list( @@ -280,7 +281,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper[Optional[ZoneDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[Optional[ZoneDeleteResponse]], ResultWrapper[ZoneDeleteResponse]), + cast_to=cast(TypingType[Optional[ZoneDeleteResponse]], ResultWrapper[ZoneDeleteResponse]), ) def edit( @@ -343,7 +344,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper[Optional[Zone]]._unwrapper, ), - cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), + cast_to=cast(TypingType[Optional[Zone]], ResultWrapper[Zone]), ) def get( @@ -382,7 +383,7 @@ def get( timeout=timeout, post_parser=ResultWrapper[Optional[Zone]]._unwrapper, ), - cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), + cast_to=cast(TypingType[Optional[Zone]], ResultWrapper[Zone]), ) @@ -424,7 +425,7 @@ async def create( *, account: zone_create_params.Account, name: str, - type: Literal["full", "partial", "secondary"] | NotGiven = NOT_GIVEN, + type: ZonesType | 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. extra_headers: Headers | None = None, @@ -466,7 +467,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper[Optional[Zone]]._unwrapper, ), - cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), + cast_to=cast(TypingType[Optional[Zone]], ResultWrapper[Zone]), ) def list( @@ -584,7 +585,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper[Optional[ZoneDeleteResponse]]._unwrapper, ), - cast_to=cast(Type[Optional[ZoneDeleteResponse]], ResultWrapper[ZoneDeleteResponse]), + cast_to=cast(TypingType[Optional[ZoneDeleteResponse]], ResultWrapper[ZoneDeleteResponse]), ) async def edit( @@ -647,7 +648,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper[Optional[Zone]]._unwrapper, ), - cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), + cast_to=cast(TypingType[Optional[Zone]], ResultWrapper[Zone]), ) async def get( @@ -686,7 +687,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper[Optional[Zone]]._unwrapper, ), - cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), + cast_to=cast(TypingType[Optional[Zone]], ResultWrapper[Zone]), ) diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py index c61c5c1b5e3..d99e0567acf 100644 --- a/src/cloudflare/types/__init__.py +++ b/src/cloudflare/types/__init__.py @@ -12,8 +12,11 @@ Identifier as Identifier, Permission as Permission, ResponseInfo as ResponseInfo, + CertificateCA as CertificateCA, + SortDirection as SortDirection, PaginationInfo as PaginationInfo, PermissionGrant as PermissionGrant, CloudflareTunnel as CloudflareTunnel, LoadBalancerPreview as LoadBalancerPreview, + CertificateRequestType as CertificateRequestType, ) diff --git a/src/cloudflare/types/accounts/__init__.py b/src/cloudflare/types/accounts/__init__.py index 4df03ede50b..71487082562 100644 --- a/src/cloudflare/types/accounts/__init__.py +++ b/src/cloudflare/types/accounts/__init__.py @@ -2,13 +2,13 @@ from __future__ import annotations +from .status import Status as Status from .account import Account as Account from .role_get_response import RoleGetResponse as RoleGetResponse from .member_list_params import MemberListParams as MemberListParams from .account_list_params import AccountListParams as AccountListParams from .account_get_response import AccountGetResponse as AccountGetResponse from .member_create_params import MemberCreateParams as MemberCreateParams -from .member_delete_params import MemberDeleteParams as MemberDeleteParams from .member_list_response import MemberListResponse as MemberListResponse from .member_update_params import MemberUpdateParams as MemberUpdateParams from .account_update_params import AccountUpdateParams as AccountUpdateParams diff --git a/src/cloudflare/types/accounts/member_create_params.py b/src/cloudflare/types/accounts/member_create_params.py index 55c96a1d861..69acda8f5da 100644 --- a/src/cloudflare/types/accounts/member_create_params.py +++ b/src/cloudflare/types/accounts/member_create_params.py @@ -9,7 +9,7 @@ class MemberCreateParams(TypedDict, total=False): - account_id: Required[object] + account_id: Required[str] email: Required[str] """The contact email address of the user.""" diff --git a/src/cloudflare/types/accounts/member_delete_params.py b/src/cloudflare/types/accounts/member_delete_params.py deleted file mode 100644 index c71acd55512..00000000000 --- a/src/cloudflare/types/accounts/member_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["MemberDeleteParams"] - - -class MemberDeleteParams(TypedDict, total=False): - account_id: Required[object] - - body: Required[object] diff --git a/src/cloudflare/types/accounts/member_delete_response.py b/src/cloudflare/types/accounts/member_delete_response.py index 971bb07457f..78ae311b6e5 100644 --- a/src/cloudflare/types/accounts/member_delete_response.py +++ b/src/cloudflare/types/accounts/member_delete_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["MemberDeleteResponse"] diff --git a/src/cloudflare/types/accounts/member_list_params.py b/src/cloudflare/types/accounts/member_list_params.py index a42060948a7..1b594104750 100644 --- a/src/cloudflare/types/accounts/member_list_params.py +++ b/src/cloudflare/types/accounts/member_list_params.py @@ -8,7 +8,7 @@ class MemberListParams(TypedDict, total=False): - account_id: Required[object] + account_id: Required[str] direction: Literal["asc", "desc"] """Direction to order results.""" diff --git a/src/cloudflare/types/accounts/member_update_params.py b/src/cloudflare/types/accounts/member_update_params.py index 69867eb443e..48139d2a39b 100644 --- a/src/cloudflare/types/accounts/member_update_params.py +++ b/src/cloudflare/types/accounts/member_update_params.py @@ -9,7 +9,7 @@ class MemberUpdateParams(TypedDict, total=False): - account_id: Required[object] + account_id: Required[str] roles: Required[Iterable[Role]] """Roles assigned to this member.""" diff --git a/src/cloudflare/types/accounts/status.py b/src/cloudflare/types/accounts/status.py new file mode 100644 index 00000000000..b38c2d347e1 --- /dev/null +++ b/src/cloudflare/types/accounts/status.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["Status"] + +Status = Literal["member", "invited"] diff --git a/src/cloudflare/types/acm/__init__.py b/src/cloudflare/types/acm/__init__.py index 8a22d0dd955..3e75a50890f 100644 --- a/src/cloudflare/types/acm/__init__.py +++ b/src/cloudflare/types/acm/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .certificate_authority import CertificateAuthority as CertificateAuthority from .total_tls_get_response import TotalTLSGetResponse as TotalTLSGetResponse from .total_tls_create_params import TotalTLSCreateParams as TotalTLSCreateParams from .total_tls_create_response import TotalTLSCreateResponse as TotalTLSCreateResponse diff --git a/src/cloudflare/types/acm/certificate_authority.py b/src/cloudflare/types/acm/certificate_authority.py new file mode 100644 index 00000000000..74ff1407188 --- /dev/null +++ b/src/cloudflare/types/acm/certificate_authority.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["CertificateAuthority"] + +CertificateAuthority = Literal["google", "lets_encrypt"] diff --git a/src/cloudflare/types/acm/total_tls_create_params.py b/src/cloudflare/types/acm/total_tls_create_params.py index 027231ae928..aa49802762e 100644 --- a/src/cloudflare/types/acm/total_tls_create_params.py +++ b/src/cloudflare/types/acm/total_tls_create_params.py @@ -2,7 +2,9 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict + +from .certificate_authority import CertificateAuthority __all__ = ["TotalTLSCreateParams"] @@ -17,5 +19,5 @@ class TotalTLSCreateParams(TypedDict, total=False): proxied A, AAAA, or CNAME record in your zone. """ - certificate_authority: Literal["google", "lets_encrypt"] + certificate_authority: CertificateAuthority """The Certificate Authority that Total TLS certificates will be issued through.""" diff --git a/src/cloudflare/types/acm/total_tls_create_response.py b/src/cloudflare/types/acm/total_tls_create_response.py index 83c99534e84..36bb25cef77 100644 --- a/src/cloudflare/types/acm/total_tls_create_response.py +++ b/src/cloudflare/types/acm/total_tls_create_response.py @@ -4,12 +4,13 @@ from typing_extensions import Literal from ..._models import BaseModel +from .certificate_authority import CertificateAuthority __all__ = ["TotalTLSCreateResponse"] class TotalTLSCreateResponse(BaseModel): - certificate_authority: Optional[Literal["google", "lets_encrypt"]] = None + certificate_authority: Optional[CertificateAuthority] = None """The Certificate Authority that Total TLS certificates will be issued through.""" enabled: Optional[bool] = None diff --git a/src/cloudflare/types/acm/total_tls_get_response.py b/src/cloudflare/types/acm/total_tls_get_response.py index fa25aa2bab2..b2d6953e68b 100644 --- a/src/cloudflare/types/acm/total_tls_get_response.py +++ b/src/cloudflare/types/acm/total_tls_get_response.py @@ -4,12 +4,13 @@ from typing_extensions import Literal from ..._models import BaseModel +from .certificate_authority import CertificateAuthority __all__ = ["TotalTLSGetResponse"] class TotalTLSGetResponse(BaseModel): - certificate_authority: Optional[Literal["google", "lets_encrypt"]] = None + certificate_authority: Optional[CertificateAuthority] = None """The Certificate Authority that Total TLS certificates will be issued through.""" enabled: Optional[bool] = None diff --git a/src/cloudflare/types/addressing/__init__.py b/src/cloudflare/types/addressing/__init__.py index 09699f91e4e..2ea66f6d7f8 100644 --- a/src/cloudflare/types/addressing/__init__.py +++ b/src/cloudflare/types/addressing/__init__.py @@ -2,17 +2,16 @@ from __future__ import annotations +from .kind import Kind as Kind from .prefix import Prefix as Prefix from .address_map import AddressMap as AddressMap from .prefix_edit_params import PrefixEditParams as PrefixEditParams from .prefix_create_params import PrefixCreateParams as PrefixCreateParams -from .prefix_delete_params import PrefixDeleteParams as PrefixDeleteParams from .service_list_response import ServiceListResponse as ServiceListResponse from .prefix_delete_response import PrefixDeleteResponse as PrefixDeleteResponse from .address_map_edit_params import AddressMapEditParams as AddressMapEditParams from .address_map_get_response import AddressMapGetResponse as AddressMapGetResponse from .address_map_create_params import AddressMapCreateParams as AddressMapCreateParams -from .address_map_delete_params import AddressMapDeleteParams as AddressMapDeleteParams from .loa_document_create_params import LOADocumentCreateParams as LOADocumentCreateParams from .address_map_create_response import AddressMapCreateResponse as AddressMapCreateResponse from .address_map_delete_response import AddressMapDeleteResponse as AddressMapDeleteResponse diff --git a/src/cloudflare/types/addressing/address_map_create_response.py b/src/cloudflare/types/addressing/address_map_create_response.py index 26d4dc0041f..d4eb788e2df 100644 --- a/src/cloudflare/types/addressing/address_map_create_response.py +++ b/src/cloudflare/types/addressing/address_map_create_response.py @@ -2,8 +2,8 @@ from typing import List, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind from ..._models import BaseModel __all__ = ["AddressMapCreateResponse", "IP", "Membership"] @@ -25,7 +25,7 @@ class Membership(BaseModel): identifier: Optional[str] = None """Identifier""" - kind: Optional[Literal["zone", "account"]] = None + kind: Optional[Kind] = None """The type of the membership.""" diff --git a/src/cloudflare/types/addressing/address_map_delete_params.py b/src/cloudflare/types/addressing/address_map_delete_params.py deleted file mode 100644 index 1e7b18b03ec..00000000000 --- a/src/cloudflare/types/addressing/address_map_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["AddressMapDeleteParams"] - - -class AddressMapDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/addressing/address_map_get_response.py b/src/cloudflare/types/addressing/address_map_get_response.py index 2fa6d14e168..06bdfc92ed8 100644 --- a/src/cloudflare/types/addressing/address_map_get_response.py +++ b/src/cloudflare/types/addressing/address_map_get_response.py @@ -2,8 +2,8 @@ from typing import List, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind from ..._models import BaseModel __all__ = ["AddressMapGetResponse", "IP", "Membership"] @@ -25,7 +25,7 @@ class Membership(BaseModel): identifier: Optional[str] = None """Identifier""" - kind: Optional[Literal["zone", "account"]] = None + kind: Optional[Kind] = None """The type of the membership.""" diff --git a/src/cloudflare/types/addressing/address_maps/__init__.py b/src/cloudflare/types/addressing/address_maps/__init__.py index 3ec4e9eda25..baa9905d0ed 100644 --- a/src/cloudflare/types/addressing/address_maps/__init__.py +++ b/src/cloudflare/types/addressing/address_maps/__init__.py @@ -2,15 +2,12 @@ from __future__ import annotations -from .ip_delete_params import IPDeleteParams as IPDeleteParams from .ip_update_params import IPUpdateParams as IPUpdateParams from .ip_delete_response import IPDeleteResponse as IPDeleteResponse from .ip_update_response import IPUpdateResponse as IPUpdateResponse -from .zone_delete_params import ZoneDeleteParams as ZoneDeleteParams from .zone_update_params import ZoneUpdateParams as ZoneUpdateParams from .zone_delete_response import ZoneDeleteResponse as ZoneDeleteResponse from .zone_update_response import ZoneUpdateResponse as ZoneUpdateResponse -from .account_delete_params import AccountDeleteParams as AccountDeleteParams from .account_update_params import AccountUpdateParams as AccountUpdateParams from .account_delete_response import AccountDeleteResponse as AccountDeleteResponse from .account_update_response import AccountUpdateResponse as AccountUpdateResponse diff --git a/src/cloudflare/types/addressing/address_maps/account_delete_params.py b/src/cloudflare/types/addressing/address_maps/account_delete_params.py deleted file mode 100644 index 7b03287d63c..00000000000 --- a/src/cloudflare/types/addressing/address_maps/account_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["AccountDeleteParams"] - - -class AccountDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/addressing/address_maps/ip_delete_params.py b/src/cloudflare/types/addressing/address_maps/ip_delete_params.py deleted file mode 100644 index ee8bd8d2752..00000000000 --- a/src/cloudflare/types/addressing/address_maps/ip_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["IPDeleteParams"] - - -class IPDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - address_map_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/addressing/kind.py b/src/cloudflare/types/addressing/kind.py new file mode 100644 index 00000000000..5e706ccd7e3 --- /dev/null +++ b/src/cloudflare/types/addressing/kind.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["Kind"] + +Kind = Literal["zone", "account"] diff --git a/src/cloudflare/types/addressing/prefix_delete_params.py b/src/cloudflare/types/addressing/prefix_delete_params.py deleted file mode 100644 index b8f426f6d43..00000000000 --- a/src/cloudflare/types/addressing/prefix_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["PrefixDeleteParams"] - - -class PrefixDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/addressing/prefixes/__init__.py b/src/cloudflare/types/addressing/prefixes/__init__.py index 220f1b64757..3f5ae7763da 100644 --- a/src/cloudflare/types/addressing/prefixes/__init__.py +++ b/src/cloudflare/types/addressing/prefixes/__init__.py @@ -4,5 +4,4 @@ from .delegations import Delegations as Delegations from .delegation_create_params import DelegationCreateParams as DelegationCreateParams -from .delegation_delete_params import DelegationDeleteParams as DelegationDeleteParams from .delegation_delete_response import DelegationDeleteResponse as DelegationDeleteResponse diff --git a/src/cloudflare/types/addressing/prefixes/bgp/__init__.py b/src/cloudflare/types/addressing/prefixes/bgp/__init__.py index 6406cdc7c26..bf70ca01135 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp/__init__.py +++ b/src/cloudflare/types/addressing/prefixes/bgp/__init__.py @@ -9,5 +9,4 @@ from .status_get_response import StatusGetResponse as StatusGetResponse from .status_edit_response import StatusEditResponse as StatusEditResponse from .binding_create_params import BindingCreateParams as BindingCreateParams -from .service_binding_param import ServiceBindingParam as ServiceBindingParam from .binding_delete_response import BindingDeleteResponse as BindingDeleteResponse diff --git a/src/cloudflare/types/addressing/prefixes/bgp/service_binding_param.py b/src/cloudflare/types/addressing/prefixes/bgp/service_binding_param.py deleted file mode 100644 index 3dd61ede1cb..00000000000 --- a/src/cloudflare/types/addressing/prefixes/bgp/service_binding_param.py +++ /dev/null @@ -1,29 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, TypedDict - -__all__ = ["ServiceBindingParam", "Provisioning"] - - -class Provisioning(TypedDict, total=False): - state: Literal["provisioning", "active"] - """ - When a binding has been deployed to a majority of Cloudflare datacenters, the - binding will become active and can be used with its associated service. - """ - - -class ServiceBindingParam(TypedDict, total=False): - cidr: str - """IP Prefix in Classless Inter-Domain Routing format.""" - - provisioning: Provisioning - """Status of a Service Binding's deployment to the Cloudflare network""" - - service_id: str - """Identifier""" - - service_name: str - """Name of a service running on the Cloudflare network""" diff --git a/src/cloudflare/types/addressing/prefixes/delegation_delete_params.py b/src/cloudflare/types/addressing/prefixes/delegation_delete_params.py deleted file mode 100644 index f55e7392304..00000000000 --- a/src/cloudflare/types/addressing/prefixes/delegation_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["DelegationDeleteParams"] - - -class DelegationDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - prefix_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/ai_gateway/__init__.py b/src/cloudflare/types/ai_gateway/__init__.py new file mode 100644 index 00000000000..e34365f10eb --- /dev/null +++ b/src/cloudflare/types/ai_gateway/__init__.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .log_get_params import LogGetParams as LogGetParams +from .log_get_response import LogGetResponse as LogGetResponse +from .ai_gateway_list_params import AIGatewayListParams as AIGatewayListParams +from .ai_gateway_get_response import AIGatewayGetResponse as AIGatewayGetResponse +from .ai_gateway_create_params import AIGatewayCreateParams as AIGatewayCreateParams +from .ai_gateway_list_response import AIGatewayListResponse as AIGatewayListResponse +from .ai_gateway_update_params import AIGatewayUpdateParams as AIGatewayUpdateParams +from .ai_gateway_create_response import AIGatewayCreateResponse as AIGatewayCreateResponse +from .ai_gateway_delete_response import AIGatewayDeleteResponse as AIGatewayDeleteResponse +from .ai_gateway_update_response import AIGatewayUpdateResponse as AIGatewayUpdateResponse diff --git a/src/cloudflare/types/ai_gateway/ai_gateway_create_params.py b/src/cloudflare/types/ai_gateway/ai_gateway_create_params.py new file mode 100644 index 00000000000..c961028df1c --- /dev/null +++ b/src/cloudflare/types/ai_gateway/ai_gateway_create_params.py @@ -0,0 +1,27 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["AIGatewayCreateParams"] + + +class AIGatewayCreateParams(TypedDict, total=False): + account_id: Required[str] + + cache_invalidate_on_update: Required[bool] + + cache_ttl: Required[int] + + collect_logs: Required[bool] + + name: Required[str] + + slug: Required[str] + + rate_limiting_interval: int + + rate_limiting_limit: int + + rate_limiting_technique: str diff --git a/src/cloudflare/types/ai_gateway/ai_gateway_create_response.py b/src/cloudflare/types/ai_gateway/ai_gateway_create_response.py new file mode 100644 index 00000000000..d64bb08d610 --- /dev/null +++ b/src/cloudflare/types/ai_gateway/ai_gateway_create_response.py @@ -0,0 +1,36 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["AIGatewayCreateResponse", "Task"] + + +class Task(BaseModel): + id: str + + cache_invalidate_on_update: bool + + cache_ttl: int + + collect_logs: bool + + created_at: datetime + + modified_at: datetime + + name: str + + slug: str + + rate_limiting_interval: Optional[int] = None + + rate_limiting_limit: Optional[int] = None + + rate_limiting_technique: Optional[str] = None + + +class AIGatewayCreateResponse(BaseModel): + task: Task diff --git a/src/cloudflare/types/ai_gateway/ai_gateway_delete_response.py b/src/cloudflare/types/ai_gateway/ai_gateway_delete_response.py new file mode 100644 index 00000000000..ded796d9e59 --- /dev/null +++ b/src/cloudflare/types/ai_gateway/ai_gateway_delete_response.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["AIGatewayDeleteResponse"] + + +class AIGatewayDeleteResponse(BaseModel): + id: str + + cache_invalidate_on_update: bool + + cache_ttl: int + + collect_logs: bool + + created_at: datetime + + modified_at: datetime + + name: str + + slug: str + + rate_limiting_interval: Optional[int] = None + + rate_limiting_limit: Optional[int] = None + + rate_limiting_technique: Optional[str] = None diff --git a/src/cloudflare/types/ai_gateway/ai_gateway_get_response.py b/src/cloudflare/types/ai_gateway/ai_gateway_get_response.py new file mode 100644 index 00000000000..e8a52224fee --- /dev/null +++ b/src/cloudflare/types/ai_gateway/ai_gateway_get_response.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["AIGatewayGetResponse"] + + +class AIGatewayGetResponse(BaseModel): + id: str + + cache_invalidate_on_update: bool + + cache_ttl: int + + collect_logs: bool + + created_at: datetime + + modified_at: datetime + + name: str + + slug: str + + rate_limiting_interval: Optional[int] = None + + rate_limiting_limit: Optional[int] = None + + rate_limiting_technique: Optional[str] = None diff --git a/src/cloudflare/types/addressing/address_maps/zone_delete_params.py b/src/cloudflare/types/ai_gateway/ai_gateway_list_params.py similarity index 53% rename from src/cloudflare/types/addressing/address_maps/zone_delete_params.py rename to src/cloudflare/types/ai_gateway/ai_gateway_list_params.py index 36219801986..183008d94a3 100644 --- a/src/cloudflare/types/addressing/address_maps/zone_delete_params.py +++ b/src/cloudflare/types/ai_gateway/ai_gateway_list_params.py @@ -4,14 +4,17 @@ from typing_extensions import Required, TypedDict -__all__ = ["ZoneDeleteParams"] +__all__ = ["AIGatewayListParams"] -class ZoneDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - +class AIGatewayListParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" - body: Required[object] + id: str + + order_by: str + """Order By Column Name""" + + page: int + + per_page: int diff --git a/src/cloudflare/types/ai_gateway/ai_gateway_list_response.py b/src/cloudflare/types/ai_gateway/ai_gateway_list_response.py new file mode 100644 index 00000000000..701d72dd550 --- /dev/null +++ b/src/cloudflare/types/ai_gateway/ai_gateway_list_response.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["AIGatewayListResponse"] + + +class AIGatewayListResponse(BaseModel): + id: str + + cache_invalidate_on_update: bool + + cache_ttl: int + + collect_logs: bool + + created_at: datetime + + modified_at: datetime + + name: str + + slug: str + + rate_limiting_interval: Optional[int] = None + + rate_limiting_limit: Optional[int] = None + + rate_limiting_technique: Optional[str] = None diff --git a/src/cloudflare/types/ai_gateway/ai_gateway_update_params.py b/src/cloudflare/types/ai_gateway/ai_gateway_update_params.py new file mode 100644 index 00000000000..0e8898de606 --- /dev/null +++ b/src/cloudflare/types/ai_gateway/ai_gateway_update_params.py @@ -0,0 +1,27 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["AIGatewayUpdateParams"] + + +class AIGatewayUpdateParams(TypedDict, total=False): + account_id: Required[str] + + cache_invalidate_on_update: Required[bool] + + cache_ttl: Required[int] + + collect_logs: Required[bool] + + name: Required[str] + + slug: Required[str] + + rate_limiting_interval: int + + rate_limiting_limit: int + + rate_limiting_technique: str diff --git a/src/cloudflare/types/ai_gateway/ai_gateway_update_response.py b/src/cloudflare/types/ai_gateway/ai_gateway_update_response.py new file mode 100644 index 00000000000..89e6238af2d --- /dev/null +++ b/src/cloudflare/types/ai_gateway/ai_gateway_update_response.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["AIGatewayUpdateResponse"] + + +class AIGatewayUpdateResponse(BaseModel): + id: str + + cache_invalidate_on_update: bool + + cache_ttl: int + + collect_logs: bool + + created_at: datetime + + modified_at: datetime + + name: str + + slug: str + + rate_limiting_interval: Optional[int] = None + + rate_limiting_limit: Optional[int] = None + + rate_limiting_technique: Optional[str] = None diff --git a/src/cloudflare/types/ai_gateway/log_get_params.py b/src/cloudflare/types/ai_gateway/log_get_params.py new file mode 100644 index 00000000000..c6503dfd736 --- /dev/null +++ b/src/cloudflare/types/ai_gateway/log_get_params.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["LogGetParams"] + + +class LogGetParams(TypedDict, total=False): + account_id: Required[str] + + cached: bool + + direction: Literal["asc", "desc"] + + end_date: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + + order_by: Literal["created_at", "provider"] + + page: int + + per_page: int + + search: str + + start_date: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + + success: bool diff --git a/src/cloudflare/types/ai_gateway/log_get_response.py b/src/cloudflare/types/ai_gateway/log_get_response.py new file mode 100644 index 00000000000..052d5d9d921 --- /dev/null +++ b/src/cloudflare/types/ai_gateway/log_get_response.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["LogGetResponse", "LogGetResponseItem"] + + +class LogGetResponseItem(BaseModel): + id: str + + cached: bool + + created_at: datetime + + duration: int + + model: str + + path: str + + provider: str + + request: str + + response: str + + success: bool + + tokens_in: int + + tokens_out: int + + +LogGetResponse = List[LogGetResponseItem] diff --git a/src/cloudflare/types/alerting/__init__.py b/src/cloudflare/types/alerting/__init__.py index 72f0b44455d..bb4a0f9f756 100644 --- a/src/cloudflare/types/alerting/__init__.py +++ b/src/cloudflare/types/alerting/__init__.py @@ -5,7 +5,6 @@ from .policy import Policy as Policy from .history import History as History from .mechanism import Mechanism as Mechanism -from .policy_param import PolicyParam as PolicyParam from .policy_filter import PolicyFilter as PolicyFilter from .mechanism_param import MechanismParam as MechanismParam from .history_list_params import HistoryListParams as HistoryListParams diff --git a/src/cloudflare/types/alerting/policy_param.py b/src/cloudflare/types/alerting/policy_param.py deleted file mode 100644 index fc24717f614..00000000000 --- a/src/cloudflare/types/alerting/policy_param.py +++ /dev/null @@ -1,97 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, TypedDict - -from .mechanism_param import MechanismParam -from .policy_filter_param import PolicyFilterParam - -__all__ = ["PolicyParam"] - - -class PolicyParam(TypedDict, total=False): - alert_type: Literal[ - "access_custom_certificate_expiration_type", - "advanced_ddos_attack_l4_alert", - "advanced_ddos_attack_l7_alert", - "advanced_http_alert_error", - "bgp_hijack_notification", - "billing_usage_alert", - "block_notification_block_removed", - "block_notification_new_block", - "block_notification_review_rejected", - "brand_protection_alert", - "brand_protection_digest", - "clickhouse_alert_fw_anomaly", - "clickhouse_alert_fw_ent_anomaly", - "custom_ssl_certificate_event_type", - "dedicated_ssl_certificate_event_type", - "dos_attack_l4", - "dos_attack_l7", - "expiring_service_token_alert", - "failing_logpush_job_disabled_alert", - "fbm_auto_advertisement", - "fbm_dosd_attack", - "fbm_volumetric_attack", - "health_check_status_notification", - "hostname_aop_custom_certificate_expiration_type", - "http_alert_edge_error", - "http_alert_origin_error", - "incident_alert", - "load_balancing_health_alert", - "load_balancing_pool_enablement_alert", - "logo_match_alert", - "magic_tunnel_health_check_event", - "maintenance_event_notification", - "mtls_certificate_store_certificate_expiration_type", - "pages_event_alert", - "radar_notification", - "real_origin_monitoring", - "scriptmonitor_alert_new_code_change_detections", - "scriptmonitor_alert_new_hosts", - "scriptmonitor_alert_new_malicious_hosts", - "scriptmonitor_alert_new_malicious_scripts", - "scriptmonitor_alert_new_malicious_url", - "scriptmonitor_alert_new_max_length_resource_url", - "scriptmonitor_alert_new_resources", - "secondary_dns_all_primaries_failing", - "secondary_dns_primaries_failing", - "secondary_dns_zone_successfully_updated", - "secondary_dns_zone_validation_warning", - "sentinel_alert", - "stream_live_notifications", - "traffic_anomalies_alert", - "tunnel_health_event", - "tunnel_update_event", - "universal_ssl_event_type", - "web_analytics_metrics_update", - "zone_aop_custom_certificate_expiration_type", - ] - """Refers to which event will trigger a Notification dispatch. - - You can use the endpoint to get available alert types which then will give you a - list of possible values. - """ - - description: str - """Optional description for the Notification policy.""" - - enabled: bool - """Whether or not the Notification policy is enabled.""" - - filters: PolicyFilterParam - """ - Optional filters that allow you to be alerted only on a subset of events for - that alert type based on some criteria. This is only available for select alert - types. See alert type documentation for more details. - """ - - mechanisms: MechanismParam - """List of IDs that will be used when dispatching a notification. - - IDs for email type will be the email address. - """ - - name: str - """Name of the policy.""" diff --git a/src/cloudflare/types/cache/__init__.py b/src/cloudflare/types/cache/__init__.py index 203e43955f7..520b990501d 100644 --- a/src/cloudflare/types/cache/__init__.py +++ b/src/cloudflare/types/cache/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .state import State as State from .cache_reserve import CacheReserve as CacheReserve from .cache_variant import CacheVariant as CacheVariant from .cache_purge_params import CachePurgeParams as CachePurgeParams @@ -10,7 +11,6 @@ from .cache_purge_response import CachePurgeResponse as CachePurgeResponse from .variant_get_response import VariantGetResponse as VariantGetResponse from .regional_tiered_cache import RegionalTieredCache as RegionalTieredCache -from .variant_delete_params import VariantDeleteParams as VariantDeleteParams from .variant_edit_response import VariantEditResponse as VariantEditResponse from .cache_variant_identifier import CacheVariantIdentifier as CacheVariantIdentifier from .cache_reserve_edit_params import CacheReserveEditParams as CacheReserveEditParams @@ -21,7 +21,6 @@ from .cache_reserve_status_response import CacheReserveStatusResponse as CacheReserveStatusResponse from .smart_tiered_cache_edit_params import SmartTieredCacheEditParams as SmartTieredCacheEditParams from .smart_tiered_cache_get_response import SmartTieredCacheGetResponse as SmartTieredCacheGetResponse -from .smart_tiered_cache_delete_params import SmartTieredCacheDeleteParams as SmartTieredCacheDeleteParams from .smart_tiered_cache_edit_response import SmartTieredCacheEditResponse as SmartTieredCacheEditResponse from .regional_tiered_cache_edit_params import RegionalTieredCacheEditParams as RegionalTieredCacheEditParams from .regional_tiered_cache_get_response import RegionalTieredCacheGetResponse as RegionalTieredCacheGetResponse diff --git a/src/cloudflare/types/cache/cache_purge_response.py b/src/cloudflare/types/cache/cache_purge_response.py index 08e7ee41a89..ea34ba55610 100644 --- a/src/cloudflare/types/cache/cache_purge_response.py +++ b/src/cloudflare/types/cache/cache_purge_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["CachePurgeResponse"] diff --git a/src/cloudflare/types/cache/cache_reserve_clear_response.py b/src/cloudflare/types/cache/cache_reserve_clear_response.py index b65b18ed8c3..6ef83d88029 100644 --- a/src/cloudflare/types/cache/cache_reserve_clear_response.py +++ b/src/cloudflare/types/cache/cache_reserve_clear_response.py @@ -2,8 +2,8 @@ from typing import Optional from datetime import datetime -from typing_extensions import Literal +from .state import State from ..._models import BaseModel from .cache_reserve_clear import CacheReserveClear @@ -20,7 +20,7 @@ class CacheReserveClearResponse(BaseModel): start_ts: datetime """The time that the latest Cache Reserve Clear operation started.""" - state: Literal["In-progress", "Completed"] + state: State """The current state of the Cache Reserve Clear operation.""" end_ts: Optional[datetime] = None diff --git a/src/cloudflare/types/cache/cache_reserve_status_response.py b/src/cloudflare/types/cache/cache_reserve_status_response.py index 46d79cbf06b..abc1c4cba82 100644 --- a/src/cloudflare/types/cache/cache_reserve_status_response.py +++ b/src/cloudflare/types/cache/cache_reserve_status_response.py @@ -2,8 +2,8 @@ from typing import Optional from datetime import datetime -from typing_extensions import Literal +from .state import State from ..._models import BaseModel from .cache_reserve_clear import CacheReserveClear @@ -20,7 +20,7 @@ class CacheReserveStatusResponse(BaseModel): start_ts: datetime """The time that the latest Cache Reserve Clear operation started.""" - state: Literal["In-progress", "Completed"] + state: State """The current state of the Cache Reserve Clear operation.""" end_ts: Optional[datetime] = None diff --git a/src/cloudflare/types/cache/smart_tiered_cache_delete_params.py b/src/cloudflare/types/cache/smart_tiered_cache_delete_params.py deleted file mode 100644 index abf76298b5f..00000000000 --- a/src/cloudflare/types/cache/smart_tiered_cache_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["SmartTieredCacheDeleteParams"] - - -class SmartTieredCacheDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/cache/state.py b/src/cloudflare/types/cache/state.py new file mode 100644 index 00000000000..24320fdfa62 --- /dev/null +++ b/src/cloudflare/types/cache/state.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["State"] + +State = Literal["In-progress", "Completed"] diff --git a/src/cloudflare/types/cache/variant_delete_params.py b/src/cloudflare/types/cache/variant_delete_params.py deleted file mode 100644 index 86f4783d716..00000000000 --- a/src/cloudflare/types/cache/variant_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["VariantDeleteParams"] - - -class VariantDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/client_certificates/client_certificate.py b/src/cloudflare/types/client_certificates/client_certificate.py index 426e5838446..58026ca697f 100644 --- a/src/cloudflare/types/client_certificates/client_certificate.py +++ b/src/cloudflare/types/client_certificates/client_certificate.py @@ -1,9 +1,9 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional -from typing_extensions import Literal from ..._models import BaseModel +from ..custom_certificates.status import Status __all__ = ["ClientCertificate", "CertificateAuthority"] @@ -63,7 +63,7 @@ class ClientCertificate(BaseModel): state: Optional[str] = None """State, provided by the CSR""" - status: Optional[Literal["active", "pending_reactivation", "pending_revocation", "revoked"]] = None + status: Optional[Status] = None """ Client Certificates may be active or revoked, and the pending_reactivation or pending_revocation represent in-progress asynchronous transitions diff --git a/src/cloudflare/types/cloudforce_one/request_delete_response.py b/src/cloudflare/types/cloudforce_one/request_delete_response.py index f6dca1edb3f..b7ed5ffbe10 100644 --- a/src/cloudflare/types/cloudforce_one/request_delete_response.py +++ b/src/cloudflare/types/cloudforce_one/request_delete_response.py @@ -1,7 +1,18 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union +from typing import List +from typing_extensions import Literal + +from ..._models import BaseModel +from ..shared.response_info import ResponseInfo __all__ = ["RequestDeleteResponse"] -RequestDeleteResponse = Union[List[object], str, object] + +class RequestDeleteResponse(BaseModel): + errors: List[ResponseInfo] + + messages: List[ResponseInfo] + + success: Literal[True] + """Whether the API call was successful""" diff --git a/src/cloudflare/types/cloudforce_one/requests/message_delete_response.py b/src/cloudflare/types/cloudforce_one/requests/message_delete_response.py index eaadbea2ab5..a0d45a64036 100644 --- a/src/cloudflare/types/cloudforce_one/requests/message_delete_response.py +++ b/src/cloudflare/types/cloudforce_one/requests/message_delete_response.py @@ -1,7 +1,18 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union +from typing import List +from typing_extensions import Literal + +from ...._models import BaseModel +from ...shared.response_info import ResponseInfo __all__ = ["MessageDeleteResponse"] -MessageDeleteResponse = Union[List[object], str, object] + +class MessageDeleteResponse(BaseModel): + errors: List[ResponseInfo] + + messages: List[ResponseInfo] + + success: Literal[True] + """Whether the API call was successful""" diff --git a/src/cloudflare/types/cloudforce_one/requests/priority_delete_response.py b/src/cloudflare/types/cloudforce_one/requests/priority_delete_response.py index 60bd9aae8bd..ee172239bfe 100644 --- a/src/cloudflare/types/cloudforce_one/requests/priority_delete_response.py +++ b/src/cloudflare/types/cloudforce_one/requests/priority_delete_response.py @@ -1,7 +1,18 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union +from typing import List +from typing_extensions import Literal + +from ...._models import BaseModel +from ...shared.response_info import ResponseInfo __all__ = ["PriorityDeleteResponse"] -PriorityDeleteResponse = Union[List[object], str, object] + +class PriorityDeleteResponse(BaseModel): + errors: List[ResponseInfo] + + messages: List[ResponseInfo] + + success: Literal[True] + """Whether the API call was successful""" diff --git a/src/cloudflare/types/custom_certificates/__init__.py b/src/cloudflare/types/custom_certificates/__init__.py index d6d56312339..755996fb44a 100644 --- a/src/cloudflare/types/custom_certificates/__init__.py +++ b/src/cloudflare/types/custom_certificates/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .status import Status as Status from .geo_restrictions import GeoRestrictions as GeoRestrictions from .custom_certificate import CustomCertificate as CustomCertificate from .geo_restrictions_param import GeoRestrictionsParam as GeoRestrictionsParam @@ -11,7 +12,6 @@ from .custom_certificate_list_params import CustomCertificateListParams as CustomCertificateListParams from .custom_certificate_get_response import CustomCertificateGetResponse as CustomCertificateGetResponse from .custom_certificate_create_params import CustomCertificateCreateParams as CustomCertificateCreateParams -from .custom_certificate_delete_params import CustomCertificateDeleteParams as CustomCertificateDeleteParams from .custom_certificate_edit_response import CustomCertificateEditResponse as CustomCertificateEditResponse from .custom_certificate_create_response import CustomCertificateCreateResponse as CustomCertificateCreateResponse from .custom_certificate_delete_response import CustomCertificateDeleteResponse as CustomCertificateDeleteResponse diff --git a/src/cloudflare/types/custom_certificates/custom_certificate_delete_params.py b/src/cloudflare/types/custom_certificates/custom_certificate_delete_params.py deleted file mode 100644 index 2b9a145d0c7..00000000000 --- a/src/cloudflare/types/custom_certificates/custom_certificate_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["CustomCertificateDeleteParams"] - - -class CustomCertificateDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/custom_certificates/status.py b/src/cloudflare/types/custom_certificates/status.py new file mode 100644 index 00000000000..428ccb247b1 --- /dev/null +++ b/src/cloudflare/types/custom_certificates/status.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["Status"] + +Status = Literal["active", "pending_reactivation", "pending_revocation", "revoked"] diff --git a/src/cloudflare/types/custom_hostnames/__init__.py b/src/cloudflare/types/custom_hostnames/__init__.py index ba95ee9a287..c6bdf8da108 100644 --- a/src/cloudflare/types/custom_hostnames/__init__.py +++ b/src/cloudflare/types/custom_hostnames/__init__.py @@ -10,10 +10,8 @@ from .custom_hostname_get_response import CustomHostnameGetResponse as CustomHostnameGetResponse from .fallback_origin_get_response import FallbackOriginGetResponse as FallbackOriginGetResponse from .custom_hostname_create_params import CustomHostnameCreateParams as CustomHostnameCreateParams -from .custom_hostname_delete_params import CustomHostnameDeleteParams as CustomHostnameDeleteParams from .custom_hostname_edit_response import CustomHostnameEditResponse as CustomHostnameEditResponse from .custom_hostname_list_response import CustomHostnameListResponse as CustomHostnameListResponse -from .fallback_origin_delete_params import FallbackOriginDeleteParams as FallbackOriginDeleteParams from .fallback_origin_update_params import FallbackOriginUpdateParams as FallbackOriginUpdateParams from .custom_hostname_create_response import CustomHostnameCreateResponse as CustomHostnameCreateResponse from .custom_hostname_delete_response import CustomHostnameDeleteResponse as CustomHostnameDeleteResponse diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py b/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py index ef1ec55d60b..d47976e8d28 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py @@ -7,6 +7,7 @@ from .dcv_method import DCVMethod from .bundle_method import BundleMethod +from ..shared.certificate_ca import CertificateCA from .domain_validation_type import DomainValidationType __all__ = ["CustomHostnameCreateParams", "SSL", "SSLSettings", "CustomMetadata"] @@ -55,7 +56,7 @@ class SSL(TypedDict, total=False): chain, but does not otherwise modify it. """ - certificate_authority: Literal["digicert", "google", "lets_encrypt"] + certificate_authority: CertificateCA """The Certificate Authority that will issue the certificate""" custom_certificate: str diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py index 236e82ae631..dfe7fd48f7f 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py @@ -7,6 +7,7 @@ from ..._models import BaseModel from .dcv_method import DCVMethod from .bundle_method import BundleMethod +from ..shared.certificate_ca import CertificateCA from .domain_validation_type import DomainValidationType __all__ = [ @@ -87,7 +88,7 @@ class SSL(BaseModel): chain, but does not otherwise modify it. """ - certificate_authority: Optional[Literal["digicert", "google", "lets_encrypt"]] = None + certificate_authority: Optional[CertificateCA] = None """The Certificate Authority that will issue the certificate""" custom_certificate: Optional[str] = None diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_delete_params.py b/src/cloudflare/types/custom_hostnames/custom_hostname_delete_params.py deleted file mode 100644 index 3c96f695143..00000000000 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["CustomHostnameDeleteParams"] - - -class CustomHostnameDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py index a1c237659da..52e45f8ec77 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py @@ -7,6 +7,7 @@ from .dcv_method import DCVMethod from .bundle_method import BundleMethod +from ..shared.certificate_ca import CertificateCA from .domain_validation_type import DomainValidationType __all__ = ["CustomHostnameEditParams", "CustomMetadata", "SSL", "SSLSettings"] @@ -72,7 +73,7 @@ class SSL(TypedDict, total=False): chain, but does not otherwise modify it. """ - certificate_authority: Literal["digicert", "google", "lets_encrypt"] + certificate_authority: CertificateCA """The Certificate Authority that will issue the certificate""" custom_certificate: str diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py index 8697979d1a7..c566f4a4411 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py @@ -7,6 +7,7 @@ from ..._models import BaseModel from .dcv_method import DCVMethod from .bundle_method import BundleMethod +from ..shared.certificate_ca import CertificateCA from .domain_validation_type import DomainValidationType __all__ = [ @@ -87,7 +88,7 @@ class SSL(BaseModel): chain, but does not otherwise modify it. """ - certificate_authority: Optional[Literal["digicert", "google", "lets_encrypt"]] = None + certificate_authority: Optional[CertificateCA] = None """The Certificate Authority that will issue the certificate""" custom_certificate: Optional[str] = None diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py index 1b539d1df8e..16d15f4f222 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py @@ -7,6 +7,7 @@ from ..._models import BaseModel from .dcv_method import DCVMethod from .bundle_method import BundleMethod +from ..shared.certificate_ca import CertificateCA from .domain_validation_type import DomainValidationType __all__ = [ @@ -87,7 +88,7 @@ class SSL(BaseModel): chain, but does not otherwise modify it. """ - certificate_authority: Optional[Literal["digicert", "google", "lets_encrypt"]] = None + certificate_authority: Optional[CertificateCA] = None """The Certificate Authority that will issue the certificate""" custom_certificate: Optional[str] = None diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py index de8909d348a..691ee91af4e 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py @@ -7,6 +7,7 @@ from ..._models import BaseModel from .dcv_method import DCVMethod from .bundle_method import BundleMethod +from ..shared.certificate_ca import CertificateCA from .domain_validation_type import DomainValidationType __all__ = [ @@ -87,7 +88,7 @@ class SSL(BaseModel): chain, but does not otherwise modify it. """ - certificate_authority: Optional[Literal["digicert", "google", "lets_encrypt"]] = None + certificate_authority: Optional[CertificateCA] = None """The Certificate Authority that will issue the certificate""" custom_certificate: Optional[str] = None diff --git a/src/cloudflare/types/custom_hostnames/fallback_origin_delete_params.py b/src/cloudflare/types/custom_hostnames/fallback_origin_delete_params.py deleted file mode 100644 index 4b3fd914a43..00000000000 --- a/src/cloudflare/types/custom_hostnames/fallback_origin_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["FallbackOriginDeleteParams"] - - -class FallbackOriginDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/custom_nameservers/__init__.py b/src/cloudflare/types/custom_nameservers/__init__.py index 50319977db9..a67351a5bcd 100644 --- a/src/cloudflare/types/custom_nameservers/__init__.py +++ b/src/cloudflare/types/custom_nameservers/__init__.py @@ -5,10 +5,7 @@ from .custom_nameserver import CustomNameserver as CustomNameserver from .custom_nameserver_get_response import CustomNameserverGetResponse as CustomNameserverGetResponse from .custom_nameserver_create_params import CustomNameserverCreateParams as CustomNameserverCreateParams -from .custom_nameserver_delete_params import CustomNameserverDeleteParams as CustomNameserverDeleteParams -from .custom_nameserver_verify_params import CustomNameserverVerifyParams as CustomNameserverVerifyParams from .custom_nameserver_delete_response import CustomNameserverDeleteResponse as CustomNameserverDeleteResponse -from .custom_nameserver_verify_response import CustomNameserverVerifyResponse as CustomNameserverVerifyResponse from .custom_nameserver_availabilty_response import ( CustomNameserverAvailabiltyResponse as CustomNameserverAvailabiltyResponse, ) diff --git a/src/cloudflare/types/custom_nameservers/custom_nameserver_delete_params.py b/src/cloudflare/types/custom_nameservers/custom_nameserver_delete_params.py deleted file mode 100644 index 119813a19f7..00000000000 --- a/src/cloudflare/types/custom_nameservers/custom_nameserver_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["CustomNameserverDeleteParams"] - - -class CustomNameserverDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Account identifier tag.""" - - body: Required[object] diff --git a/src/cloudflare/types/custom_nameservers/custom_nameserver_delete_response.py b/src/cloudflare/types/custom_nameservers/custom_nameserver_delete_response.py index f50c645a449..fe6ff20f1de 100644 --- a/src/cloudflare/types/custom_nameservers/custom_nameserver_delete_response.py +++ b/src/cloudflare/types/custom_nameservers/custom_nameserver_delete_response.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union +from typing import List __all__ = ["CustomNameserverDeleteResponse"] -CustomNameserverDeleteResponse = Union[List[object], str, object, None] +CustomNameserverDeleteResponse = List[object] diff --git a/src/cloudflare/types/custom_nameservers/custom_nameserver_verify_params.py b/src/cloudflare/types/custom_nameservers/custom_nameserver_verify_params.py deleted file mode 100644 index 037e56c8880..00000000000 --- a/src/cloudflare/types/custom_nameservers/custom_nameserver_verify_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["CustomNameserverVerifyParams"] - - -class CustomNameserverVerifyParams(TypedDict, total=False): - account_id: Required[str] - """Account identifier tag.""" - - body: Required[object] diff --git a/src/cloudflare/types/custom_nameservers/custom_nameserver_verify_response.py b/src/cloudflare/types/custom_nameservers/custom_nameserver_verify_response.py deleted file mode 100644 index 2397a7bb05a..00000000000 --- a/src/cloudflare/types/custom_nameservers/custom_nameserver_verify_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .custom_nameserver import CustomNameserver - -__all__ = ["CustomNameserverVerifyResponse"] - -CustomNameserverVerifyResponse = List[CustomNameserver] diff --git a/src/cloudflare/types/dns/__init__.py b/src/cloudflare/types/dns/__init__.py index 8f291b22a54..5966582d8bf 100644 --- a/src/cloudflare/types/dns/__init__.py +++ b/src/cloudflare/types/dns/__init__.py @@ -40,13 +40,11 @@ from .firewall_edit_params import FirewallEditParams as FirewallEditParams from .firewall_list_params import FirewallListParams as FirewallListParams from .record_create_params import RecordCreateParams as RecordCreateParams -from .record_delete_params import RecordDeleteParams as RecordDeleteParams from .record_import_params import RecordImportParams as RecordImportParams from .record_scan_response import RecordScanResponse as RecordScanResponse from .record_update_params import RecordUpdateParams as RecordUpdateParams from .record_process_timing import RecordProcessTiming as RecordProcessTiming from .firewall_create_params import FirewallCreateParams as FirewallCreateParams -from .firewall_delete_params import FirewallDeleteParams as FirewallDeleteParams from .record_delete_response import RecordDeleteResponse as RecordDeleteResponse from .record_export_response import RecordExportResponse as RecordExportResponse from .record_import_response import RecordImportResponse as RecordImportResponse diff --git a/src/cloudflare/types/dns/analytics/reports/bytime_get_params.py b/src/cloudflare/types/dns/analytics/reports/bytime_get_params.py index 12ef8217a02..ece9fe71b05 100644 --- a/src/cloudflare/types/dns/analytics/reports/bytime_get_params.py +++ b/src/cloudflare/types/dns/analytics/reports/bytime_get_params.py @@ -4,9 +4,10 @@ from typing import Union from datetime import datetime -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ....._utils import PropertyInfo +from ...firewall.delta import Delta __all__ = ["BytimeGetParams"] @@ -36,7 +37,7 @@ class BytimeGetParams(TypedDict, total=False): prefixed by - (descending) or + (ascending). """ - time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"] + time_delta: Delta """Unit of time to group data by.""" until: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/cloudflare/types/dns/dns_analytics_query.py b/src/cloudflare/types/dns/dns_analytics_query.py index b1d886168e6..a34fcd322bb 100644 --- a/src/cloudflare/types/dns/dns_analytics_query.py +++ b/src/cloudflare/types/dns/dns_analytics_query.py @@ -2,9 +2,9 @@ from typing import List, Optional from datetime import datetime -from typing_extensions import Literal from ..._models import BaseModel +from .firewall.delta import Delta __all__ = ["DNSAnalyticsQuery"] @@ -22,7 +22,7 @@ class DNSAnalyticsQuery(BaseModel): since: datetime """Start date and time of requesting data period in ISO 8601 format.""" - time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"] + time_delta: Delta """Unit of time to group data by.""" until: datetime diff --git a/src/cloudflare/types/dns/firewall/__init__.py b/src/cloudflare/types/dns/firewall/__init__.py index 1e446ac36d1..72f681823a2 100644 --- a/src/cloudflare/types/dns/firewall/__init__.py +++ b/src/cloudflare/types/dns/firewall/__init__.py @@ -2,4 +2,5 @@ from __future__ import annotations +from .delta import Delta as Delta from .firewall import Firewall as Firewall diff --git a/src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_params.py b/src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_params.py index 91d85b4a63a..34773f8974a 100644 --- a/src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_params.py +++ b/src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_params.py @@ -4,8 +4,9 @@ from typing import Union from datetime import datetime -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict +from ...delta import Delta from ......_utils import PropertyInfo __all__ = ["BytimeGetParams"] @@ -36,7 +37,7 @@ class BytimeGetParams(TypedDict, total=False): prefixed by - (descending) or + (ascending). """ - time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"] + time_delta: Delta """Unit of time to group data by.""" until: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/cloudflare/types/dns/firewall/delta.py b/src/cloudflare/types/dns/firewall/delta.py new file mode 100644 index 00000000000..0d5a9933f8b --- /dev/null +++ b/src/cloudflare/types/dns/firewall/delta.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["Delta"] + +Delta = Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"] diff --git a/src/cloudflare/types/dns/record_create_params.py b/src/cloudflare/types/dns/record_create_params.py index f348ac97659..50b85946681 100644 --- a/src/cloudflare/types/dns/record_create_params.py +++ b/src/cloudflare/types/dns/record_create_params.py @@ -892,7 +892,7 @@ class URIRecord(TypedDict, total=False): class URIRecordData(TypedDict, total=False): - content: str + target: str """The record content.""" weight: float diff --git a/src/cloudflare/types/dns/record_delete_params.py b/src/cloudflare/types/dns/record_delete_params.py deleted file mode 100644 index 2c6bdd46f11..00000000000 --- a/src/cloudflare/types/dns/record_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["RecordDeleteParams"] - - -class RecordDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/dns/record_edit_params.py b/src/cloudflare/types/dns/record_edit_params.py index 709779e9ce1..e5604e9762c 100644 --- a/src/cloudflare/types/dns/record_edit_params.py +++ b/src/cloudflare/types/dns/record_edit_params.py @@ -892,7 +892,7 @@ class URIRecord(TypedDict, total=False): class URIRecordData(TypedDict, total=False): - content: str + target: str """The record content.""" weight: float diff --git a/src/cloudflare/types/dns/record_list_params.py b/src/cloudflare/types/dns/record_list_params.py index d9fa8165d0c..1effd2f75e9 100644 --- a/src/cloudflare/types/dns/record_list_params.py +++ b/src/cloudflare/types/dns/record_list_params.py @@ -4,6 +4,8 @@ from typing_extensions import Literal, Required, TypedDict +from ..shared.sort_direction import SortDirection + __all__ = ["RecordListParams", "Comment", "Tag"] @@ -16,7 +18,7 @@ class RecordListParams(TypedDict, total=False): content: str """DNS record content.""" - direction: Literal["asc", "desc"] + direction: SortDirection """Direction to order DNS records in.""" match: Literal["any", "all"] diff --git a/src/cloudflare/types/dns/record_update_params.py b/src/cloudflare/types/dns/record_update_params.py index 9cb23c89af2..881f62f1c71 100644 --- a/src/cloudflare/types/dns/record_update_params.py +++ b/src/cloudflare/types/dns/record_update_params.py @@ -892,7 +892,7 @@ class URIRecord(TypedDict, total=False): class URIRecordData(TypedDict, total=False): - content: str + target: str """The record content.""" weight: float diff --git a/src/cloudflare/types/dns/uri_record.py b/src/cloudflare/types/dns/uri_record.py index 508c3941b5f..15534dd560a 100644 --- a/src/cloudflare/types/dns/uri_record.py +++ b/src/cloudflare/types/dns/uri_record.py @@ -13,7 +13,7 @@ class Data(BaseModel): - content: Optional[str] = None + target: Optional[str] = None """The record content.""" weight: Optional[float] = None diff --git a/src/cloudflare/types/dnssec/__init__.py b/src/cloudflare/types/dnssec/__init__.py index ee2cb757f84..a8c3b38cc31 100644 --- a/src/cloudflare/types/dnssec/__init__.py +++ b/src/cloudflare/types/dnssec/__init__.py @@ -4,5 +4,4 @@ from .dnssec import DNSSEC as DNSSEC from .dnssec_edit_params import DNSSECEditParams as DNSSECEditParams -from .dnssec_delete_params import DNSSECDeleteParams as DNSSECDeleteParams from .dnssec_delete_response import DNSSECDeleteResponse as DNSSECDeleteResponse diff --git a/src/cloudflare/types/dnssec/dnssec_delete_params.py b/src/cloudflare/types/dnssec/dnssec_delete_params.py deleted file mode 100644 index a162028cb6a..00000000000 --- a/src/cloudflare/types/dnssec/dnssec_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["DNSSECDeleteParams"] - - -class DNSSECDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/filters/__init__.py b/src/cloudflare/types/filters/__init__.py index 0be276f7d5c..14ec0c81123 100644 --- a/src/cloudflare/types/filters/__init__.py +++ b/src/cloudflare/types/filters/__init__.py @@ -5,6 +5,5 @@ from .firewall_filter import FirewallFilter as FirewallFilter from .filter_list_params import FilterListParams as FilterListParams from .filter_create_params import FilterCreateParams as FilterCreateParams -from .filter_delete_params import FilterDeleteParams as FilterDeleteParams from .filter_update_params import FilterUpdateParams as FilterUpdateParams from .filter_create_response import FilterCreateResponse as FilterCreateResponse diff --git a/src/cloudflare/types/filters/filter_delete_params.py b/src/cloudflare/types/filters/filter_delete_params.py deleted file mode 100644 index 92e7b099d7d..00000000000 --- a/src/cloudflare/types/filters/filter_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["FilterDeleteParams"] - - -class FilterDeleteParams(TypedDict, total=False): - zone_identifier: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/firewall/__init__.py b/src/cloudflare/types/firewall/__init__.py index 463e992a863..3c81f93f594 100644 --- a/src/cloudflare/types/firewall/__init__.py +++ b/src/cloudflare/types/firewall/__init__.py @@ -12,20 +12,16 @@ from .rule_edit_params import RuleEditParams as RuleEditParams from .rule_list_params import RuleListParams as RuleListParams from .rule_create_params import RuleCreateParams as RuleCreateParams -from .rule_delete_params import RuleDeleteParams as RuleDeleteParams from .rule_edit_response import RuleEditResponse as RuleEditResponse from .rule_update_params import RuleUpdateParams as RuleUpdateParams -from .configuration_param import ConfigurationParam as ConfigurationParam from .ua_rule_list_params import UARuleListParams as UARuleListParams from .lockdown_list_params import LockdownListParams as LockdownListParams from .rule_create_response import RuleCreateResponse as RuleCreateResponse from .ua_rule_get_response import UARuleGetResponse as UARuleGetResponse from .ua_rule_create_params import UARuleCreateParams as UARuleCreateParams -from .ua_rule_delete_params import UARuleDeleteParams as UARuleDeleteParams from .ua_rule_list_response import UARuleListResponse as UARuleListResponse from .ua_rule_update_params import UARuleUpdateParams as UARuleUpdateParams from .lockdown_create_params import LockdownCreateParams as LockdownCreateParams -from .lockdown_delete_params import LockdownDeleteParams as LockdownDeleteParams from .lockdown_update_params import LockdownUpdateParams as LockdownUpdateParams from .access_rule_edit_params import AccessRuleEditParams as AccessRuleEditParams from .access_rule_list_params import AccessRuleListParams as AccessRuleListParams @@ -37,7 +33,6 @@ from .ipv6_configuration_param import IPV6ConfigurationParam as IPV6ConfigurationParam from .lockdown_delete_response import LockdownDeleteResponse as LockdownDeleteResponse from .access_rule_create_params import AccessRuleCreateParams as AccessRuleCreateParams -from .access_rule_delete_params import AccessRuleDeleteParams as AccessRuleDeleteParams from .access_rule_edit_response import AccessRuleEditResponse as AccessRuleEditResponse from .lockdown_ip_configuration import LockdownIPConfiguration as LockdownIPConfiguration from .access_rule_create_response import AccessRuleCreateResponse as AccessRuleCreateResponse diff --git a/src/cloudflare/types/firewall/access_rule_delete_params.py b/src/cloudflare/types/firewall/access_rule_delete_params.py deleted file mode 100644 index e3452b077eb..00000000000 --- a/src/cloudflare/types/firewall/access_rule_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["AccessRuleDeleteParams"] - - -class AccessRuleDeleteParams(TypedDict, total=False): - body: Required[object] - - account_id: str - """The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.""" - - zone_id: str - """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" diff --git a/src/cloudflare/types/firewall/access_rule_delete_response.py b/src/cloudflare/types/firewall/access_rule_delete_response.py index c00802e920a..2dc451a144c 100644 --- a/src/cloudflare/types/firewall/access_rule_delete_response.py +++ b/src/cloudflare/types/firewall/access_rule_delete_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["AccessRuleDeleteResponse"] diff --git a/src/cloudflare/types/firewall/configuration_param.py b/src/cloudflare/types/firewall/configuration_param.py deleted file mode 100644 index ffedb3978c2..00000000000 --- a/src/cloudflare/types/firewall/configuration_param.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union - -from .lockdown_ip_configuration import LockdownIPConfiguration -from .lockdown_cidr_configuration import LockdownCIDRConfiguration - -__all__ = ["ConfigurationParam"] - -ConfigurationParam = Union[LockdownIPConfiguration, LockdownCIDRConfiguration] diff --git a/src/cloudflare/types/firewall/deleted_filter.py b/src/cloudflare/types/firewall/deleted_filter.py index 2172524a4be..8eb4d27b96e 100644 --- a/src/cloudflare/types/firewall/deleted_filter.py +++ b/src/cloudflare/types/firewall/deleted_filter.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["DeletedFilter"] diff --git a/src/cloudflare/types/firewall/lockdown_delete_params.py b/src/cloudflare/types/firewall/lockdown_delete_params.py deleted file mode 100644 index c56000f1e92..00000000000 --- a/src/cloudflare/types/firewall/lockdown_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["LockdownDeleteParams"] - - -class LockdownDeleteParams(TypedDict, total=False): - zone_identifier: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/firewall/rule_delete_params.py b/src/cloudflare/types/firewall/rule_delete_params.py deleted file mode 100644 index f02410c8608..00000000000 --- a/src/cloudflare/types/firewall/rule_delete_params.py +++ /dev/null @@ -1,18 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["RuleDeleteParams"] - - -class RuleDeleteParams(TypedDict, total=False): - zone_identifier: Required[str] - """Identifier""" - - delete_filter_if_unused: bool - """ - When true, indicates that Cloudflare should also delete the associated filter if - there are no other firewall rules referencing the filter. - """ diff --git a/src/cloudflare/types/firewall/ua_rule_delete_params.py b/src/cloudflare/types/firewall/ua_rule_delete_params.py deleted file mode 100644 index ff1566c3eb5..00000000000 --- a/src/cloudflare/types/firewall/ua_rule_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["UARuleDeleteParams"] - - -class UARuleDeleteParams(TypedDict, total=False): - zone_identifier: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/firewall/waf/__init__.py b/src/cloudflare/types/firewall/waf/__init__.py index a6f42971f3e..1ab23bf139b 100644 --- a/src/cloudflare/types/firewall/waf/__init__.py +++ b/src/cloudflare/types/firewall/waf/__init__.py @@ -11,6 +11,5 @@ from .package_get_response import PackageGetResponse as PackageGetResponse from .package_list_response import PackageListResponse as PackageListResponse from .override_create_params import OverrideCreateParams as OverrideCreateParams -from .override_delete_params import OverrideDeleteParams as OverrideDeleteParams from .override_update_params import OverrideUpdateParams as OverrideUpdateParams from .override_delete_response import OverrideDeleteResponse as OverrideDeleteResponse diff --git a/src/cloudflare/types/firewall/waf/override_delete_params.py b/src/cloudflare/types/firewall/waf/override_delete_params.py deleted file mode 100644 index 9a4c0e0fa57..00000000000 --- a/src/cloudflare/types/firewall/waf/override_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["OverrideDeleteParams"] - - -class OverrideDeleteParams(TypedDict, total=False): - zone_identifier: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/firewall/waf/packages/rule_edit_response.py b/src/cloudflare/types/firewall/waf/packages/rule_edit_response.py index ee9d690caa2..a11036ad2f9 100644 --- a/src/cloudflare/types/firewall/waf/packages/rule_edit_response.py +++ b/src/cloudflare/types/firewall/waf/packages/rule_edit_response.py @@ -80,8 +80,6 @@ class WAFManagedRulesTraditionalAllowRule(BaseModel): allowed_modes: List[Literal["on", "off"]] """Defines the available modes for the current WAF rule.""" - default_mode: object - description: str """The public description of the WAF rule.""" diff --git a/src/cloudflare/types/firewall/waf/packages/rule_list_response.py b/src/cloudflare/types/firewall/waf/packages/rule_list_response.py index 29a688b1a13..5043962f2ed 100644 --- a/src/cloudflare/types/firewall/waf/packages/rule_list_response.py +++ b/src/cloudflare/types/firewall/waf/packages/rule_list_response.py @@ -80,8 +80,6 @@ class WAFManagedRulesTraditionalAllowRule(BaseModel): allowed_modes: List[Literal["on", "off"]] """Defines the available modes for the current WAF rule.""" - default_mode: object - description: str """The public description of the WAF rule.""" diff --git a/src/cloudflare/types/healthchecks/__init__.py b/src/cloudflare/types/healthchecks/__init__.py index c40061ff8bb..ff058b95031 100644 --- a/src/cloudflare/types/healthchecks/__init__.py +++ b/src/cloudflare/types/healthchecks/__init__.py @@ -7,13 +7,11 @@ from .tcp_configuration import TCPConfiguration as TCPConfiguration from .http_configuration import HTTPConfiguration as HTTPConfiguration from .preview_create_params import PreviewCreateParams as PreviewCreateParams -from .preview_delete_params import PreviewDeleteParams as PreviewDeleteParams from .healthcheck_edit_params import HealthcheckEditParams as HealthcheckEditParams from .healthcheck_list_params import HealthcheckListParams as HealthcheckListParams from .preview_delete_response import PreviewDeleteResponse as PreviewDeleteResponse from .tcp_configuration_param import TCPConfigurationParam as TCPConfigurationParam from .http_configuration_param import HTTPConfigurationParam as HTTPConfigurationParam from .healthcheck_create_params import HealthcheckCreateParams as HealthcheckCreateParams -from .healthcheck_delete_params import HealthcheckDeleteParams as HealthcheckDeleteParams from .healthcheck_update_params import HealthcheckUpdateParams as HealthcheckUpdateParams from .healthcheck_delete_response import HealthcheckDeleteResponse as HealthcheckDeleteResponse diff --git a/src/cloudflare/types/healthchecks/healthcheck_delete_params.py b/src/cloudflare/types/healthchecks/healthcheck_delete_params.py deleted file mode 100644 index f5e2b2d458f..00000000000 --- a/src/cloudflare/types/healthchecks/healthcheck_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["HealthcheckDeleteParams"] - - -class HealthcheckDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/healthchecks/preview_delete_params.py b/src/cloudflare/types/healthchecks/preview_delete_params.py deleted file mode 100644 index 0c0c7c54e29..00000000000 --- a/src/cloudflare/types/healthchecks/preview_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["PreviewDeleteParams"] - - -class PreviewDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/images/__init__.py b/src/cloudflare/types/images/__init__.py index 30dfb30e782..82bb5061aac 100644 --- a/src/cloudflare/types/images/__init__.py +++ b/src/cloudflare/types/images/__init__.py @@ -7,7 +7,6 @@ from .v1_list_params import V1ListParams as V1ListParams from .v2_list_params import V2ListParams as V2ListParams from .v1_create_params import V1CreateParams as V1CreateParams -from .v1_delete_params import V1DeleteParams as V1DeleteParams from .v1_list_response import V1ListResponse as V1ListResponse from .v2_list_response import V2ListResponse as V2ListResponse from .v1_delete_response import V1DeleteResponse as V1DeleteResponse diff --git a/src/cloudflare/types/images/v1/__init__.py b/src/cloudflare/types/images/v1/__init__.py index 9728296b698..b027cfebcfb 100644 --- a/src/cloudflare/types/images/v1/__init__.py +++ b/src/cloudflare/types/images/v1/__init__.py @@ -11,7 +11,6 @@ from .variant_edit_params import VariantEditParams as VariantEditParams from .variant_get_response import VariantGetResponse as VariantGetResponse from .variant_create_params import VariantCreateParams as VariantCreateParams -from .variant_delete_params import VariantDeleteParams as VariantDeleteParams from .variant_edit_response import VariantEditResponse as VariantEditResponse from .variant_create_response import VariantCreateResponse as VariantCreateResponse from .variant_delete_response import VariantDeleteResponse as VariantDeleteResponse diff --git a/src/cloudflare/types/images/v1/variant_delete_params.py b/src/cloudflare/types/images/v1/variant_delete_params.py deleted file mode 100644 index 08386e60a21..00000000000 --- a/src/cloudflare/types/images/v1/variant_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["VariantDeleteParams"] - - -class VariantDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Account identifier tag.""" - - body: Required[object] diff --git a/src/cloudflare/types/images/v1_delete_params.py b/src/cloudflare/types/images/v1_delete_params.py deleted file mode 100644 index dd7e4372beb..00000000000 --- a/src/cloudflare/types/images/v1_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["V1DeleteParams"] - - -class V1DeleteParams(TypedDict, total=False): - account_id: Required[str] - """Account identifier tag.""" - - body: Required[object] diff --git a/src/cloudflare/types/intel/__init__.py b/src/cloudflare/types/intel/__init__.py index 4ad7dbe24f6..42260a14d9c 100644 --- a/src/cloudflare/types/intel/__init__.py +++ b/src/cloudflare/types/intel/__init__.py @@ -4,11 +4,9 @@ from .ip import IP as IP from .dns import DNS as DNS -from .whois import Whois as Whois from .domain import Domain as Domain from .ip_list import IPList as IPList from .sinkhole import Sinkhole as Sinkhole -from .dns_param import DNSParam as DNSParam from .ip_get_params import IPGetParams as IPGetParams from .domain_history import DomainHistory as DomainHistory from .dns_list_params import DNSListParams as DNSListParams @@ -16,6 +14,7 @@ from .whois_get_params import WhoisGetParams as WhoisGetParams from .dns_list_response import DNSListResponse as DNSListResponse from .domain_get_params import DomainGetParams as DomainGetParams +from .whois_get_response import WhoisGetResponse as WhoisGetResponse from .ip_list_get_response import IPListGetResponse as IPListGetResponse from .domain_history_get_params import DomainHistoryGetParams as DomainHistoryGetParams from .domain_history_get_response import DomainHistoryGetResponse as DomainHistoryGetResponse diff --git a/src/cloudflare/types/intel/attack_surface_report/__init__.py b/src/cloudflare/types/intel/attack_surface_report/__init__.py index 65bb5364128..a283d5acd80 100644 --- a/src/cloudflare/types/intel/attack_surface_report/__init__.py +++ b/src/cloudflare/types/intel/attack_surface_report/__init__.py @@ -3,9 +3,6 @@ from __future__ import annotations from .issue_type import IssueType as IssueType -from .product_param import ProductParam as ProductParam -from .subject_param import SubjectParam as SubjectParam -from .issue_class_param import IssueClassParam as IssueClassParam from .issue_list_params import IssueListParams as IssueListParams from .issue_type_params import IssueTypeParams as IssueTypeParams from .issue_class_params import IssueClassParams as IssueClassParams diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_class_param.py b/src/cloudflare/types/intel/attack_surface_report/issue_class_param.py deleted file mode 100644 index 2f14613c861..00000000000 --- a/src/cloudflare/types/intel/attack_surface_report/issue_class_param.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List - -__all__ = ["IssueClassParamItem"] - -IssueClassParamItem = str - -IssueClassParam = List[str] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_class_params.py b/src/cloudflare/types/intel/attack_surface_report/issue_class_params.py index dba6dbee763..c1491016c5c 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_class_params.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_class_params.py @@ -7,9 +7,6 @@ from ...._utils import PropertyInfo from .issue_type import IssueType -from .product_param import ProductParam -from .subject_param import SubjectParam -from .issue_class_param import IssueClassParam from .severity_query_param import SeverityQueryParam __all__ = ["IssueClassParams"] @@ -21,22 +18,22 @@ class IssueClassParams(TypedDict, total=False): dismissed: bool - issue_class: IssueClassParam + issue_class: List[str] - issue_class_neq: Annotated[IssueClassParam, PropertyInfo(alias="issue_class~neq")] + issue_class_neq: Annotated[List[str], PropertyInfo(alias="issue_class~neq")] issue_type: List[IssueType] issue_type_neq: Annotated[List[IssueType], PropertyInfo(alias="issue_type~neq")] - product: ProductParam + product: List[str] - product_neq: Annotated[ProductParam, PropertyInfo(alias="product~neq")] + product_neq: Annotated[List[str], PropertyInfo(alias="product~neq")] severity: List[SeverityQueryParam] severity_neq: Annotated[List[SeverityQueryParam], PropertyInfo(alias="severity~neq")] - subject: SubjectParam + subject: List[str] - subject_neq: Annotated[SubjectParam, PropertyInfo(alias="subject~neq")] + subject_neq: Annotated[List[str], PropertyInfo(alias="subject~neq")] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_list_params.py b/src/cloudflare/types/intel/attack_surface_report/issue_list_params.py index 8a29f8fb941..99a5eba82cc 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_list_params.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_list_params.py @@ -7,9 +7,6 @@ from ...._utils import PropertyInfo from .issue_type import IssueType -from .product_param import ProductParam -from .subject_param import SubjectParam -from .issue_class_param import IssueClassParam from .severity_query_param import SeverityQueryParam __all__ = ["IssueListParams"] @@ -21,9 +18,9 @@ class IssueListParams(TypedDict, total=False): dismissed: bool - issue_class: IssueClassParam + issue_class: List[str] - issue_class_neq: Annotated[IssueClassParam, PropertyInfo(alias="issue_class~neq")] + issue_class_neq: Annotated[List[str], PropertyInfo(alias="issue_class~neq")] issue_type: List[IssueType] @@ -35,14 +32,14 @@ class IssueListParams(TypedDict, total=False): per_page: int """Number of results per page of results""" - product: ProductParam + product: List[str] - product_neq: Annotated[ProductParam, PropertyInfo(alias="product~neq")] + product_neq: Annotated[List[str], PropertyInfo(alias="product~neq")] severity: List[SeverityQueryParam] severity_neq: Annotated[List[SeverityQueryParam], PropertyInfo(alias="severity~neq")] - subject: SubjectParam + subject: List[str] - subject_neq: Annotated[SubjectParam, PropertyInfo(alias="subject~neq")] + subject_neq: Annotated[List[str], PropertyInfo(alias="subject~neq")] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py b/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py index da16535dc2b..4d96fa65072 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py @@ -5,6 +5,7 @@ from typing_extensions import Literal from ...._models import BaseModel +from .issue_type import IssueType from ...shared.response_info import ResponseInfo __all__ = ["IssueListResponse", "Result", "ResultIssue"] @@ -17,15 +18,7 @@ class ResultIssue(BaseModel): issue_class: Optional[str] = None - issue_type: Optional[ - Literal[ - "compliance_violation", - "email_security", - "exposed_infrastructure", - "insecure_configuration", - "weak_authentication", - ] - ] = None + issue_type: Optional[IssueType] = None payload: Optional[object] = None diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_severity_params.py b/src/cloudflare/types/intel/attack_surface_report/issue_severity_params.py index 7eab3a44454..bb92b4f2777 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_severity_params.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_severity_params.py @@ -7,9 +7,6 @@ from ...._utils import PropertyInfo from .issue_type import IssueType -from .product_param import ProductParam -from .subject_param import SubjectParam -from .issue_class_param import IssueClassParam from .severity_query_param import SeverityQueryParam __all__ = ["IssueSeverityParams"] @@ -21,22 +18,22 @@ class IssueSeverityParams(TypedDict, total=False): dismissed: bool - issue_class: IssueClassParam + issue_class: List[str] - issue_class_neq: Annotated[IssueClassParam, PropertyInfo(alias="issue_class~neq")] + issue_class_neq: Annotated[List[str], PropertyInfo(alias="issue_class~neq")] issue_type: List[IssueType] issue_type_neq: Annotated[List[IssueType], PropertyInfo(alias="issue_type~neq")] - product: ProductParam + product: List[str] - product_neq: Annotated[ProductParam, PropertyInfo(alias="product~neq")] + product_neq: Annotated[List[str], PropertyInfo(alias="product~neq")] severity: List[SeverityQueryParam] severity_neq: Annotated[List[SeverityQueryParam], PropertyInfo(alias="severity~neq")] - subject: SubjectParam + subject: List[str] - subject_neq: Annotated[SubjectParam, PropertyInfo(alias="subject~neq")] + subject_neq: Annotated[List[str], PropertyInfo(alias="subject~neq")] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_type_params.py b/src/cloudflare/types/intel/attack_surface_report/issue_type_params.py index 6f7e7d888d7..9f3b934bee5 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_type_params.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_type_params.py @@ -7,9 +7,6 @@ from ...._utils import PropertyInfo from .issue_type import IssueType -from .product_param import ProductParam -from .subject_param import SubjectParam -from .issue_class_param import IssueClassParam from .severity_query_param import SeverityQueryParam __all__ = ["IssueTypeParams"] @@ -21,22 +18,22 @@ class IssueTypeParams(TypedDict, total=False): dismissed: bool - issue_class: IssueClassParam + issue_class: List[str] - issue_class_neq: Annotated[IssueClassParam, PropertyInfo(alias="issue_class~neq")] + issue_class_neq: Annotated[List[str], PropertyInfo(alias="issue_class~neq")] issue_type: List[IssueType] issue_type_neq: Annotated[List[IssueType], PropertyInfo(alias="issue_type~neq")] - product: ProductParam + product: List[str] - product_neq: Annotated[ProductParam, PropertyInfo(alias="product~neq")] + product_neq: Annotated[List[str], PropertyInfo(alias="product~neq")] severity: List[SeverityQueryParam] severity_neq: Annotated[List[SeverityQueryParam], PropertyInfo(alias="severity~neq")] - subject: SubjectParam + subject: List[str] - subject_neq: Annotated[SubjectParam, PropertyInfo(alias="subject~neq")] + subject_neq: Annotated[List[str], PropertyInfo(alias="subject~neq")] diff --git a/src/cloudflare/types/intel/attack_surface_report/subject_param.py b/src/cloudflare/types/intel/attack_surface_report/subject_param.py deleted file mode 100644 index f360f7d73b0..00000000000 --- a/src/cloudflare/types/intel/attack_surface_report/subject_param.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List - -__all__ = ["SubjectParamItem"] - -SubjectParamItem = str - -SubjectParam = List[str] diff --git a/src/cloudflare/types/intel/dns_list_response.py b/src/cloudflare/types/intel/dns_list_response.py index ed0cea0cfcf..b17d1940c3f 100644 --- a/src/cloudflare/types/intel/dns_list_response.py +++ b/src/cloudflare/types/intel/dns_list_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List +from typing import List, Optional from typing_extensions import Literal from .dns import DNS @@ -15,7 +15,7 @@ class DNSListResponse(BaseModel): messages: List[ResponseInfo] - result: DNS - success: Literal[True] """Whether the API call was successful""" + + result: Optional[DNS] = None diff --git a/src/cloudflare/types/intel/dns_param.py b/src/cloudflare/types/intel/dns_param.py deleted file mode 100644 index dcca6358a0b..00000000000 --- a/src/cloudflare/types/intel/dns_param.py +++ /dev/null @@ -1,36 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union, Iterable -from datetime import date -from typing_extensions import Annotated, TypedDict - -from ..._utils import PropertyInfo - -__all__ = ["DNSParam", "ReverseRecord"] - - -class ReverseRecord(TypedDict, total=False): - first_seen: Annotated[Union[str, date], PropertyInfo(format="iso8601")] - """First seen date of the DNS record during the time period.""" - - hostname: object - """Hostname that the IP was observed resolving to.""" - - last_seen: Annotated[Union[str, date], PropertyInfo(format="iso8601")] - """Last seen date of the DNS record during the time period.""" - - -class DNSParam(TypedDict, total=False): - count: float - """Total results returned based on your search parameters.""" - - page: float - """Current page within paginated list of results.""" - - per_page: float - """Number of results per page of results.""" - - reverse_records: Iterable[ReverseRecord] - """Reverse DNS look-ups observed during the time period.""" diff --git a/src/cloudflare/types/intel/indicator_feed_create_response.py b/src/cloudflare/types/intel/indicator_feed_create_response.py index df05ab4b464..3f6e80b940d 100644 --- a/src/cloudflare/types/intel/indicator_feed_create_response.py +++ b/src/cloudflare/types/intel/indicator_feed_create_response.py @@ -18,6 +18,12 @@ class IndicatorFeedCreateResponse(BaseModel): description: Optional[str] = None """The description of the example test""" + is_attributable: Optional[bool] = None + """Whether the indicator feed can be attributed to a provider""" + + is_public: Optional[bool] = None + """Whether the indicator feed is exposed to customers""" + modified_on: Optional[datetime] = None """The date and time when the data entry was last modified""" diff --git a/src/cloudflare/types/intel/indicator_feed_list_response.py b/src/cloudflare/types/intel/indicator_feed_list_response.py index 5f965155c38..9358f20f981 100644 --- a/src/cloudflare/types/intel/indicator_feed_list_response.py +++ b/src/cloudflare/types/intel/indicator_feed_list_response.py @@ -18,6 +18,12 @@ class IndicatorFeedListResponse(BaseModel): description: Optional[str] = None """The description of the example test""" + is_attributable: Optional[bool] = None + """Whether the indicator feed can be attributed to a provider""" + + is_public: Optional[bool] = None + """Whether the indicator feed is exposed to customers""" + modified_on: Optional[datetime] = None """The date and time when the data entry was last modified""" diff --git a/src/cloudflare/types/intel/indicator_feed_update_params.py b/src/cloudflare/types/intel/indicator_feed_update_params.py index 69f6383fa28..b7af16167f6 100644 --- a/src/cloudflare/types/intel/indicator_feed_update_params.py +++ b/src/cloudflare/types/intel/indicator_feed_update_params.py @@ -11,5 +11,11 @@ class IndicatorFeedUpdateParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - source: str - """The file to upload""" + feed_description: str + """The new description of the feed""" + + is_attributable: bool + """The new is_attributable value of the feed""" + + is_public: bool + """The new is_public value of the feed""" diff --git a/src/cloudflare/types/intel/indicator_feed_update_response.py b/src/cloudflare/types/intel/indicator_feed_update_response.py index c4983df11d5..9cc5828a4e1 100644 --- a/src/cloudflare/types/intel/indicator_feed_update_response.py +++ b/src/cloudflare/types/intel/indicator_feed_update_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from datetime import datetime from ..._models import BaseModel @@ -8,11 +9,23 @@ class IndicatorFeedUpdateResponse(BaseModel): - file_id: Optional[int] = None - """Feed id""" + id: Optional[int] = None + """The unique identifier for the indicator feed""" - filename: Optional[str] = None - """Name of the file unified in our system""" + created_on: Optional[datetime] = None + """The date and time when the data entry was created""" - status: Optional[str] = None - """Current status of upload, should be unified""" + description: Optional[str] = None + """The description of the example test""" + + is_attributable: Optional[bool] = None + """Whether the indicator feed can be attributed to a provider""" + + is_public: Optional[bool] = None + """Whether the indicator feed is exposed to customers""" + + modified_on: Optional[datetime] = None + """The date and time when the data entry was last modified""" + + name: Optional[str] = None + """The name of the indicator feed""" diff --git a/src/cloudflare/types/intel/indicator_feeds/__init__.py b/src/cloudflare/types/intel/indicator_feeds/__init__.py index e27400cd140..26be868632e 100644 --- a/src/cloudflare/types/intel/indicator_feeds/__init__.py +++ b/src/cloudflare/types/intel/indicator_feeds/__init__.py @@ -2,8 +2,10 @@ from __future__ import annotations +from .snapshot_update_params import SnapshotUpdateParams as SnapshotUpdateParams from .permission_create_params import PermissionCreateParams as PermissionCreateParams from .permission_delete_params import PermissionDeleteParams as PermissionDeleteParams from .permission_list_response import PermissionListResponse as PermissionListResponse +from .snapshot_update_response import SnapshotUpdateResponse as SnapshotUpdateResponse from .permission_create_response import PermissionCreateResponse as PermissionCreateResponse from .permission_delete_response import PermissionDeleteResponse as PermissionDeleteResponse diff --git a/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py b/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py index 50538efec4f..141ef2696f2 100644 --- a/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py +++ b/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py @@ -14,6 +14,12 @@ class PermissionListResponseItem(BaseModel): description: Optional[str] = None """The description of the example test""" + is_attributable: Optional[bool] = None + """Whether the indicator feed can be attributed to a provider""" + + is_public: Optional[bool] = None + """Whether the indicator feed is exposed to customers""" + name: Optional[str] = None """The name of the indicator feed""" diff --git a/src/cloudflare/types/dns/firewall_delete_params.py b/src/cloudflare/types/intel/indicator_feeds/snapshot_update_params.py similarity index 63% rename from src/cloudflare/types/dns/firewall_delete_params.py rename to src/cloudflare/types/intel/indicator_feeds/snapshot_update_params.py index e0fc1fb1cf2..ec0d386ca4f 100644 --- a/src/cloudflare/types/dns/firewall_delete_params.py +++ b/src/cloudflare/types/intel/indicator_feeds/snapshot_update_params.py @@ -4,11 +4,12 @@ from typing_extensions import Required, TypedDict -__all__ = ["FirewallDeleteParams"] +__all__ = ["SnapshotUpdateParams"] -class FirewallDeleteParams(TypedDict, total=False): +class SnapshotUpdateParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - body: Required[object] + source: str + """The file to upload""" diff --git a/src/cloudflare/types/intel/indicator_feeds/snapshot_update_response.py b/src/cloudflare/types/intel/indicator_feeds/snapshot_update_response.py new file mode 100644 index 00000000000..60b48345210 --- /dev/null +++ b/src/cloudflare/types/intel/indicator_feeds/snapshot_update_response.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ...._models import BaseModel + +__all__ = ["SnapshotUpdateResponse"] + + +class SnapshotUpdateResponse(BaseModel): + file_id: Optional[int] = None + """Feed id""" + + filename: Optional[str] = None + """Name of the file unified in our system""" + + status: Optional[str] = None + """Current status of upload, should be unified""" diff --git a/src/cloudflare/types/intel/whois_get_response.py b/src/cloudflare/types/intel/whois_get_response.py new file mode 100644 index 00000000000..4856a756a9c --- /dev/null +++ b/src/cloudflare/types/intel/whois_get_response.py @@ -0,0 +1,184 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["WhoisGetResponse"] + + +class WhoisGetResponse(BaseModel): + domain: str + + extension: str + + found: bool + + nameservers: List[str] + + punycode: str + + registrant: str + + registrar: str + + id: Optional[str] = None + + administrative_city: Optional[str] = None + + administrative_country: Optional[str] = None + + administrative_email: Optional[str] = None + + administrative_fax: Optional[str] = None + + administrative_fax_ext: Optional[str] = None + + administrative_id: Optional[str] = None + + administrative_name: Optional[str] = None + + administrative_org: Optional[str] = None + + administrative_phone: Optional[str] = None + + administrative_phone_ext: Optional[str] = None + + administrative_postal_code: Optional[str] = None + + administrative_province: Optional[str] = None + + administrative_referral_url: Optional[str] = None + + administrative_street: Optional[str] = None + + billing_city: Optional[str] = None + + billing_country: Optional[str] = None + + billing_email: Optional[str] = None + + billing_fax: Optional[str] = None + + billing_fax_ext: Optional[str] = None + + billing_id: Optional[str] = None + + billing_name: Optional[str] = None + + billing_org: Optional[str] = None + + billing_phone: Optional[str] = None + + billing_phone_ext: Optional[str] = None + + billing_postal_code: Optional[str] = None + + billing_province: Optional[str] = None + + billing_referral_url: Optional[str] = None + + billing_street: Optional[str] = None + + created_date: Optional[datetime] = None + + created_date_raw: Optional[str] = None + + dnssec: Optional[bool] = None + + expiration_date: Optional[datetime] = None + + expiration_date_raw: Optional[str] = None + + registrant_city: Optional[str] = None + + registrant_country: Optional[str] = None + + registrant_email: Optional[str] = None + + registrant_fax: Optional[str] = None + + registrant_fax_ext: Optional[str] = None + + registrant_id: Optional[str] = None + + registrant_name: Optional[str] = None + + registrant_org: Optional[str] = None + + registrant_phone: Optional[str] = None + + registrant_phone_ext: Optional[str] = None + + registrant_postal_code: Optional[str] = None + + registrant_province: Optional[str] = None + + registrant_referral_url: Optional[str] = None + + registrant_street: Optional[str] = None + + registrar_city: Optional[str] = None + + registrar_country: Optional[str] = None + + registrar_email: Optional[str] = None + + registrar_fax: Optional[str] = None + + registrar_fax_ext: Optional[str] = None + + registrar_id: Optional[str] = None + + registrar_name: Optional[str] = None + + registrar_org: Optional[str] = None + + registrar_phone: Optional[str] = None + + registrar_phone_ext: Optional[str] = None + + registrar_postal_code: Optional[str] = None + + registrar_province: Optional[str] = None + + registrar_referral_url: Optional[str] = None + + registrar_street: Optional[str] = None + + status: Optional[List[str]] = None + + technical_city: Optional[str] = None + + technical_country: Optional[str] = None + + technical_email: Optional[str] = None + + technical_fax: Optional[str] = None + + technical_fax_ext: Optional[str] = None + + technical_id: Optional[str] = None + + technical_name: Optional[str] = None + + technical_org: Optional[str] = None + + technical_phone: Optional[str] = None + + technical_phone_ext: Optional[str] = None + + technical_postal_code: Optional[str] = None + + technical_province: Optional[str] = None + + technical_referral_url: Optional[str] = None + + technical_street: Optional[str] = None + + updated_date: Optional[datetime] = None + + updated_date_raw: Optional[str] = None + + whois_server: Optional[str] = None diff --git a/src/cloudflare/types/keyless_certificates/__init__.py b/src/cloudflare/types/keyless_certificates/__init__.py index 426c1485f9b..5588d3655d0 100644 --- a/src/cloudflare/types/keyless_certificates/__init__.py +++ b/src/cloudflare/types/keyless_certificates/__init__.py @@ -7,5 +7,4 @@ from .keyless_certificate import KeylessCertificate as KeylessCertificate from .keyless_certificate_edit_params import KeylessCertificateEditParams as KeylessCertificateEditParams from .keyless_certificate_create_params import KeylessCertificateCreateParams as KeylessCertificateCreateParams -from .keyless_certificate_delete_params import KeylessCertificateDeleteParams as KeylessCertificateDeleteParams from .keyless_certificate_delete_response import KeylessCertificateDeleteResponse as KeylessCertificateDeleteResponse diff --git a/src/cloudflare/types/keyless_certificates/keyless_certificate_delete_params.py b/src/cloudflare/types/keyless_certificates/keyless_certificate_delete_params.py deleted file mode 100644 index 0c01222a189..00000000000 --- a/src/cloudflare/types/keyless_certificates/keyless_certificate_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["KeylessCertificateDeleteParams"] - - -class KeylessCertificateDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/keyless_certificates/tunnel.py b/src/cloudflare/types/keyless_certificates/tunnel.py index 825ea03f94e..9a8b2936da6 100644 --- a/src/cloudflare/types/keyless_certificates/tunnel.py +++ b/src/cloudflare/types/keyless_certificates/tunnel.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["Tunnel"] diff --git a/src/cloudflare/types/kv/__init__.py b/src/cloudflare/types/kv/__init__.py index 266c496fe4f..e345eaf540a 100644 --- a/src/cloudflare/types/kv/__init__.py +++ b/src/cloudflare/types/kv/__init__.py @@ -5,7 +5,6 @@ from .namespace import Namespace as Namespace from .namespace_list_params import NamespaceListParams as NamespaceListParams from .namespace_create_params import NamespaceCreateParams as NamespaceCreateParams -from .namespace_delete_params import NamespaceDeleteParams as NamespaceDeleteParams from .namespace_update_params import NamespaceUpdateParams as NamespaceUpdateParams from .namespace_delete_response import NamespaceDeleteResponse as NamespaceDeleteResponse from .namespace_update_response import NamespaceUpdateResponse as NamespaceUpdateResponse diff --git a/src/cloudflare/types/kv/namespace_delete_params.py b/src/cloudflare/types/kv/namespace_delete_params.py deleted file mode 100644 index 6746fa4e15b..00000000000 --- a/src/cloudflare/types/kv/namespace_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["NamespaceDeleteParams"] - - -class NamespaceDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/kv/namespaces/__init__.py b/src/cloudflare/types/kv/namespaces/__init__.py index 4d7671ae206..e7c21904155 100644 --- a/src/cloudflare/types/kv/namespaces/__init__.py +++ b/src/cloudflare/types/kv/namespaces/__init__.py @@ -4,10 +4,8 @@ from .key import Key as Key from .key_list_params import KeyListParams as KeyListParams -from .bulk_delete_params import BulkDeleteParams as BulkDeleteParams from .bulk_update_params import BulkUpdateParams as BulkUpdateParams from .value_get_response import ValueGetResponse as ValueGetResponse -from .value_delete_params import ValueDeleteParams as ValueDeleteParams from .value_update_params import ValueUpdateParams as ValueUpdateParams from .bulk_delete_response import BulkDeleteResponse as BulkDeleteResponse from .bulk_update_response import BulkUpdateResponse as BulkUpdateResponse diff --git a/src/cloudflare/types/kv/namespaces/bulk_delete_params.py b/src/cloudflare/types/kv/namespaces/bulk_delete_params.py deleted file mode 100644 index b2a56aa7692..00000000000 --- a/src/cloudflare/types/kv/namespaces/bulk_delete_params.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List -from typing_extensions import Required, TypedDict - -__all__ = ["BulkDeleteParams"] - - -class BulkDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[List[str]] diff --git a/src/cloudflare/types/kv/namespaces/value_delete_params.py b/src/cloudflare/types/kv/namespaces/value_delete_params.py deleted file mode 100644 index fa7adc789f1..00000000000 --- a/src/cloudflare/types/kv/namespaces/value_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ValueDeleteParams"] - - -class ValueDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - namespace_id: Required[str] - """Namespace identifier tag.""" - - body: Required[object] diff --git a/src/cloudflare/types/load_balancers/__init__.py b/src/cloudflare/types/load_balancers/__init__.py index 22ae0e993e9..46d78e92ec5 100644 --- a/src/cloudflare/types/load_balancers/__init__.py +++ b/src/cloudflare/types/load_balancers/__init__.py @@ -18,13 +18,14 @@ from .filter_options import FilterOptions as FilterOptions from .origin_steering import OriginSteering as OriginSteering from .random_steering import RandomSteering as RandomSteering +from .steering_policy import SteeringPolicy as SteeringPolicy from .adaptive_routing import AdaptiveRouting as AdaptiveRouting from .pool_edit_params import PoolEditParams as PoolEditParams from .pool_list_params import PoolListParams as PoolListParams +from .session_affinity import SessionAffinity as SessionAffinity from .location_strategy import LocationStrategy as LocationStrategy from .search_get_params import SearchGetParams as SearchGetParams from .pool_create_params import PoolCreateParams as PoolCreateParams -from .pool_delete_params import PoolDeleteParams as PoolDeleteParams from .pool_update_params import PoolUpdateParams as PoolUpdateParams from .region_list_params import RegionListParams as RegionListParams from .load_shedding_param import LoadSheddingParam as LoadSheddingParam @@ -37,7 +38,6 @@ from .preview_get_response import PreviewGetResponse as PreviewGetResponse from .region_list_response import RegionListResponse as RegionListResponse from .monitor_create_params import MonitorCreateParams as MonitorCreateParams -from .monitor_delete_params import MonitorDeleteParams as MonitorDeleteParams from .monitor_update_params import MonitorUpdateParams as MonitorUpdateParams from .origin_steering_param import OriginSteeringParam as OriginSteeringParam from .random_steering_param import RandomSteeringParam as RandomSteeringParam @@ -47,7 +47,6 @@ from .load_balancer_edit_params import LoadBalancerEditParams as LoadBalancerEditParams from .notification_filter_param import NotificationFilterParam as NotificationFilterParam from .load_balancer_create_params import LoadBalancerCreateParams as LoadBalancerCreateParams -from .load_balancer_delete_params import LoadBalancerDeleteParams as LoadBalancerDeleteParams from .load_balancer_update_params import LoadBalancerUpdateParams as LoadBalancerUpdateParams from .session_affinity_attributes import SessionAffinityAttributes as SessionAffinityAttributes from .load_balancer_delete_response import LoadBalancerDeleteResponse as LoadBalancerDeleteResponse diff --git a/src/cloudflare/types/load_balancers/load_balancer.py b/src/cloudflare/types/load_balancers/load_balancer.py index 242171cacb2..11e17929346 100644 --- a/src/cloudflare/types/load_balancers/load_balancer.py +++ b/src/cloudflare/types/load_balancers/load_balancer.py @@ -2,13 +2,14 @@ from typing import List, Optional from datetime import datetime -from typing_extensions import Literal from .rules import Rules from ..._models import BaseModel from .default_pools import DefaultPools from .random_steering import RandomSteering +from .steering_policy import SteeringPolicy from .adaptive_routing import AdaptiveRouting +from .session_affinity import SessionAffinity from .location_strategy import LocationStrategy from .session_affinity_attributes import SessionAffinityAttributes @@ -104,7 +105,7 @@ class LoadBalancer(BaseModel): execute. """ - session_affinity: Optional[Literal["none", "cookie", "ip_cookie", "header", '""']] = None + session_affinity: Optional[SessionAffinity] = None """ Specifies the type of session affinity the load balancer should use unless specified as `"none"` or "" (default). The supported types are: @@ -148,18 +149,7 @@ class LoadBalancer(BaseModel): number of seconds specified. """ - steering_policy: Optional[ - Literal[ - "off", - "geo", - "random", - "dynamic_latency", - "proximity", - "least_outstanding_requests", - "least_connections", - '""', - ] - ] = None + steering_policy: Optional[SteeringPolicy] = None """Steering Policy for this load balancer. - `"off"`: Use `default_pools`. diff --git a/src/cloudflare/types/load_balancers/load_balancer_create_params.py b/src/cloudflare/types/load_balancers/load_balancer_create_params.py index 173adfbeb31..74a4d9d4742 100644 --- a/src/cloudflare/types/load_balancers/load_balancer_create_params.py +++ b/src/cloudflare/types/load_balancers/load_balancer_create_params.py @@ -3,10 +3,12 @@ from __future__ import annotations from typing import List, Iterable -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict from .rules_param import RulesParam from .default_pools import DefaultPools +from .steering_policy import SteeringPolicy +from .session_affinity import SessionAffinity from .random_steering_param import RandomSteeringParam from .adaptive_routing_param import AdaptiveRoutingParam from .location_strategy_param import LocationStrategyParam @@ -97,7 +99,7 @@ class LoadBalancerCreateParams(TypedDict, total=False): execute. """ - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] + session_affinity: SessionAffinity """ Specifies the type of session affinity the load balancer should use unless specified as `"none"` or "" (default). The supported types are: @@ -141,9 +143,7 @@ class LoadBalancerCreateParams(TypedDict, total=False): number of seconds specified. """ - steering_policy: Literal[ - "off", "geo", "random", "dynamic_latency", "proximity", "least_outstanding_requests", "least_connections", '""' - ] + steering_policy: SteeringPolicy """Steering Policy for this load balancer. - `"off"`: Use `default_pools`. diff --git a/src/cloudflare/types/load_balancers/load_balancer_delete_params.py b/src/cloudflare/types/load_balancers/load_balancer_delete_params.py deleted file mode 100644 index 0a984d696bb..00000000000 --- a/src/cloudflare/types/load_balancers/load_balancer_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["LoadBalancerDeleteParams"] - - -class LoadBalancerDeleteParams(TypedDict, total=False): - zone_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/load_balancers/load_balancer_edit_params.py b/src/cloudflare/types/load_balancers/load_balancer_edit_params.py index 5848c3bf5ea..54a9a2ab9c6 100644 --- a/src/cloudflare/types/load_balancers/load_balancer_edit_params.py +++ b/src/cloudflare/types/load_balancers/load_balancer_edit_params.py @@ -3,10 +3,12 @@ from __future__ import annotations from typing import List, Iterable -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict from .rules_param import RulesParam from .default_pools import DefaultPools +from .steering_policy import SteeringPolicy +from .session_affinity import SessionAffinity from .random_steering_param import RandomSteeringParam from .adaptive_routing_param import AdaptiveRoutingParam from .location_strategy_param import LocationStrategyParam @@ -100,7 +102,7 @@ class LoadBalancerEditParams(TypedDict, total=False): execute. """ - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] + session_affinity: SessionAffinity """ Specifies the type of session affinity the load balancer should use unless specified as `"none"` or "" (default). The supported types are: @@ -144,9 +146,7 @@ class LoadBalancerEditParams(TypedDict, total=False): number of seconds specified. """ - steering_policy: Literal[ - "off", "geo", "random", "dynamic_latency", "proximity", "least_outstanding_requests", "least_connections", '""' - ] + steering_policy: SteeringPolicy """Steering Policy for this load balancer. - `"off"`: Use `default_pools`. diff --git a/src/cloudflare/types/load_balancers/load_balancer_update_params.py b/src/cloudflare/types/load_balancers/load_balancer_update_params.py index 1c8db91d1c4..4055e4c5438 100644 --- a/src/cloudflare/types/load_balancers/load_balancer_update_params.py +++ b/src/cloudflare/types/load_balancers/load_balancer_update_params.py @@ -3,10 +3,12 @@ from __future__ import annotations from typing import List, Iterable -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict from .rules_param import RulesParam from .default_pools import DefaultPools +from .steering_policy import SteeringPolicy +from .session_affinity import SessionAffinity from .random_steering_param import RandomSteeringParam from .adaptive_routing_param import AdaptiveRoutingParam from .location_strategy_param import LocationStrategyParam @@ -100,7 +102,7 @@ class LoadBalancerUpdateParams(TypedDict, total=False): execute. """ - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] + session_affinity: SessionAffinity """ Specifies the type of session affinity the load balancer should use unless specified as `"none"` or "" (default). The supported types are: @@ -144,9 +146,7 @@ class LoadBalancerUpdateParams(TypedDict, total=False): number of seconds specified. """ - steering_policy: Literal[ - "off", "geo", "random", "dynamic_latency", "proximity", "least_outstanding_requests", "least_connections", '""' - ] + steering_policy: SteeringPolicy """Steering Policy for this load balancer. - `"off"`: Use `default_pools`. diff --git a/src/cloudflare/types/load_balancers/monitor_delete_params.py b/src/cloudflare/types/load_balancers/monitor_delete_params.py deleted file mode 100644 index 3b797bbce86..00000000000 --- a/src/cloudflare/types/load_balancers/monitor_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["MonitorDeleteParams"] - - -class MonitorDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/load_balancers/pool_delete_params.py b/src/cloudflare/types/load_balancers/pool_delete_params.py deleted file mode 100644 index 72fd555490c..00000000000 --- a/src/cloudflare/types/load_balancers/pool_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["PoolDeleteParams"] - - -class PoolDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/load_balancers/rules.py b/src/cloudflare/types/load_balancers/rules.py index 3c0887f61c9..41e166c9635 100644 --- a/src/cloudflare/types/load_balancers/rules.py +++ b/src/cloudflare/types/load_balancers/rules.py @@ -1,12 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional -from typing_extensions import Literal from ..._models import BaseModel from .default_pools import DefaultPools from .random_steering import RandomSteering +from .steering_policy import SteeringPolicy from .adaptive_routing import AdaptiveRouting +from .session_affinity import SessionAffinity from .location_strategy import LocationStrategy from .session_affinity_attributes import SessionAffinityAttributes @@ -88,7 +89,7 @@ class Overrides(BaseModel): back to using default_pools. """ - session_affinity: Optional[Literal["none", "cookie", "ip_cookie", "header", '""']] = None + session_affinity: Optional[SessionAffinity] = None """ Specifies the type of session affinity the load balancer should use unless specified as `"none"` or "" (default). The supported types are: @@ -132,18 +133,7 @@ class Overrides(BaseModel): number of seconds specified. """ - steering_policy: Optional[ - Literal[ - "off", - "geo", - "random", - "dynamic_latency", - "proximity", - "least_outstanding_requests", - "least_connections", - '""', - ] - ] = None + steering_policy: Optional[SteeringPolicy] = None """Steering Policy for this load balancer. - `"off"`: Use `default_pools`. diff --git a/src/cloudflare/types/load_balancers/rules_param.py b/src/cloudflare/types/load_balancers/rules_param.py index f74b2e39bcc..4ff218a8a84 100644 --- a/src/cloudflare/types/load_balancers/rules_param.py +++ b/src/cloudflare/types/load_balancers/rules_param.py @@ -3,9 +3,11 @@ from __future__ import annotations from typing import List -from typing_extensions import Literal, TypedDict +from typing_extensions import TypedDict from .default_pools import DefaultPools +from .steering_policy import SteeringPolicy +from .session_affinity import SessionAffinity from .random_steering_param import RandomSteeringParam from .adaptive_routing_param import AdaptiveRoutingParam from .location_strategy_param import LocationStrategyParam @@ -89,7 +91,7 @@ class Overrides(TypedDict, total=False): back to using default_pools. """ - session_affinity: Literal["none", "cookie", "ip_cookie", "header", '""'] + session_affinity: SessionAffinity """ Specifies the type of session affinity the load balancer should use unless specified as `"none"` or "" (default). The supported types are: @@ -133,9 +135,7 @@ class Overrides(TypedDict, total=False): number of seconds specified. """ - steering_policy: Literal[ - "off", "geo", "random", "dynamic_latency", "proximity", "least_outstanding_requests", "least_connections", '""' - ] + steering_policy: SteeringPolicy """Steering Policy for this load balancer. - `"off"`: Use `default_pools`. diff --git a/src/cloudflare/types/load_balancers/session_affinity.py b/src/cloudflare/types/load_balancers/session_affinity.py new file mode 100644 index 00000000000..43b79ef9037 --- /dev/null +++ b/src/cloudflare/types/load_balancers/session_affinity.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["SessionAffinity"] + +SessionAffinity = Literal["none", "cookie", "ip_cookie", "header", '""'] diff --git a/src/cloudflare/types/load_balancers/steering_policy.py b/src/cloudflare/types/load_balancers/steering_policy.py new file mode 100644 index 00000000000..eb7637c2237 --- /dev/null +++ b/src/cloudflare/types/load_balancers/steering_policy.py @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["SteeringPolicy"] + +SteeringPolicy = Literal[ + "off", "geo", "random", "dynamic_latency", "proximity", "least_outstanding_requests", "least_connections", '""' +] diff --git a/src/cloudflare/types/logpush/__init__.py b/src/cloudflare/types/logpush/__init__.py index e3eaa13d9d2..b7f78156bfc 100644 --- a/src/cloudflare/types/logpush/__init__.py +++ b/src/cloudflare/types/logpush/__init__.py @@ -6,7 +6,6 @@ from .output_options import OutputOptions as OutputOptions from .edge_get_response import EdgeGetResponse as EdgeGetResponse from .job_create_params import JobCreateParams as JobCreateParams -from .job_delete_params import JobDeleteParams as JobDeleteParams from .job_update_params import JobUpdateParams as JobUpdateParams from .edge_create_params import EdgeCreateParams as EdgeCreateParams from .instant_logpush_job import InstantLogpushJob as InstantLogpushJob diff --git a/src/cloudflare/types/logpush/job_create_params.py b/src/cloudflare/types/logpush/job_create_params.py index 39f9ecca17d..a1887398142 100644 --- a/src/cloudflare/types/logpush/job_create_params.py +++ b/src/cloudflare/types/logpush/job_create_params.py @@ -25,16 +25,29 @@ class JobCreateParams(TypedDict, total=False): """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" dataset: Optional[str] - """Name of the dataset.""" + """Name of the dataset. + + A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). + """ enabled: bool """Flag that indicates if the job is enabled.""" frequency: Optional[Literal["high", "low"]] - """The frequency at which Cloudflare sends batches of logs to your destination. + """This field is deprecated. + + Please use `max_upload_*` parameters instead. The frequency at which Cloudflare + sends batches of logs to your destination. Setting frequency to high sends your + logs in larger quantities of smaller files. Setting frequency to low sends logs + in smaller quantities of larger files. + """ - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + kind: Optional[Literal["edge"]] + """ + The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. """ logpull_options: Optional[str] @@ -46,6 +59,33 @@ class JobCreateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ + max_upload_bytes: Optional[int] + """The maximum uncompressed file size of a batch of logs. + + This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note + that you cannot set a minimum file size; this means that log files may be much + smaller than this batch size. This parameter is not available for jobs with + `edge` as its kind. + """ + + max_upload_interval_seconds: Optional[int] + """The maximum interval in seconds for log batches. + + This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable + it. Note that you cannot specify a minimum interval for log batches; this means + that log files may be sent in shorter intervals than this. This parameter is + only used for jobs with `edge` as its kind. + """ + + max_upload_records: Optional[int] + """The maximum number of log lines per batch. + + This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. + Note that you cannot specify a minimum number of log lines per batch; this means + that log files may contain many fewer lines than this. This parameter is not + available for jobs with `edge` as its kind. + """ + name: Optional[str] """Optional human readable job name. diff --git a/src/cloudflare/types/logpush/job_delete_params.py b/src/cloudflare/types/logpush/job_delete_params.py deleted file mode 100644 index d6acbb0d4cf..00000000000 --- a/src/cloudflare/types/logpush/job_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["JobDeleteParams"] - - -class JobDeleteParams(TypedDict, total=False): - body: Required[object] - - account_id: str - """The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.""" - - zone_id: str - """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" diff --git a/src/cloudflare/types/logpush/job_update_params.py b/src/cloudflare/types/logpush/job_update_params.py index 4246f9d3521..857882c86bf 100644 --- a/src/cloudflare/types/logpush/job_update_params.py +++ b/src/cloudflare/types/logpush/job_update_params.py @@ -28,10 +28,19 @@ class JobUpdateParams(TypedDict, total=False): """Flag that indicates if the job is enabled.""" frequency: Optional[Literal["high", "low"]] - """The frequency at which Cloudflare sends batches of logs to your destination. + """This field is deprecated. + + Please use `max_upload_*` parameters instead. The frequency at which Cloudflare + sends batches of logs to your destination. Setting frequency to high sends your + logs in larger quantities of smaller files. Setting frequency to low sends logs + in smaller quantities of larger files. + """ - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + kind: Optional[Literal["edge"]] + """ + The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. """ logpull_options: Optional[str] @@ -43,6 +52,33 @@ class JobUpdateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ + max_upload_bytes: Optional[int] + """The maximum uncompressed file size of a batch of logs. + + This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note + that you cannot set a minimum file size; this means that log files may be much + smaller than this batch size. This parameter is not available for jobs with + `edge` as its kind. + """ + + max_upload_interval_seconds: Optional[int] + """The maximum interval in seconds for log batches. + + This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable + it. Note that you cannot specify a minimum interval for log batches; this means + that log files may be sent in shorter intervals than this. This parameter is + only used for jobs with `edge` as its kind. + """ + + max_upload_records: Optional[int] + """The maximum number of log lines per batch. + + This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. + Note that you cannot specify a minimum number of log lines per batch; this means + that log files may contain many fewer lines than this. This parameter is not + available for jobs with `edge` as its kind. + """ + output_options: Optional[OutputOptionsParam] """The structured replacement for `logpull_options`. diff --git a/src/cloudflare/types/logpush/logpush_job.py b/src/cloudflare/types/logpush/logpush_job.py index 0abab1cd0b8..adfb6bb1587 100644 --- a/src/cloudflare/types/logpush/logpush_job.py +++ b/src/cloudflare/types/logpush/logpush_job.py @@ -15,7 +15,11 @@ class LogpushJob(BaseModel): """Unique id of the job.""" dataset: Optional[str] = None - """Name of the dataset.""" + """Name of the dataset. + + A list of supported datasets can be found on the + [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). + """ destination_conf: Optional[str] = None """Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. @@ -36,10 +40,19 @@ class LogpushJob(BaseModel): """ frequency: Optional[Literal["high", "low"]] = None - """The frequency at which Cloudflare sends batches of logs to your destination. + """This field is deprecated. + + Please use `max_upload_*` parameters instead. The frequency at which Cloudflare + sends batches of logs to your destination. Setting frequency to high sends your + logs in larger quantities of smaller files. Setting frequency to low sends logs + in smaller quantities of larger files. + """ - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. + kind: Optional[Literal["edge"]] = None + """ + The kind parameter (optional) is used to differentiate between Logpush and Edge + Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + `http_requests` dataset. """ last_complete: Optional[datetime] = None @@ -68,6 +81,33 @@ class LogpushJob(BaseModel): keep on making this call for you, setting start and end times appropriately. """ + max_upload_bytes: Optional[int] = None + """The maximum uncompressed file size of a batch of logs. + + This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note + that you cannot set a minimum file size; this means that log files may be much + smaller than this batch size. This parameter is not available for jobs with + `edge` as its kind. + """ + + max_upload_interval_seconds: Optional[int] = None + """The maximum interval in seconds for log batches. + + This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable + it. Note that you cannot specify a minimum interval for log batches; this means + that log files may be sent in shorter intervals than this. This parameter is + only used for jobs with `edge` as its kind. + """ + + max_upload_records: Optional[int] = None + """The maximum number of log lines per batch. + + This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. + Note that you cannot specify a minimum number of log lines per batch; this means + that log files may contain many fewer lines than this. This parameter is not + available for jobs with `edge` as its kind. + """ + name: Optional[str] = None """Optional human readable job name. diff --git a/src/cloudflare/types/logs/control/cmb/__init__.py b/src/cloudflare/types/logs/control/cmb/__init__.py index d96a935ea5d..ac85408465a 100644 --- a/src/cloudflare/types/logs/control/cmb/__init__.py +++ b/src/cloudflare/types/logs/control/cmb/__init__.py @@ -4,4 +4,3 @@ from .cmb_config import CmbConfig as CmbConfig from .config_create_params import ConfigCreateParams as ConfigCreateParams -from .config_delete_params import ConfigDeleteParams as ConfigDeleteParams diff --git a/src/cloudflare/types/logs/control/cmb/config_delete_params.py b/src/cloudflare/types/logs/control/cmb/config_delete_params.py deleted file mode 100644 index 18c5f56fe91..00000000000 --- a/src/cloudflare/types/logs/control/cmb/config_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ConfigDeleteParams"] - - -class ConfigDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/magic_network_monitoring/__init__.py b/src/cloudflare/types/magic_network_monitoring/__init__.py index 91b7d5f38cc..68ec6897c01 100644 --- a/src/cloudflare/types/magic_network_monitoring/__init__.py +++ b/src/cloudflare/types/magic_network_monitoring/__init__.py @@ -6,10 +6,7 @@ from .rule_edit_params import RuleEditParams as RuleEditParams from .config_edit_params import ConfigEditParams as ConfigEditParams from .rule_create_params import RuleCreateParams as RuleCreateParams -from .rule_delete_params import RuleDeleteParams as RuleDeleteParams from .rule_update_params import RuleUpdateParams as RuleUpdateParams -from .configuration_param import ConfigurationParam as ConfigurationParam from .config_create_params import ConfigCreateParams as ConfigCreateParams -from .config_delete_params import ConfigDeleteParams as ConfigDeleteParams from .config_update_params import ConfigUpdateParams as ConfigUpdateParams from .magic_network_monitoring_rule import MagicNetworkMonitoringRule as MagicNetworkMonitoringRule diff --git a/src/cloudflare/types/magic_network_monitoring/config_delete_params.py b/src/cloudflare/types/magic_network_monitoring/config_delete_params.py deleted file mode 100644 index 10abc8efd59..00000000000 --- a/src/cloudflare/types/magic_network_monitoring/config_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ConfigDeleteParams"] - - -class ConfigDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/magic_network_monitoring/configuration_param.py b/src/cloudflare/types/magic_network_monitoring/configuration_param.py deleted file mode 100644 index d44a0fc3d86..00000000000 --- a/src/cloudflare/types/magic_network_monitoring/configuration_param.py +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List -from typing_extensions import Required, TypedDict - -__all__ = ["ConfigurationParam"] - - -class ConfigurationParam(TypedDict, total=False): - default_sampling: Required[float] - """Fallback sampling rate of flow messages being sent in packets per second. - - This should match the packet sampling rate configured on the router. - """ - - name: Required[str] - """The account name.""" - - router_ips: Required[List[str]] diff --git a/src/cloudflare/types/magic_network_monitoring/rule_delete_params.py b/src/cloudflare/types/magic_network_monitoring/rule_delete_params.py deleted file mode 100644 index f729aaf685c..00000000000 --- a/src/cloudflare/types/magic_network_monitoring/rule_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["RuleDeleteParams"] - - -class RuleDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/magic_transit/__init__.py b/src/cloudflare/types/magic_transit/__init__.py index ab997685622..98e253df212 100644 --- a/src/cloudflare/types/magic_transit/__init__.py +++ b/src/cloudflare/types/magic_transit/__init__.py @@ -4,25 +4,18 @@ from .site import Site as Site from .scope import Scope as Scope -from .colo_name import ColoName as ColoName -from .colo_region import ColoRegion as ColoRegion from .scope_param import ScopeParam as ScopeParam from .health_check import HealthCheck as HealthCheck from .psk_metadata import PSKMetadata as PSKMetadata from .site_location import SiteLocation as SiteLocation -from .colo_name_param import ColoNameParam as ColoNameParam from .site_list_params import SiteListParams as SiteListParams -from .colo_region_param import ColoRegionParam as ColoRegionParam from .health_check_rate import HealthCheckRate as HealthCheckRate from .health_check_type import HealthCheckType as HealthCheckType from .health_check_param import HealthCheckParam as HealthCheckParam -from .route_empty_params import RouteEmptyParams as RouteEmptyParams from .route_get_response import RouteGetResponse as RouteGetResponse from .site_create_params import SiteCreateParams as SiteCreateParams -from .site_delete_params import SiteDeleteParams as SiteDeleteParams from .site_update_params import SiteUpdateParams as SiteUpdateParams from .route_create_params import RouteCreateParams as RouteCreateParams -from .route_delete_params import RouteDeleteParams as RouteDeleteParams from .route_list_response import RouteListResponse as RouteListResponse from .route_update_params import RouteUpdateParams as RouteUpdateParams from .site_location_param import SiteLocationParam as SiteLocationParam @@ -32,7 +25,6 @@ from .route_update_response import RouteUpdateResponse as RouteUpdateResponse from .gre_tunnel_get_response import GRETunnelGetResponse as GRETunnelGetResponse from .gre_tunnel_create_params import GRETunnelCreateParams as GRETunnelCreateParams -from .gre_tunnel_delete_params import GRETunnelDeleteParams as GRETunnelDeleteParams from .gre_tunnel_list_response import GRETunnelListResponse as GRETunnelListResponse from .gre_tunnel_update_params import GRETunnelUpdateParams as GRETunnelUpdateParams from .ipsec_tunnel_get_response import IPSECTunnelGetResponse as IPSECTunnelGetResponse @@ -40,7 +32,6 @@ from .gre_tunnel_delete_response import GRETunnelDeleteResponse as GRETunnelDeleteResponse from .gre_tunnel_update_response import GRETunnelUpdateResponse as GRETunnelUpdateResponse from .ipsec_tunnel_create_params import IPSECTunnelCreateParams as IPSECTunnelCreateParams -from .ipsec_tunnel_delete_params import IPSECTunnelDeleteParams as IPSECTunnelDeleteParams from .ipsec_tunnel_list_response import IPSECTunnelListResponse as IPSECTunnelListResponse from .ipsec_tunnel_update_params import IPSECTunnelUpdateParams as IPSECTunnelUpdateParams from .cf_interconnect_get_response import CfInterconnectGetResponse as CfInterconnectGetResponse diff --git a/src/cloudflare/types/magic_transit/colo_name.py b/src/cloudflare/types/magic_transit/colo_name.py deleted file mode 100644 index 00c58aa3340..00000000000 --- a/src/cloudflare/types/magic_transit/colo_name.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -__all__ = ["ColoName"] - -ColoName = List[str] diff --git a/src/cloudflare/types/magic_transit/colo_name_param.py b/src/cloudflare/types/magic_transit/colo_name_param.py deleted file mode 100644 index bb4fd54d9bb..00000000000 --- a/src/cloudflare/types/magic_transit/colo_name_param.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List - -__all__ = ["ColoNameParamItem"] - -ColoNameParamItem = str - -ColoNameParam = List[str] diff --git a/src/cloudflare/types/magic_transit/colo_region.py b/src/cloudflare/types/magic_transit/colo_region.py deleted file mode 100644 index 579dfbf7884..00000000000 --- a/src/cloudflare/types/magic_transit/colo_region.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -__all__ = ["ColoRegion"] - -ColoRegion = List[str] diff --git a/src/cloudflare/types/magic_transit/colo_region_param.py b/src/cloudflare/types/magic_transit/colo_region_param.py deleted file mode 100644 index f5ea451dcbd..00000000000 --- a/src/cloudflare/types/magic_transit/colo_region_param.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List - -__all__ = ["ColoRegionParamItem"] - -ColoRegionParamItem = str - -ColoRegionParam = List[str] diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_delete_params.py b/src/cloudflare/types/magic_transit/gre_tunnel_delete_params.py deleted file mode 100644 index c19713f18e3..00000000000 --- a/src/cloudflare/types/magic_transit/gre_tunnel_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["GRETunnelDeleteParams"] - - -class GRETunnelDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_params.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_params.py deleted file mode 100644 index 4cf64bced31..00000000000 --- a/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["IPSECTunnelDeleteParams"] - - -class IPSECTunnelDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/magic_transit/route_delete_params.py b/src/cloudflare/types/magic_transit/route_delete_params.py deleted file mode 100644 index ae1f7e998a5..00000000000 --- a/src/cloudflare/types/magic_transit/route_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["RouteDeleteParams"] - - -class RouteDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/magic_transit/route_empty_params.py b/src/cloudflare/types/magic_transit/route_empty_params.py deleted file mode 100644 index 19aee9d0a1a..00000000000 --- a/src/cloudflare/types/magic_transit/route_empty_params.py +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Iterable -from typing_extensions import Required, TypedDict - -__all__ = ["RouteEmptyParams", "Route"] - - -class RouteEmptyParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - routes: Required[Iterable[Route]] - - -class Route(TypedDict, total=False): - pass diff --git a/src/cloudflare/types/magic_transit/scope.py b/src/cloudflare/types/magic_transit/scope.py index a5077ec70e5..a01bc5eb301 100644 --- a/src/cloudflare/types/magic_transit/scope.py +++ b/src/cloudflare/types/magic_transit/scope.py @@ -1,17 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import List, Optional from ..._models import BaseModel -from .colo_name import ColoName -from .colo_region import ColoRegion __all__ = ["Scope"] class Scope(BaseModel): - colo_names: Optional[ColoName] = None + colo_names: Optional[List[str]] = None """List of colo names for the ECMP scope.""" - colo_regions: Optional[ColoRegion] = None + colo_regions: Optional[List[str]] = None """List of colo regions for the ECMP scope.""" diff --git a/src/cloudflare/types/magic_transit/scope_param.py b/src/cloudflare/types/magic_transit/scope_param.py index f65fb559de4..95df559e364 100644 --- a/src/cloudflare/types/magic_transit/scope_param.py +++ b/src/cloudflare/types/magic_transit/scope_param.py @@ -2,17 +2,15 @@ from __future__ import annotations +from typing import List from typing_extensions import TypedDict -from .colo_name_param import ColoNameParam -from .colo_region_param import ColoRegionParam - __all__ = ["ScopeParam"] class ScopeParam(TypedDict, total=False): - colo_names: ColoNameParam + colo_names: List[str] """List of colo names for the ECMP scope.""" - colo_regions: ColoRegionParam + colo_regions: List[str] """List of colo regions for the ECMP scope.""" diff --git a/src/cloudflare/types/magic_transit/site_delete_params.py b/src/cloudflare/types/magic_transit/site_delete_params.py deleted file mode 100644 index fdd180f40b4..00000000000 --- a/src/cloudflare/types/magic_transit/site_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["SiteDeleteParams"] - - -class SiteDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/magic_transit/sites/__init__.py b/src/cloudflare/types/magic_transit/sites/__init__.py index 1b2ed37966f..5f61827b3cb 100644 --- a/src/cloudflare/types/magic_transit/sites/__init__.py +++ b/src/cloudflare/types/magic_transit/sites/__init__.py @@ -16,14 +16,11 @@ from .dhcp_relay_param import DHCPRelayParam as DHCPRelayParam from .acl_configuration import ACLConfiguration as ACLConfiguration from .acl_create_params import ACLCreateParams as ACLCreateParams -from .acl_delete_params import ACLDeleteParams as ACLDeleteParams from .acl_update_params import ACLUpdateParams as ACLUpdateParams from .dhcp_server_param import DHCPServerParam as DHCPServerParam from .lan_create_params import LANCreateParams as LANCreateParams -from .lan_delete_params import LANDeleteParams as LANDeleteParams from .lan_update_params import LANUpdateParams as LANUpdateParams from .wan_create_params import WANCreateParams as WANCreateParams -from .wan_delete_params import WANDeleteParams as WANDeleteParams from .wan_update_params import WANUpdateParams as WANUpdateParams from .lan_create_response import LANCreateResponse as LANCreateResponse from .routed_subnet_param import RoutedSubnetParam as RoutedSubnetParam diff --git a/src/cloudflare/types/magic_transit/sites/acl_delete_params.py b/src/cloudflare/types/magic_transit/sites/acl_delete_params.py deleted file mode 100644 index 12a1368d560..00000000000 --- a/src/cloudflare/types/magic_transit/sites/acl_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ACLDeleteParams"] - - -class ACLDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - site_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/magic_transit/sites/lan_delete_params.py b/src/cloudflare/types/magic_transit/sites/lan_delete_params.py deleted file mode 100644 index 4e9d6b5c1e4..00000000000 --- a/src/cloudflare/types/magic_transit/sites/lan_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["LANDeleteParams"] - - -class LANDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - site_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/magic_transit/sites/wan_delete_params.py b/src/cloudflare/types/magic_transit/sites/wan_delete_params.py deleted file mode 100644 index 7e72aa27593..00000000000 --- a/src/cloudflare/types/magic_transit/sites/wan_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["WANDeleteParams"] - - -class WANDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - site_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/memberships/__init__.py b/src/cloudflare/types/memberships/__init__.py index 995d1aee7dd..0ec3d2b63a9 100644 --- a/src/cloudflare/types/memberships/__init__.py +++ b/src/cloudflare/types/memberships/__init__.py @@ -5,7 +5,6 @@ from .membership import Membership as Membership from .membership_list_params import MembershipListParams as MembershipListParams from .membership_get_response import MembershipGetResponse as MembershipGetResponse -from .membership_delete_params import MembershipDeleteParams as MembershipDeleteParams from .membership_update_params import MembershipUpdateParams as MembershipUpdateParams from .membership_delete_response import MembershipDeleteResponse as MembershipDeleteResponse from .membership_update_response import MembershipUpdateResponse as MembershipUpdateResponse diff --git a/src/cloudflare/types/memberships/membership_delete_params.py b/src/cloudflare/types/memberships/membership_delete_params.py deleted file mode 100644 index 11cdd19dc14..00000000000 --- a/src/cloudflare/types/memberships/membership_delete_params.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["MembershipDeleteParams"] - - -class MembershipDeleteParams(TypedDict, total=False): - body: Required[object] diff --git a/src/cloudflare/types/mtls_certificates/__init__.py b/src/cloudflare/types/mtls_certificates/__init__.py index b359b0145f6..e7b6588986e 100644 --- a/src/cloudflare/types/mtls_certificates/__init__.py +++ b/src/cloudflare/types/mtls_certificates/__init__.py @@ -6,5 +6,4 @@ from .association_get_response import AssociationGetResponse as AssociationGetResponse from .certificate_asssociation import CertificateAsssociation as CertificateAsssociation from .mtls_certificate_create_params import MTLSCertificateCreateParams as MTLSCertificateCreateParams -from .mtls_certificate_delete_params import MTLSCertificateDeleteParams as MTLSCertificateDeleteParams from .mtls_certificate_create_response import MTLSCertificateCreateResponse as MTLSCertificateCreateResponse diff --git a/src/cloudflare/types/mtls_certificates/mtls_certificate_delete_params.py b/src/cloudflare/types/mtls_certificates/mtls_certificate_delete_params.py deleted file mode 100644 index 78ad213cdfd..00000000000 --- a/src/cloudflare/types/mtls_certificates/mtls_certificate_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["MTLSCertificateDeleteParams"] - - -class MTLSCertificateDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/origin_ca_certificates/__init__.py b/src/cloudflare/types/origin_ca_certificates/__init__.py index 32cf6287ee3..7dda699e7c9 100644 --- a/src/cloudflare/types/origin_ca_certificates/__init__.py +++ b/src/cloudflare/types/origin_ca_certificates/__init__.py @@ -6,7 +6,6 @@ from .origin_ca_certificate_list_params import OriginCACertificateListParams as OriginCACertificateListParams from .origin_ca_certificate_get_response import OriginCACertificateGetResponse as OriginCACertificateGetResponse from .origin_ca_certificate_create_params import OriginCACertificateCreateParams as OriginCACertificateCreateParams -from .origin_ca_certificate_delete_params import OriginCACertificateDeleteParams as OriginCACertificateDeleteParams from .origin_ca_certificate_create_response import ( OriginCACertificateCreateResponse as OriginCACertificateCreateResponse, ) diff --git a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py index ad5a77af9d4..0ded731e49c 100644 --- a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py +++ b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py @@ -2,9 +2,10 @@ from typing import List, Optional from datetime import datetime -from typing_extensions import Literal from ..._models import BaseModel +from ..ssl.request_validity import RequestValidity +from ..shared.certificate_request_type import CertificateRequestType __all__ = ["OriginCACertificate"] @@ -19,13 +20,13 @@ class OriginCACertificate(BaseModel): certificate. """ - request_type: Literal["origin-rsa", "origin-ecc", "keyless-certificate"] + request_type: CertificateRequestType """ Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers). """ - requested_validity: Literal[7, 30, 90, 365, 730, 1095, 5475] + requested_validity: RequestValidity """The number of days for which the certificate should be valid.""" id: Optional[str] = None diff --git a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py index 1594b520831..704ed08eed1 100644 --- a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py +++ b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py @@ -3,7 +3,10 @@ from __future__ import annotations from typing import Iterable -from typing_extensions import Literal, TypedDict +from typing_extensions import TypedDict + +from ..ssl.request_validity import RequestValidity +from ..shared.certificate_request_type import CertificateRequestType __all__ = ["OriginCACertificateCreateParams"] @@ -18,11 +21,11 @@ class OriginCACertificateCreateParams(TypedDict, total=False): certificate. """ - request_type: Literal["origin-rsa", "origin-ecc", "keyless-certificate"] + request_type: CertificateRequestType """ Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers). """ - requested_validity: Literal[7, 30, 90, 365, 730, 1095, 5475] + requested_validity: RequestValidity """The number of days for which the certificate should be valid.""" diff --git a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_delete_params.py b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_delete_params.py deleted file mode 100644 index c7e9bfc0425..00000000000 --- a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_delete_params.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["OriginCACertificateDeleteParams"] - - -class OriginCACertificateDeleteParams(TypedDict, total=False): - body: Required[object] diff --git a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_list_params.py b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_list_params.py index 7efecba1814..e4f64955822 100644 --- a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_list_params.py +++ b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_list_params.py @@ -8,5 +8,5 @@ class OriginCACertificateListParams(TypedDict, total=False): - identifier: str + zone_id: str """Identifier""" diff --git a/src/cloudflare/types/origin_tls_client_auth/__init__.py b/src/cloudflare/types/origin_tls_client_auth/__init__.py index eba7c27e23a..685af0e2c2d 100644 --- a/src/cloudflare/types/origin_tls_client_auth/__init__.py +++ b/src/cloudflare/types/origin_tls_client_auth/__init__.py @@ -11,7 +11,6 @@ from .zone_authenticated_origin_pull import ZoneAuthenticatedOriginPull as ZoneAuthenticatedOriginPull from .origin_tls_client_auth_get_response import OriginTLSClientAuthGetResponse as OriginTLSClientAuthGetResponse from .origin_tls_client_auth_create_params import OriginTLSClientAuthCreateParams as OriginTLSClientAuthCreateParams -from .origin_tls_client_auth_delete_params import OriginTLSClientAuthDeleteParams as OriginTLSClientAuthDeleteParams from .origin_tls_client_auth_create_response import ( OriginTLSClientAuthCreateResponse as OriginTLSClientAuthCreateResponse, ) diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py index e8930167334..bdf506a1e72 100644 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py +++ b/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py @@ -2,9 +2,7 @@ from __future__ import annotations -from .certificate import Certificate as Certificate from .certificate_get_response import CertificateGetResponse as CertificateGetResponse from .certificate_create_params import CertificateCreateParams as CertificateCreateParams -from .certificate_delete_params import CertificateDeleteParams as CertificateDeleteParams from .certificate_create_response import CertificateCreateResponse as CertificateCreateResponse from .certificate_delete_response import CertificateDeleteResponse as CertificateDeleteResponse diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate.py deleted file mode 100644 index 0886c50caba..00000000000 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate.py +++ /dev/null @@ -1,45 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["Certificate"] - - -class Certificate(BaseModel): - id: Optional[str] = None - """Identifier""" - - certificate: Optional[str] = None - """The hostname certificate.""" - - expires_on: Optional[datetime] = None - """The date when the certificate expires.""" - - issuer: Optional[str] = None - """The certificate authority that issued the certificate.""" - - serial_number: Optional[str] = None - """The serial number on the uploaded certificate.""" - - signature: Optional[str] = None - """The type of hash used for the certificate.""" - - status: Optional[ - Literal[ - "initializing", - "pending_deployment", - "pending_deletion", - "active", - "deleted", - "deployment_timed_out", - "deletion_timed_out", - ] - ] = None - """Status of the certificate or the association.""" - - uploaded_on: Optional[datetime] = None - """The time when the certificate was uploaded.""" diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_delete_params.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_delete_params.py deleted file mode 100644 index 7d7163aa220..00000000000 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["CertificateDeleteParams"] - - -class CertificateDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/origin_tls_client_auth/origin_tls_client_auth_delete_params.py b/src/cloudflare/types/origin_tls_client_auth/origin_tls_client_auth_delete_params.py deleted file mode 100644 index 6e0ad357ff5..00000000000 --- a/src/cloudflare/types/origin_tls_client_auth/origin_tls_client_auth_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["OriginTLSClientAuthDeleteParams"] - - -class OriginTLSClientAuthDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/page_shield/__init__.py b/src/cloudflare/types/page_shield/__init__.py index 39cbf2d6c29..6f07ca60629 100644 --- a/src/cloudflare/types/page_shield/__init__.py +++ b/src/cloudflare/types/page_shield/__init__.py @@ -6,7 +6,6 @@ from .script import Script as Script from .setting import Setting as Setting from .connection import Connection as Connection -from .policy_param import PolicyParam as PolicyParam from .script_list_params import ScriptListParams as ScriptListParams from .script_get_response import ScriptGetResponse as ScriptGetResponse from .policy_create_params import PolicyCreateParams as PolicyCreateParams diff --git a/src/cloudflare/types/page_shield/policy_param.py b/src/cloudflare/types/page_shield/policy_param.py deleted file mode 100644 index 5e2c5c140ae..00000000000 --- a/src/cloudflare/types/page_shield/policy_param.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, TypedDict - -__all__ = ["PolicyParam"] - - -class PolicyParam(TypedDict, total=False): - id: str - """The ID of the policy""" - - action: Literal["allow", "log"] - """The action to take if the expression matches""" - - description: str - """A description for the policy""" - - enabled: bool - """Whether the policy is enabled""" - - expression: str - """ - The expression which must match for the policy to be applied, using the - Cloudflare Firewall rule expression syntax - """ - - value: str - """The policy which will be applied""" diff --git a/src/cloudflare/types/pagerules/__init__.py b/src/cloudflare/types/pagerules/__init__.py index 50e8f79dd7e..02d46c7b4d4 100644 --- a/src/cloudflare/types/pagerules/__init__.py +++ b/src/cloudflare/types/pagerules/__init__.py @@ -12,7 +12,6 @@ from .pagerule_get_response import PageruleGetResponse as PageruleGetResponse from .setting_list_response import SettingListResponse as SettingListResponse from .pagerule_create_params import PageruleCreateParams as PageruleCreateParams -from .pagerule_delete_params import PageruleDeleteParams as PageruleDeleteParams from .pagerule_edit_response import PageruleEditResponse as PageruleEditResponse from .pagerule_list_response import PageruleListResponse as PageruleListResponse from .pagerule_update_params import PageruleUpdateParams as PageruleUpdateParams diff --git a/src/cloudflare/types/pagerules/pagerule_delete_params.py b/src/cloudflare/types/pagerules/pagerule_delete_params.py deleted file mode 100644 index 5b3e48c4f3e..00000000000 --- a/src/cloudflare/types/pagerules/pagerule_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["PageruleDeleteParams"] - - -class PageruleDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/pagerules/pagerule_delete_response.py b/src/cloudflare/types/pagerules/pagerule_delete_response.py index c7ddf323320..eb624fc4873 100644 --- a/src/cloudflare/types/pagerules/pagerule_delete_response.py +++ b/src/cloudflare/types/pagerules/pagerule_delete_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["PageruleDeleteResponse"] diff --git a/src/cloudflare/types/pagerules/target.py b/src/cloudflare/types/pagerules/target.py index f15c3acef68..497c176cb88 100644 --- a/src/cloudflare/types/pagerules/target.py +++ b/src/cloudflare/types/pagerules/target.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional from typing_extensions import Literal from ..._models import BaseModel @@ -21,8 +22,8 @@ class Constraint(BaseModel): class Target(BaseModel): - constraint: Constraint + constraint: Optional[Constraint] = None """String constraint.""" - target: Literal["url"] + target: Optional[Literal["url"]] = None """A target based on the URL of the request.""" diff --git a/src/cloudflare/types/pagerules/target_param.py b/src/cloudflare/types/pagerules/target_param.py index 2977b64466f..9d6e179693e 100644 --- a/src/cloudflare/types/pagerules/target_param.py +++ b/src/cloudflare/types/pagerules/target_param.py @@ -21,8 +21,8 @@ class Constraint(TypedDict, total=False): class TargetParam(TypedDict, total=False): - constraint: Required[Constraint] + constraint: Constraint """String constraint.""" - target: Required[Literal["url"]] + target: Literal["url"] """A target based on the URL of the request.""" diff --git a/src/cloudflare/types/pages/__init__.py b/src/cloudflare/types/pages/__init__.py index bff15c5407c..e28b1070dd5 100644 --- a/src/cloudflare/types/pages/__init__.py +++ b/src/cloudflare/types/pages/__init__.py @@ -9,6 +9,5 @@ from .deployment_param import DeploymentParam as DeploymentParam from .project_edit_params import ProjectEditParams as ProjectEditParams from .project_create_params import ProjectCreateParams as ProjectCreateParams -from .project_delete_params import ProjectDeleteParams as ProjectDeleteParams from .project_edit_response import ProjectEditResponse as ProjectEditResponse from .project_create_response import ProjectCreateResponse as ProjectCreateResponse diff --git a/src/cloudflare/types/pages/project_delete_params.py b/src/cloudflare/types/pages/project_delete_params.py deleted file mode 100644 index 44dbbf9b81b..00000000000 --- a/src/cloudflare/types/pages/project_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ProjectDeleteParams"] - - -class ProjectDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/pages/projects/__init__.py b/src/cloudflare/types/pages/projects/__init__.py index 366cfd847a0..d342db3a2e9 100644 --- a/src/cloudflare/types/pages/projects/__init__.py +++ b/src/cloudflare/types/pages/projects/__init__.py @@ -5,11 +5,9 @@ from .domain_edit_params import DomainEditParams as DomainEditParams from .domain_get_response import DomainGetResponse as DomainGetResponse from .domain_create_params import DomainCreateParams as DomainCreateParams -from .domain_delete_params import DomainDeleteParams as DomainDeleteParams from .domain_edit_response import DomainEditResponse as DomainEditResponse from .deployment_list_params import DeploymentListParams as DeploymentListParams from .domain_create_response import DomainCreateResponse as DomainCreateResponse from .deployment_retry_params import DeploymentRetryParams as DeploymentRetryParams from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams -from .deployment_delete_params import DeploymentDeleteParams as DeploymentDeleteParams from .deployment_rollback_params import DeploymentRollbackParams as DeploymentRollbackParams diff --git a/src/cloudflare/types/pages/projects/deployment_delete_params.py b/src/cloudflare/types/pages/projects/deployment_delete_params.py deleted file mode 100644 index 35a65c5a3c5..00000000000 --- a/src/cloudflare/types/pages/projects/deployment_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["DeploymentDeleteParams"] - - -class DeploymentDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - project_name: Required[str] - """Name of the project.""" - - body: Required[object] diff --git a/src/cloudflare/types/pages/projects/domain_delete_params.py b/src/cloudflare/types/pages/projects/domain_delete_params.py deleted file mode 100644 index efd44ea1f18..00000000000 --- a/src/cloudflare/types/pages/projects/domain_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["DomainDeleteParams"] - - -class DomainDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - project_name: Required[str] - """Name of the project.""" - - body: Required[object] diff --git a/src/cloudflare/types/queues/__init__.py b/src/cloudflare/types/queues/__init__.py index 8546525267f..7dd8b118bbb 100644 --- a/src/cloudflare/types/queues/__init__.py +++ b/src/cloudflare/types/queues/__init__.py @@ -9,14 +9,12 @@ from .message_ack_params import MessageAckParams as MessageAckParams from .message_pull_params import MessagePullParams as MessagePullParams from .queue_create_params import QueueCreateParams as QueueCreateParams -from .queue_delete_params import QueueDeleteParams as QueueDeleteParams from .queue_update_params import QueueUpdateParams as QueueUpdateParams from .message_ack_response import MessageAckResponse as MessageAckResponse from .consumer_get_response import ConsumerGetResponse as ConsumerGetResponse from .message_pull_response import MessagePullResponse as MessagePullResponse from .queue_delete_response import QueueDeleteResponse as QueueDeleteResponse from .consumer_create_params import ConsumerCreateParams as ConsumerCreateParams -from .consumer_delete_params import ConsumerDeleteParams as ConsumerDeleteParams from .consumer_update_params import ConsumerUpdateParams as ConsumerUpdateParams from .consumer_create_response import ConsumerCreateResponse as ConsumerCreateResponse from .consumer_delete_response import ConsumerDeleteResponse as ConsumerDeleteResponse diff --git a/src/cloudflare/types/queues/consumer_delete_params.py b/src/cloudflare/types/queues/consumer_delete_params.py deleted file mode 100644 index 86cb9120b32..00000000000 --- a/src/cloudflare/types/queues/consumer_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ConsumerDeleteParams"] - - -class ConsumerDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - queue_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/queues/queue_delete_params.py b/src/cloudflare/types/queues/queue_delete_params.py deleted file mode 100644 index 0130ee1660d..00000000000 --- a/src/cloudflare/types/queues/queue_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["QueueDeleteParams"] - - -class QueueDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/radar/bgp/route_stats_response.py b/src/cloudflare/types/radar/bgp/route_stats_response.py index 7ccf3b286a2..65e83a79c49 100644 --- a/src/cloudflare/types/radar/bgp/route_stats_response.py +++ b/src/cloudflare/types/radar/bgp/route_stats_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ...._models import BaseModel __all__ = ["RouteStatsResponse", "Meta", "Stats"] diff --git a/src/cloudflare/types/radar/dataset_download_response.py b/src/cloudflare/types/radar/dataset_download_response.py index d745ddc13ae..3b8bb8376db 100644 --- a/src/cloudflare/types/radar/dataset_download_response.py +++ b/src/cloudflare/types/radar/dataset_download_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["DatasetDownloadResponse", "Dataset"] diff --git a/src/cloudflare/types/radar/entities/location_get_response.py b/src/cloudflare/types/radar/entities/location_get_response.py index 4a2461c1aea..99c28d7fbb4 100644 --- a/src/cloudflare/types/radar/entities/location_get_response.py +++ b/src/cloudflare/types/radar/entities/location_get_response.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + from pydantic import Field as FieldInfo from ...._models import BaseModel diff --git a/src/cloudflare/types/radar/entity_get_response.py b/src/cloudflare/types/radar/entity_get_response.py index 77d1bfa5084..ad27e10b1a7 100644 --- a/src/cloudflare/types/radar/entity_get_response.py +++ b/src/cloudflare/types/radar/entity_get_response.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + from pydantic import Field as FieldInfo from ..._models import BaseModel diff --git a/src/cloudflare/types/radar/http/__init__.py b/src/cloudflare/types/radar/http/__init__.py index 69bf6aa6074..16be548d604 100644 --- a/src/cloudflare/types/radar/http/__init__.py +++ b/src/cloudflare/types/radar/http/__init__.py @@ -19,12 +19,14 @@ from .timeseries_group_os_params import TimeseriesGroupOSParams as TimeseriesGroupOSParams from .summary_http_version_params import SummaryHTTPVersionParams as SummaryHTTPVersionParams from .summary_ip_version_response import SummaryIPVersionResponse as SummaryIPVersionResponse +from .summary_post_quantum_params import SummaryPostQuantumParams as SummaryPostQuantumParams from .top_browser_families_params import TopBrowserFamiliesParams as TopBrowserFamiliesParams from .summary_device_type_response import SummaryDeviceTypeResponse as SummaryDeviceTypeResponse from .summary_http_protocol_params import SummaryHTTPProtocolParams as SummaryHTTPProtocolParams from .summary_tls_version_response import SummaryTLSVersionResponse as SummaryTLSVersionResponse from .timeseries_group_os_response import TimeseriesGroupOSResponse as TimeseriesGroupOSResponse from .summary_http_version_response import SummaryHTTPVersionResponse as SummaryHTTPVersionResponse +from .summary_post_quantum_response import SummaryPostQuantumResponse as SummaryPostQuantumResponse from .top_browser_families_response import TopBrowserFamiliesResponse as TopBrowserFamiliesResponse from .summary_http_protocol_response import SummaryHTTPProtocolResponse as SummaryHTTPProtocolResponse from .timeseries_group_browser_params import TimeseriesGroupBrowserParams as TimeseriesGroupBrowserParams @@ -36,6 +38,7 @@ from .timeseries_group_tls_version_params import TimeseriesGroupTLSVersionParams as TimeseriesGroupTLSVersionParams from .timeseries_group_http_version_params import TimeseriesGroupHTTPVersionParams as TimeseriesGroupHTTPVersionParams from .timeseries_group_ip_version_response import TimeseriesGroupIPVersionResponse as TimeseriesGroupIPVersionResponse +from .timeseries_group_post_quantum_params import TimeseriesGroupPostQuantumParams as TimeseriesGroupPostQuantumParams from .timeseries_group_device_type_response import ( TimeseriesGroupDeviceTypeResponse as TimeseriesGroupDeviceTypeResponse, ) @@ -51,6 +54,9 @@ from .timeseries_group_http_version_response import ( TimeseriesGroupHTTPVersionResponse as TimeseriesGroupHTTPVersionResponse, ) +from .timeseries_group_post_quantum_response import ( + TimeseriesGroupPostQuantumResponse as TimeseriesGroupPostQuantumResponse, +) from .timeseries_group_http_protocol_response import ( TimeseriesGroupHTTPProtocolResponse as TimeseriesGroupHTTPProtocolResponse, ) diff --git a/src/cloudflare/types/radar/http/browser.py b/src/cloudflare/types/radar/http/browser.py index 48c2187f1d4..e76a9749ce1 100644 --- a/src/cloudflare/types/radar/http/browser.py +++ b/src/cloudflare/types/radar/http/browser.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ...._models import BaseModel __all__ = ["Browser"] diff --git a/src/cloudflare/types/radar/http/summary_post_quantum_params.py b/src/cloudflare/types/radar/http/summary_post_quantum_params.py new file mode 100644 index 00000000000..d62ab293bb9 --- /dev/null +++ b/src/cloudflare/types/radar/http/summary_post_quantum_params.py @@ -0,0 +1,101 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ...._utils import PropertyInfo + +__all__ = ["SummaryPostQuantumParams"] + + +class SummaryPostQuantumParams(TypedDict, total=False): + asn: List[str] + """Array of comma separated list of ASNs, start with `-` to exclude from results. + + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + """ + + bot_class: Annotated[List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]], PropertyInfo(alias="botClass")] + """Filter for bot class. + + Refer to + [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + """ + + continent: List[str] + """Array of comma separated list of continents (alpha-2 continent codes). + + Start with `-` to exclude from results. For example, `-EU,NA` excludes results + from Europe, but includes results from North America. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[ + List[ + Literal[ + "1d", + "2d", + "7d", + "14d", + "28d", + "12w", + "24w", + "52w", + "1dControl", + "2dControl", + "7dControl", + "14dControl", + "28dControl", + "12wControl", + "24wControl", + ] + ], + PropertyInfo(alias="dateRange"), + ] + """ + For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Array of datetimes to filter the start of a series.""" + + device_type: Annotated[List[Literal["DESKTOP", "MOBILE", "OTHER"]], PropertyInfo(alias="deviceType")] + """Filter for device type.""" + + format: Literal["JSON", "CSV"] + """Format results are returned in.""" + + http_protocol: Annotated[List[Literal["HTTP", "HTTPS"]], PropertyInfo(alias="httpProtocol")] + """Filter for http protocol.""" + + http_version: Annotated[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]], PropertyInfo(alias="httpVersion")] + """Filter for http version.""" + + ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] + """Filter for ip version.""" + + location: List[str] + """Array of comma separated list of locations (alpha-2 country codes). + + Start with `-` to exclude from results. For example, `-US,PT` excludes results + from the US, but includes results from PT. + """ + + name: List[str] + """Array of names that will be used to name the series in responses.""" + + os: List[Literal["WINDOWS", "MACOSX", "IOS", "ANDROID", "CHROMEOS", "LINUX", "SMART_TV"]] + """Filter for os name.""" + + tls_version: Annotated[ + List[Literal["TLSv1_0", "TLSv1_1", "TLSv1_2", "TLSv1_3", "TLSvQUIC"]], PropertyInfo(alias="tlsVersion") + ] + """Filter for tls version.""" diff --git a/src/cloudflare/types/radar/http/summary_post_quantum_response.py b/src/cloudflare/types/radar/http/summary_post_quantum_response.py new file mode 100644 index 00000000000..5a0ef8618f4 --- /dev/null +++ b/src/cloudflare/types/radar/http/summary_post_quantum_response.py @@ -0,0 +1,69 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = [ + "SummaryPostQuantumResponse", + "Meta", + "MetaDateRange", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "Summary0", +] + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: object = FieldInfo(alias="isInstantaneous") + + end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) + + linked_url: Optional[str] = FieldInfo(alias="linkedUrl", default=None) + + start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None) + + +class MetaConfidenceInfo(BaseModel): + annotations: Optional[List[MetaConfidenceInfoAnnotation]] = None + + level: Optional[int] = None + + +class Meta(BaseModel): + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: str = FieldInfo(alias="lastUpdated") + + normalization: str + + confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + + +class Summary0(BaseModel): + not_supported: str = FieldInfo(alias="NOT_SUPPORTED") + + supported: str = FieldInfo(alias="SUPPORTED") + + +class SummaryPostQuantumResponse(BaseModel): + meta: Meta + + summary_0: Summary0 diff --git a/src/cloudflare/types/radar/http/timeseries_group_post_quantum_params.py b/src/cloudflare/types/radar/http/timeseries_group_post_quantum_params.py new file mode 100644 index 00000000000..09fa9317b8d --- /dev/null +++ b/src/cloudflare/types/radar/http/timeseries_group_post_quantum_params.py @@ -0,0 +1,108 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ...._utils import PropertyInfo + +__all__ = ["TimeseriesGroupPostQuantumParams"] + + +class TimeseriesGroupPostQuantumParams(TypedDict, total=False): + agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")] + """ + Aggregation interval results should be returned in (for example, in 15 minutes + or 1 hour intervals). Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + asn: List[str] + """Array of comma separated list of ASNs, start with `-` to exclude from results. + + For example, `-174, 3356` excludes results from AS174, but includes results from + AS3356. + """ + + bot_class: Annotated[List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]], PropertyInfo(alias="botClass")] + """Filter for bot class. + + Refer to + [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + """ + + continent: List[str] + """Array of comma separated list of continents (alpha-2 continent codes). + + Start with `-` to exclude from results. For example, `-EU,NA` excludes results + from Europe, but includes results from North America. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[ + List[ + Literal[ + "1d", + "2d", + "7d", + "14d", + "28d", + "12w", + "24w", + "52w", + "1dControl", + "2dControl", + "7dControl", + "14dControl", + "28dControl", + "12wControl", + "24wControl", + ] + ], + PropertyInfo(alias="dateRange"), + ] + """ + For example, use `7d` and `7dControl` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Array of datetimes to filter the start of a series.""" + + device_type: Annotated[List[Literal["DESKTOP", "MOBILE", "OTHER"]], PropertyInfo(alias="deviceType")] + """Filter for device type.""" + + format: Literal["JSON", "CSV"] + """Format results are returned in.""" + + http_protocol: Annotated[List[Literal["HTTP", "HTTPS"]], PropertyInfo(alias="httpProtocol")] + """Filter for http protocol.""" + + http_version: Annotated[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]], PropertyInfo(alias="httpVersion")] + """Filter for http version.""" + + ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] + """Filter for ip version.""" + + location: List[str] + """Array of comma separated list of locations (alpha-2 country codes). + + Start with `-` to exclude from results. For example, `-US,PT` excludes results + from the US, but includes results from PT. + """ + + name: List[str] + """Array of names that will be used to name the series in responses.""" + + os: List[Literal["WINDOWS", "MACOSX", "IOS", "ANDROID", "CHROMEOS", "LINUX", "SMART_TV"]] + """Filter for os name.""" + + tls_version: Annotated[ + List[Literal["TLSv1_0", "TLSv1_1", "TLSv1_2", "TLSv1_3", "TLSvQUIC"]], PropertyInfo(alias="tlsVersion") + ] + """Filter for tls version.""" diff --git a/src/cloudflare/types/radar/http/timeseries_group_post_quantum_response.py b/src/cloudflare/types/radar/http/timeseries_group_post_quantum_response.py new file mode 100644 index 00000000000..17c145551b4 --- /dev/null +++ b/src/cloudflare/types/radar/http/timeseries_group_post_quantum_response.py @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = ["TimeseriesGroupPostQuantumResponse", "Serie0"] + + +class Serie0(BaseModel): + not_supported: List[str] = FieldInfo(alias="NOT_SUPPORTED") + + supported: List[str] = FieldInfo(alias="SUPPORTED") + + timestamps: List[str] + + +class TimeseriesGroupPostQuantumResponse(BaseModel): + meta: object + + serie_0: Serie0 diff --git a/src/cloudflare/types/radar/radar_email_summary.py b/src/cloudflare/types/radar/radar_email_summary.py index 19a29a852e2..d98b19527cb 100644 --- a/src/cloudflare/types/radar/radar_email_summary.py +++ b/src/cloudflare/types/radar/radar_email_summary.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + from pydantic import Field as FieldInfo from ..._models import BaseModel diff --git a/src/cloudflare/types/rate_limits/__init__.py b/src/cloudflare/types/rate_limits/__init__.py index 95fc15ad73e..ac12490e28a 100644 --- a/src/cloudflare/types/rate_limits/__init__.py +++ b/src/cloudflare/types/rate_limits/__init__.py @@ -9,7 +9,6 @@ from .rate_limit_list_params import RateLimitListParams as RateLimitListParams from .rate_limit_get_response import RateLimitGetResponse as RateLimitGetResponse from .rate_limit_create_params import RateLimitCreateParams as RateLimitCreateParams -from .rate_limit_delete_params import RateLimitDeleteParams as RateLimitDeleteParams from .rate_limit_edit_response import RateLimitEditResponse as RateLimitEditResponse from .rate_limit_create_response import RateLimitCreateResponse as RateLimitCreateResponse from .rate_limit_delete_response import RateLimitDeleteResponse as RateLimitDeleteResponse diff --git a/src/cloudflare/types/rate_limits/rate_limit_delete_params.py b/src/cloudflare/types/rate_limits/rate_limit_delete_params.py deleted file mode 100644 index 90fbe783836..00000000000 --- a/src/cloudflare/types/rate_limits/rate_limit_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["RateLimitDeleteParams"] - - -class RateLimitDeleteParams(TypedDict, total=False): - zone_identifier: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/rate_plans/__init__.py b/src/cloudflare/types/rate_plans/__init__.py index b11a69db3bb..f491d32afb3 100644 --- a/src/cloudflare/types/rate_plans/__init__.py +++ b/src/cloudflare/types/rate_plans/__init__.py @@ -3,5 +3,4 @@ from __future__ import annotations from .rate_plan import RatePlan as RatePlan -from .rate_plan_param import RatePlanParam as RatePlanParam from .rate_plan_get_response import RatePlanGetResponse as RatePlanGetResponse diff --git a/src/cloudflare/types/rate_plans/rate_plan_param.py b/src/cloudflare/types/rate_plans/rate_plan_param.py deleted file mode 100644 index 7987224641d..00000000000 --- a/src/cloudflare/types/rate_plans/rate_plan_param.py +++ /dev/null @@ -1,24 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Iterable -from typing_extensions import Literal, TypedDict - -__all__ = ["RatePlanParam", "Component"] - - -class Component(TypedDict, total=False): - default: float - """The default amount allocated.""" - - name: Literal["zones", "page_rules", "dedicated_certificates", "dedicated_certificates_custom"] - """The unique component.""" - - -class RatePlanParam(TypedDict, total=False): - components: Iterable[Component] - """Array of available components values for the plan.""" - - duration: float - """The duration of the plan subscription.""" diff --git a/src/cloudflare/types/rules/__init__.py b/src/cloudflare/types/rules/__init__.py index 24f42f87715..f1b0f21a485 100644 --- a/src/cloudflare/types/rules/__init__.py +++ b/src/cloudflare/types/rules/__init__.py @@ -8,6 +8,5 @@ from .hostname_param import HostnameParam as HostnameParam from .redirect_param import RedirectParam as RedirectParam from .list_create_params import ListCreateParams as ListCreateParams -from .list_delete_params import ListDeleteParams as ListDeleteParams from .list_update_params import ListUpdateParams as ListUpdateParams from .list_delete_response import ListDeleteResponse as ListDeleteResponse diff --git a/src/cloudflare/types/rules/hostname.py b/src/cloudflare/types/rules/hostname.py index 32d7ce459a9..04acdbc5d7b 100644 --- a/src/cloudflare/types/rules/hostname.py +++ b/src/cloudflare/types/rules/hostname.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["Hostname"] diff --git a/src/cloudflare/types/rules/list_delete_params.py b/src/cloudflare/types/rules/list_delete_params.py deleted file mode 100644 index dd3970f9614..00000000000 --- a/src/cloudflare/types/rules/list_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ListDeleteParams"] - - -class ListDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/rules/lists/__init__.py b/src/cloudflare/types/rules/lists/__init__.py index 67f205f1c01..00311bac0d6 100644 --- a/src/cloudflare/types/rules/lists/__init__.py +++ b/src/cloudflare/types/rules/lists/__init__.py @@ -2,13 +2,11 @@ from __future__ import annotations -from .list_item import ListItem as ListItem from .list_cursor import ListCursor as ListCursor from .item_list_params import ItemListParams as ItemListParams from .operation_status import OperationStatus as OperationStatus from .item_get_response import ItemGetResponse as ItemGetResponse from .item_create_params import ItemCreateParams as ItemCreateParams -from .item_delete_params import ItemDeleteParams as ItemDeleteParams from .item_update_params import ItemUpdateParams as ItemUpdateParams from .item_create_response import ItemCreateResponse as ItemCreateResponse from .item_delete_response import ItemDeleteResponse as ItemDeleteResponse diff --git a/src/cloudflare/types/rules/lists/item_delete_params.py b/src/cloudflare/types/rules/lists/item_delete_params.py deleted file mode 100644 index 8c164909719..00000000000 --- a/src/cloudflare/types/rules/lists/item_delete_params.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Iterable -from typing_extensions import Required, TypedDict - -__all__ = ["ItemDeleteParams", "Item"] - - -class ItemDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - items: Iterable[Item] - - -class Item(TypedDict, total=False): - id: str - """The unique ID of the item in the List.""" diff --git a/src/cloudflare/types/rules/lists/list_item.py b/src/cloudflare/types/rules/lists/list_item.py deleted file mode 100644 index 3f97e10948a..00000000000 --- a/src/cloudflare/types/rules/lists/list_item.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ...._models import BaseModel - -__all__ = ["ListItem"] - - -class ListItem(BaseModel): - operation_id: Optional[str] = None - """The unique operation ID of the asynchronous action.""" diff --git a/src/cloudflare/types/rulesets/__init__.py b/src/cloudflare/types/rulesets/__init__.py index 5ba52a2ca8b..d5b6a67cb87 100644 --- a/src/cloudflare/types/rulesets/__init__.py +++ b/src/cloudflare/types/rulesets/__init__.py @@ -2,6 +2,8 @@ from __future__ import annotations +from .kind import Kind as Kind +from .phase import Phase as Phase from .logging import Logging as Logging from .ruleset import Ruleset as Ruleset from .log_rule import LogRule as LogRule diff --git a/src/cloudflare/types/rulesets/kind.py b/src/cloudflare/types/rulesets/kind.py new file mode 100644 index 00000000000..d738a069920 --- /dev/null +++ b/src/cloudflare/types/rulesets/kind.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["Kind"] + +Kind = Literal["managed", "custom", "root", "zone"] diff --git a/src/cloudflare/types/rulesets/logging.py b/src/cloudflare/types/rulesets/logging.py index d7a37ba86e6..6e4bb74304d 100644 --- a/src/cloudflare/types/rulesets/logging.py +++ b/src/cloudflare/types/rulesets/logging.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["Logging"] diff --git a/src/cloudflare/types/rulesets/phase.py b/src/cloudflare/types/rulesets/phase.py new file mode 100644 index 00000000000..2c762c89ddb --- /dev/null +++ b/src/cloudflare/types/rulesets/phase.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["Phase"] + +Phase = Literal[ + "ddos_l4", + "ddos_l7", + "http_config_settings", + "http_custom_errors", + "http_log_custom_fields", + "http_ratelimit", + "http_request_cache_settings", + "http_request_dynamic_redirect", + "http_request_firewall_custom", + "http_request_firewall_managed", + "http_request_late_transform", + "http_request_origin", + "http_request_redirect", + "http_request_sanitize", + "http_request_sbfm", + "http_request_select_configuration", + "http_request_transform", + "http_response_compression", + "http_response_firewall_managed", + "http_response_headers_transform", + "magic_transit", + "magic_transit_ids_managed", + "magic_transit_managed", +] diff --git a/src/cloudflare/types/rulesets/phase_get_response.py b/src/cloudflare/types/rulesets/phase_get_response.py index ba836f604ee..659dae75d71 100644 --- a/src/cloudflare/types/rulesets/phase_get_response.py +++ b/src/cloudflare/types/rulesets/phase_get_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from .log_rule import LogRule from ..._models import BaseModel from .skip_rule import SkipRule @@ -46,7 +47,7 @@ class PhaseGetResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class PhaseGetResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/phase_update_params.py b/src/cloudflare/types/rulesets/phase_update_params.py index 234efabd899..fbee22cf279 100644 --- a/src/cloudflare/types/rulesets/phase_update_params.py +++ b/src/cloudflare/types/rulesets/phase_update_params.py @@ -3,8 +3,10 @@ from __future__ import annotations from typing import Union, Iterable -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict +from .kind import Kind +from .phase import Phase from .log_rule_param import LogRuleParam from .skip_rule_param import SkipRuleParam from .block_rule_param import BlockRuleParam @@ -37,37 +39,13 @@ class PhaseUpdateParams(TypedDict, total=False): description: str """An informative description of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/phase_update_response.py b/src/cloudflare/types/rulesets/phase_update_response.py index 41257fc0f35..8d5b1b28eac 100644 --- a/src/cloudflare/types/rulesets/phase_update_response.py +++ b/src/cloudflare/types/rulesets/phase_update_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from .log_rule import LogRule from ..._models import BaseModel from .skip_rule import SkipRule @@ -46,7 +47,7 @@ class PhaseUpdateResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class PhaseUpdateResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/phases/version_get_response.py b/src/cloudflare/types/rulesets/phases/version_get_response.py index 3109c6c05f3..e4a7e29890b 100644 --- a/src/cloudflare/types/rulesets/phases/version_get_response.py +++ b/src/cloudflare/types/rulesets/phases/version_get_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from ..kind import Kind +from ..phase import Phase from ..log_rule import LogRule from ...._models import BaseModel from ..skip_rule import SkipRule @@ -46,7 +47,7 @@ class VersionGetResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class VersionGetResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/route_rule.py b/src/cloudflare/types/rulesets/route_rule.py index 79ac7512ba0..ee9647c2ca9 100644 --- a/src/cloudflare/types/rulesets/route_rule.py +++ b/src/cloudflare/types/rulesets/route_rule.py @@ -7,7 +7,7 @@ from .logging import Logging from ..._models import BaseModel -__all__ = ["RouteRule", "ActionParameters", "ActionParametersOrigin", "ActionParametersSni"] +__all__ = ["RouteRule", "ActionParameters", "ActionParametersOrigin", "ActionParametersSNI"] class ActionParametersOrigin(BaseModel): @@ -18,7 +18,7 @@ class ActionParametersOrigin(BaseModel): """Override the destination port.""" -class ActionParametersSni(BaseModel): +class ActionParametersSNI(BaseModel): value: str """The SNI override.""" @@ -30,7 +30,7 @@ class ActionParameters(BaseModel): origin: Optional[ActionParametersOrigin] = None """Override the IP/TCP destination.""" - sni: Optional[ActionParametersSni] = None + sni: Optional[ActionParametersSNI] = None """Override the Server Name Indication (SNI).""" diff --git a/src/cloudflare/types/rulesets/route_rule_param.py b/src/cloudflare/types/rulesets/route_rule_param.py index 06ba330a332..13738c29b68 100644 --- a/src/cloudflare/types/rulesets/route_rule_param.py +++ b/src/cloudflare/types/rulesets/route_rule_param.py @@ -6,7 +6,7 @@ from .logging_param import LoggingParam -__all__ = ["RouteRuleParam", "ActionParameters", "ActionParametersOrigin", "ActionParametersSni"] +__all__ = ["RouteRuleParam", "ActionParameters", "ActionParametersOrigin", "ActionParametersSNI"] class ActionParametersOrigin(TypedDict, total=False): @@ -17,7 +17,7 @@ class ActionParametersOrigin(TypedDict, total=False): """Override the destination port.""" -class ActionParametersSni(TypedDict, total=False): +class ActionParametersSNI(TypedDict, total=False): value: Required[str] """The SNI override.""" @@ -29,7 +29,7 @@ class ActionParameters(TypedDict, total=False): origin: ActionParametersOrigin """Override the IP/TCP destination.""" - sni: ActionParametersSni + sni: ActionParametersSNI """Override the Server Name Indication (SNI).""" diff --git a/src/cloudflare/types/rulesets/rule_create_params.py b/src/cloudflare/types/rulesets/rule_create_params.py index 0aa3ff1f5a8..84c2f09d8b5 100644 --- a/src/cloudflare/types/rulesets/rule_create_params.py +++ b/src/cloudflare/types/rulesets/rule_create_params.py @@ -5,6 +5,7 @@ from typing import Dict, List, Union, Iterable from typing_extensions import Literal, Required, TypedDict +from .phase import Phase from .logging_param import LoggingParam from .rewrite_uri_part_param import RewriteURIPartParam @@ -43,7 +44,7 @@ "RouteRule", "RouteRuleActionParameters", "RouteRuleActionParametersOrigin", - "RouteRuleActionParametersSni", + "RouteRuleActionParametersSNI", "ScoreRule", "ScoreRuleActionParameters", "ServeErrorRule", @@ -588,7 +589,7 @@ class RouteRuleActionParametersOrigin(TypedDict, total=False): """Override the destination port.""" -class RouteRuleActionParametersSni(TypedDict, total=False): +class RouteRuleActionParametersSNI(TypedDict, total=False): value: Required[str] """The SNI override.""" @@ -600,7 +601,7 @@ class RouteRuleActionParameters(TypedDict, total=False): origin: RouteRuleActionParametersOrigin """Override the IP/TCP destination.""" - sni: RouteRuleActionParametersSni + sni: RouteRuleActionParametersSNI """Override the Server Name Indication (SNI).""" @@ -810,33 +811,7 @@ class SkipRule(TypedDict, total=False): class SkipRuleActionParameters(TypedDict, total=False): - phases: List[ - Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - ] + phases: List[Phase] """A list of phases to skip the execution of. This option is incompatible with the ruleset and rulesets options. diff --git a/src/cloudflare/types/rulesets/rule_create_response.py b/src/cloudflare/types/rulesets/rule_create_response.py index 8e554d96ac9..7fdfe28ad63 100644 --- a/src/cloudflare/types/rulesets/rule_create_response.py +++ b/src/cloudflare/types/rulesets/rule_create_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from .log_rule import LogRule from ..._models import BaseModel from .skip_rule import SkipRule @@ -46,7 +47,7 @@ class RuleCreateResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class RuleCreateResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/rule_delete_response.py b/src/cloudflare/types/rulesets/rule_delete_response.py index d729df47b53..a199b17fd00 100644 --- a/src/cloudflare/types/rulesets/rule_delete_response.py +++ b/src/cloudflare/types/rulesets/rule_delete_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from .log_rule import LogRule from ..._models import BaseModel from .skip_rule import SkipRule @@ -46,7 +47,7 @@ class RuleDeleteResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class RuleDeleteResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/rule_edit_params.py b/src/cloudflare/types/rulesets/rule_edit_params.py index 2b4fabd4b76..63f8b2a0b50 100644 --- a/src/cloudflare/types/rulesets/rule_edit_params.py +++ b/src/cloudflare/types/rulesets/rule_edit_params.py @@ -5,6 +5,7 @@ from typing import Dict, List, Union, Iterable from typing_extensions import Literal, Required, TypedDict +from .phase import Phase from .logging_param import LoggingParam from .rewrite_uri_part_param import RewriteURIPartParam @@ -43,7 +44,7 @@ "RouteRule", "RouteRuleActionParameters", "RouteRuleActionParametersOrigin", - "RouteRuleActionParametersSni", + "RouteRuleActionParametersSNI", "ScoreRule", "ScoreRuleActionParameters", "ServeErrorRule", @@ -618,7 +619,7 @@ class RouteRuleActionParametersOrigin(TypedDict, total=False): """Override the destination port.""" -class RouteRuleActionParametersSni(TypedDict, total=False): +class RouteRuleActionParametersSNI(TypedDict, total=False): value: Required[str] """The SNI override.""" @@ -630,7 +631,7 @@ class RouteRuleActionParameters(TypedDict, total=False): origin: RouteRuleActionParametersOrigin """Override the IP/TCP destination.""" - sni: RouteRuleActionParametersSni + sni: RouteRuleActionParametersSNI """Override the Server Name Indication (SNI).""" @@ -852,33 +853,7 @@ class SkipRule(TypedDict, total=False): class SkipRuleActionParameters(TypedDict, total=False): - phases: List[ - Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - ] + phases: List[Phase] """A list of phases to skip the execution of. This option is incompatible with the ruleset and rulesets options. diff --git a/src/cloudflare/types/rulesets/rule_edit_response.py b/src/cloudflare/types/rulesets/rule_edit_response.py index 9239500ea74..38c4717f2f6 100644 --- a/src/cloudflare/types/rulesets/rule_edit_response.py +++ b/src/cloudflare/types/rulesets/rule_edit_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from .log_rule import LogRule from ..._models import BaseModel from .skip_rule import SkipRule @@ -46,7 +47,7 @@ class RuleEditResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class RuleEditResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/ruleset.py b/src/cloudflare/types/rulesets/ruleset.py index e5973e1c4fc..a570fcc344d 100644 --- a/src/cloudflare/types/rulesets/ruleset.py +++ b/src/cloudflare/types/rulesets/ruleset.py @@ -2,8 +2,9 @@ from typing import Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from ..._models import BaseModel __all__ = ["Ruleset"] @@ -22,37 +23,11 @@ class Ruleset(BaseModel): description: Optional[str] = None """An informative description of the ruleset.""" - kind: Optional[Literal["managed", "custom", "root", "zone"]] = None + kind: Optional[Kind] = None """The kind of the ruleset.""" name: Optional[str] = None """The human-readable name of the ruleset.""" - phase: Optional[ - Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - ] = None + phase: Optional[Phase] = None """The phase of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/ruleset_create_params.py b/src/cloudflare/types/rulesets/ruleset_create_params.py index dba6629645b..db2759e933f 100644 --- a/src/cloudflare/types/rulesets/ruleset_create_params.py +++ b/src/cloudflare/types/rulesets/ruleset_create_params.py @@ -3,8 +3,10 @@ from __future__ import annotations from typing import Union, Iterable -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict +from .kind import Kind +from .phase import Phase from .log_rule_param import LogRuleParam from .skip_rule_param import SkipRuleParam from .block_rule_param import BlockRuleParam @@ -25,39 +27,13 @@ class RulesetCreateParams(TypedDict, total=False): - kind: Required[Literal["managed", "custom", "root", "zone"]] + kind: Required[Kind] """The kind of the ruleset.""" name: Required[str] """The human-readable name of the ruleset.""" - phase: Required[ - Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - ] + phase: Required[Phase] """The phase of the ruleset.""" rules: Required[Iterable[Rule]] diff --git a/src/cloudflare/types/rulesets/ruleset_create_response.py b/src/cloudflare/types/rulesets/ruleset_create_response.py index a4cbefe983c..c14817bae8e 100644 --- a/src/cloudflare/types/rulesets/ruleset_create_response.py +++ b/src/cloudflare/types/rulesets/ruleset_create_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from .log_rule import LogRule from ..._models import BaseModel from .skip_rule import SkipRule @@ -46,7 +47,7 @@ class RulesetCreateResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class RulesetCreateResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/ruleset_get_response.py b/src/cloudflare/types/rulesets/ruleset_get_response.py index b4eeea24277..99506e58175 100644 --- a/src/cloudflare/types/rulesets/ruleset_get_response.py +++ b/src/cloudflare/types/rulesets/ruleset_get_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from .log_rule import LogRule from ..._models import BaseModel from .skip_rule import SkipRule @@ -46,7 +47,7 @@ class RulesetGetResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class RulesetGetResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/ruleset_update_params.py b/src/cloudflare/types/rulesets/ruleset_update_params.py index 328c7fbed0a..4e3b08a7640 100644 --- a/src/cloudflare/types/rulesets/ruleset_update_params.py +++ b/src/cloudflare/types/rulesets/ruleset_update_params.py @@ -3,8 +3,10 @@ from __future__ import annotations from typing import Union, Iterable -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict +from .kind import Kind +from .phase import Phase from .log_rule_param import LogRuleParam from .skip_rule_param import SkipRuleParam from .block_rule_param import BlockRuleParam @@ -37,37 +39,13 @@ class RulesetUpdateParams(TypedDict, total=False): description: str """An informative description of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/ruleset_update_response.py b/src/cloudflare/types/rulesets/ruleset_update_response.py index 7ed717a100d..6cc2c3f102c 100644 --- a/src/cloudflare/types/rulesets/ruleset_update_response.py +++ b/src/cloudflare/types/rulesets/ruleset_update_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from .log_rule import LogRule from ..._models import BaseModel from .skip_rule import SkipRule @@ -46,7 +47,7 @@ class RulesetUpdateResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class RulesetUpdateResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/skip_rule.py b/src/cloudflare/types/rulesets/skip_rule.py index ae51803c15b..6b01bf8efb3 100644 --- a/src/cloudflare/types/rulesets/skip_rule.py +++ b/src/cloudflare/types/rulesets/skip_rule.py @@ -4,6 +4,7 @@ from datetime import datetime from typing_extensions import Literal +from .phase import Phase from .logging import Logging from ..._models import BaseModel @@ -11,35 +12,7 @@ class ActionParameters(BaseModel): - phases: Optional[ - List[ - Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - ] - ] = None + phases: Optional[List[Phase]] = None """A list of phases to skip the execution of. This option is incompatible with the ruleset and rulesets options. diff --git a/src/cloudflare/types/rulesets/skip_rule_param.py b/src/cloudflare/types/rulesets/skip_rule_param.py index 27b20ebba30..abf557ff94a 100644 --- a/src/cloudflare/types/rulesets/skip_rule_param.py +++ b/src/cloudflare/types/rulesets/skip_rule_param.py @@ -5,39 +5,14 @@ from typing import Dict, List from typing_extensions import Literal, TypedDict +from .phase import Phase from .logging_param import LoggingParam __all__ = ["SkipRuleParam", "ActionParameters"] class ActionParameters(TypedDict, total=False): - phases: List[ - Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - ] + phases: List[Phase] """A list of phases to skip the execution of. This option is incompatible with the ruleset and rulesets options. diff --git a/src/cloudflare/types/rulesets/version_get_response.py b/src/cloudflare/types/rulesets/version_get_response.py index 63d43d6a422..cb03724ddeb 100644 --- a/src/cloudflare/types/rulesets/version_get_response.py +++ b/src/cloudflare/types/rulesets/version_get_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from .kind import Kind +from .phase import Phase from .log_rule import LogRule from ..._models import BaseModel from .skip_rule import SkipRule @@ -46,7 +47,7 @@ class VersionGetResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class VersionGetResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/rulesets/versions/by_tag_get_response.py b/src/cloudflare/types/rulesets/versions/by_tag_get_response.py index b5b714a8119..f1aa698a4af 100644 --- a/src/cloudflare/types/rulesets/versions/by_tag_get_response.py +++ b/src/cloudflare/types/rulesets/versions/by_tag_get_response.py @@ -2,8 +2,9 @@ from typing import List, Union, Optional from datetime import datetime -from typing_extensions import Literal +from ..kind import Kind +from ..phase import Phase from ..log_rule import LogRule from ...._models import BaseModel from ..skip_rule import SkipRule @@ -46,7 +47,7 @@ class ByTagGetResponse(BaseModel): id: str """The unique ID of the ruleset.""" - kind: Literal["managed", "custom", "root", "zone"] + kind: Kind """The kind of the ruleset.""" last_updated: datetime @@ -55,31 +56,7 @@ class ByTagGetResponse(BaseModel): name: str """The human-readable name of the ruleset.""" - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] + phase: Phase """The phase of the ruleset.""" rules: List[Rule] diff --git a/src/cloudflare/types/secondary_dns/__init__.py b/src/cloudflare/types/secondary_dns/__init__.py index 72716c6630b..38aa6d40ad7 100644 --- a/src/cloudflare/types/secondary_dns/__init__.py +++ b/src/cloudflare/types/secondary_dns/__init__.py @@ -10,13 +10,10 @@ from .outgoing_status import OutgoingStatus as OutgoingStatus from .disable_transfer import DisableTransfer as DisableTransfer from .acl_create_params import ACLCreateParams as ACLCreateParams -from .acl_delete_params import ACLDeleteParams as ACLDeleteParams from .acl_update_params import ACLUpdateParams as ACLUpdateParams from .peer_create_params import PeerCreateParams as PeerCreateParams -from .peer_delete_params import PeerDeleteParams as PeerDeleteParams from .peer_update_params import PeerUpdateParams as PeerUpdateParams from .tsig_create_params import TSIGCreateParams as TSIGCreateParams -from .tsig_delete_params import TSIGDeleteParams as TSIGDeleteParams from .tsig_update_params import TSIGUpdateParams as TSIGUpdateParams from .acl_delete_response import ACLDeleteResponse as ACLDeleteResponse from .peer_delete_response import PeerDeleteResponse as PeerDeleteResponse @@ -24,10 +21,8 @@ from .incoming_get_response import IncomingGetResponse as IncomingGetResponse from .outgoing_get_response import OutgoingGetResponse as OutgoingGetResponse from .incoming_create_params import IncomingCreateParams as IncomingCreateParams -from .incoming_delete_params import IncomingDeleteParams as IncomingDeleteParams from .incoming_update_params import IncomingUpdateParams as IncomingUpdateParams from .outgoing_create_params import OutgoingCreateParams as OutgoingCreateParams -from .outgoing_delete_params import OutgoingDeleteParams as OutgoingDeleteParams from .outgoing_enable_params import OutgoingEnableParams as OutgoingEnableParams from .outgoing_update_params import OutgoingUpdateParams as OutgoingUpdateParams from .outgoing_disable_params import OutgoingDisableParams as OutgoingDisableParams diff --git a/src/cloudflare/types/secondary_dns/acl.py b/src/cloudflare/types/secondary_dns/acl.py index 46ca034a4e7..41bea938293 100644 --- a/src/cloudflare/types/secondary_dns/acl.py +++ b/src/cloudflare/types/secondary_dns/acl.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["ACL"] diff --git a/src/cloudflare/types/secondary_dns/acl_delete_params.py b/src/cloudflare/types/secondary_dns/acl_delete_params.py deleted file mode 100644 index 16de02d2864..00000000000 --- a/src/cloudflare/types/secondary_dns/acl_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ACLDeleteParams"] - - -class ACLDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/secondary_dns/incoming_delete_params.py b/src/cloudflare/types/secondary_dns/incoming_delete_params.py deleted file mode 100644 index f38fedf881d..00000000000 --- a/src/cloudflare/types/secondary_dns/incoming_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["IncomingDeleteParams"] - - -class IncomingDeleteParams(TypedDict, total=False): - zone_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/secondary_dns/outgoing_delete_params.py b/src/cloudflare/types/secondary_dns/outgoing_delete_params.py deleted file mode 100644 index 68387b9fa08..00000000000 --- a/src/cloudflare/types/secondary_dns/outgoing_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["OutgoingDeleteParams"] - - -class OutgoingDeleteParams(TypedDict, total=False): - zone_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/secondary_dns/peer_delete_params.py b/src/cloudflare/types/secondary_dns/peer_delete_params.py deleted file mode 100644 index 86d9970947e..00000000000 --- a/src/cloudflare/types/secondary_dns/peer_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["PeerDeleteParams"] - - -class PeerDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/secondary_dns/tsig.py b/src/cloudflare/types/secondary_dns/tsig.py index 2c91099f98c..0c270b791d6 100644 --- a/src/cloudflare/types/secondary_dns/tsig.py +++ b/src/cloudflare/types/secondary_dns/tsig.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["TSIG"] diff --git a/src/cloudflare/types/secondary_dns/tsig_delete_params.py b/src/cloudflare/types/secondary_dns/tsig_delete_params.py deleted file mode 100644 index 1c2ab15aefa..00000000000 --- a/src/cloudflare/types/secondary_dns/tsig_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["TSIGDeleteParams"] - - -class TSIGDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/shared/__init__.py b/src/cloudflare/types/shared/__init__.py index d6d57611926..51d5d9d5f14 100644 --- a/src/cloudflare/types/shared/__init__.py +++ b/src/cloudflare/types/shared/__init__.py @@ -9,7 +9,10 @@ from .identifier import Identifier as Identifier from .permission import Permission as Permission from .response_info import ResponseInfo as ResponseInfo +from .certificate_ca import CertificateCA as CertificateCA +from .sort_direction import SortDirection as SortDirection from .pagination_info import PaginationInfo as PaginationInfo from .permission_grant import PermissionGrant as PermissionGrant from .cloudflare_tunnel import CloudflareTunnel as CloudflareTunnel from .load_balancer_preview import LoadBalancerPreview as LoadBalancerPreview +from .certificate_request_type import CertificateRequestType as CertificateRequestType diff --git a/src/cloudflare/types/shared/certificate_ca.py b/src/cloudflare/types/shared/certificate_ca.py new file mode 100644 index 00000000000..bf610820022 --- /dev/null +++ b/src/cloudflare/types/shared/certificate_ca.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["CertificateCA"] + +CertificateCA = Literal["digicert", "google", "lets_encrypt"] diff --git a/src/cloudflare/types/shared/certificate_request_type.py b/src/cloudflare/types/shared/certificate_request_type.py new file mode 100644 index 00000000000..dea937c3690 --- /dev/null +++ b/src/cloudflare/types/shared/certificate_request_type.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["CertificateRequestType"] + +CertificateRequestType = Literal["origin-rsa", "origin-ecc", "keyless-certificate"] diff --git a/src/cloudflare/types/shared/sort_direction.py b/src/cloudflare/types/shared/sort_direction.py new file mode 100644 index 00000000000..abc1f5dd8e0 --- /dev/null +++ b/src/cloudflare/types/shared/sort_direction.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["SortDirection"] + +SortDirection = Literal["asc", "desc"] diff --git a/src/cloudflare/types/shared_params/__init__.py b/src/cloudflare/types/shared_params/__init__.py index 9d75a6e1543..6a6befd7e33 100644 --- a/src/cloudflare/types/shared_params/__init__.py +++ b/src/cloudflare/types/shared_params/__init__.py @@ -1,4 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from .asn import ASN as ASN +from .certificate_ca import CertificateCA as CertificateCA +from .sort_direction import SortDirection as SortDirection from .permission_grant import PermissionGrant as PermissionGrant +from .certificate_request_type import CertificateRequestType as CertificateRequestType diff --git a/src/cloudflare/types/shared_params/certificate_ca.py b/src/cloudflare/types/shared_params/certificate_ca.py new file mode 100644 index 00000000000..6c04765d842 --- /dev/null +++ b/src/cloudflare/types/shared_params/certificate_ca.py @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal + +__all__ = ["CertificateCA"] + +CertificateCA = Literal["digicert", "google", "lets_encrypt"] diff --git a/src/cloudflare/types/shared_params/certificate_request_type.py b/src/cloudflare/types/shared_params/certificate_request_type.py new file mode 100644 index 00000000000..4366cc3dd96 --- /dev/null +++ b/src/cloudflare/types/shared_params/certificate_request_type.py @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal + +__all__ = ["CertificateRequestType"] + +CertificateRequestType = Literal["origin-rsa", "origin-ecc", "keyless-certificate"] diff --git a/src/cloudflare/types/intel/attack_surface_report/product_param.py b/src/cloudflare/types/shared_params/sort_direction.py similarity index 54% rename from src/cloudflare/types/intel/attack_surface_report/product_param.py rename to src/cloudflare/types/shared_params/sort_direction.py index 430d17c2f52..083d4b43165 100644 --- a/src/cloudflare/types/intel/attack_surface_report/product_param.py +++ b/src/cloudflare/types/shared_params/sort_direction.py @@ -2,10 +2,8 @@ from __future__ import annotations -from typing import List +from typing_extensions import Literal -__all__ = ["ProductParamItem"] +__all__ = ["SortDirection"] -ProductParamItem = str - -ProductParam = List[str] +SortDirection = Literal["asc", "desc"] diff --git a/src/cloudflare/types/snippets/rule_update_params.py b/src/cloudflare/types/snippets/rule_update_params.py index d33769231d6..a539ccf8213 100644 --- a/src/cloudflare/types/snippets/rule_update_params.py +++ b/src/cloudflare/types/snippets/rule_update_params.py @@ -3,12 +3,15 @@ from __future__ import annotations from typing import Iterable -from typing_extensions import TypedDict +from typing_extensions import Required, TypedDict __all__ = ["RuleUpdateParams", "Rule"] class RuleUpdateParams(TypedDict, total=False): + zone_id: Required[str] + """Identifier""" + rules: Iterable[Rule] """List of snippet rules""" diff --git a/src/cloudflare/types/snippets/snippet_delete_response.py b/src/cloudflare/types/snippets/snippet_delete_response.py index 4d10682f00e..6a1b4806d1b 100644 --- a/src/cloudflare/types/snippets/snippet_delete_response.py +++ b/src/cloudflare/types/snippets/snippet_delete_response.py @@ -1,7 +1,18 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union +from typing import List +from typing_extensions import Literal + +from ..._models import BaseModel +from ..shared.response_info import ResponseInfo __all__ = ["SnippetDeleteResponse"] -SnippetDeleteResponse = Union[List[object], str, object] + +class SnippetDeleteResponse(BaseModel): + errors: List[ResponseInfo] + + messages: List[ResponseInfo] + + success: Literal[True] + """Whether the API call was successful""" diff --git a/src/cloudflare/types/snippets/snippet_update_params.py b/src/cloudflare/types/snippets/snippet_update_params.py index 4633aeb6967..7f1e3894a00 100644 --- a/src/cloudflare/types/snippets/snippet_update_params.py +++ b/src/cloudflare/types/snippets/snippet_update_params.py @@ -8,7 +8,7 @@ class SnippetUpdateParams(TypedDict, total=False): - zone_identifier: Required[str] + zone_id: Required[str] """Identifier""" files: str diff --git a/src/cloudflare/types/spectrum/__init__.py b/src/cloudflare/types/spectrum/__init__.py index a0c9f08e48a..3d53e86df56 100644 --- a/src/cloudflare/types/spectrum/__init__.py +++ b/src/cloudflare/types/spectrum/__init__.py @@ -12,7 +12,6 @@ from .app_get_response import AppGetResponse as AppGetResponse from .origin_dns_param import OriginDNSParam as OriginDNSParam from .app_create_params import AppCreateParams as AppCreateParams -from .app_delete_params import AppDeleteParams as AppDeleteParams from .app_update_params import AppUpdateParams as AppUpdateParams from .origin_port_param import OriginPortParam as OriginPortParam from .app_create_response import AppCreateResponse as AppCreateResponse diff --git a/src/cloudflare/types/spectrum/app_delete_params.py b/src/cloudflare/types/spectrum/app_delete_params.py deleted file mode 100644 index 9f31b197105..00000000000 --- a/src/cloudflare/types/spectrum/app_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["AppDeleteParams"] - - -class AppDeleteParams(TypedDict, total=False): - zone: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/speed/__init__.py b/src/cloudflare/types/speed/__init__.py index 4a31ccc0a91..8ee5e2e8845 100644 --- a/src/cloudflare/types/speed/__init__.py +++ b/src/cloudflare/types/speed/__init__.py @@ -2,22 +2,15 @@ from __future__ import annotations -from .test import Test as Test from .trend import Trend as Trend from .schedule import Schedule as Schedule from .availability import Availability as Availability from .labeled_region import LabeledRegion as LabeledRegion -from .schedule_param import ScheduleParam as ScheduleParam -from .test_list_params import TestListParams as TestListParams from .lighthouse_report import LighthouseReport as LighthouseReport +from .page_trend_params import PageTrendParams as PageTrendParams from .page_list_response import PageListResponse as PageListResponse -from .test_create_params import TestCreateParams as TestCreateParams -from .test_delete_params import TestDeleteParams as TestDeleteParams -from .test_list_response import TestListResponse as TestListResponse -from .speed_delete_params import SpeedDeleteParams as SpeedDeleteParams -from .test_delete_response import TestDeleteResponse as TestDeleteResponse -from .speed_delete_response import SpeedDeleteResponse as SpeedDeleteResponse +from .schedule_get_params import ScheduleGetParams as ScheduleGetParams from .schedule_create_params import ScheduleCreateParams as ScheduleCreateParams +from .schedule_delete_params import ScheduleDeleteParams as ScheduleDeleteParams from .schedule_create_response import ScheduleCreateResponse as ScheduleCreateResponse -from .speed_trends_list_params import SpeedTrendsListParams as SpeedTrendsListParams -from .speed_schedule_get_params import SpeedScheduleGetParams as SpeedScheduleGetParams +from .schedule_delete_response import ScheduleDeleteResponse as ScheduleDeleteResponse diff --git a/src/cloudflare/types/speed/page_list_response.py b/src/cloudflare/types/speed/page_list_response.py index e90c0dc3704..a6a058277b7 100644 --- a/src/cloudflare/types/speed/page_list_response.py +++ b/src/cloudflare/types/speed/page_list_response.py @@ -5,8 +5,8 @@ from pydantic import Field as FieldInfo -from .test import Test from ..._models import BaseModel +from .pages.test import Test from .labeled_region import LabeledRegion __all__ = ["PageListResponse"] diff --git a/src/cloudflare/types/speed/speed_trends_list_params.py b/src/cloudflare/types/speed/page_trend_params.py similarity index 94% rename from src/cloudflare/types/speed/speed_trends_list_params.py rename to src/cloudflare/types/speed/page_trend_params.py index 2af594b00dc..c3df698ca13 100644 --- a/src/cloudflare/types/speed/speed_trends_list_params.py +++ b/src/cloudflare/types/speed/page_trend_params.py @@ -8,10 +8,10 @@ from ..._utils import PropertyInfo -__all__ = ["SpeedTrendsListParams"] +__all__ = ["PageTrendParams"] -class SpeedTrendsListParams(TypedDict, total=False): +class PageTrendParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" diff --git a/src/cloudflare/types/speed/pages/__init__.py b/src/cloudflare/types/speed/pages/__init__.py new file mode 100644 index 00000000000..870ef29d6d4 --- /dev/null +++ b/src/cloudflare/types/speed/pages/__init__.py @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .test import Test as Test +from .test_list_params import TestListParams as TestListParams +from .test_create_params import TestCreateParams as TestCreateParams +from .test_delete_params import TestDeleteParams as TestDeleteParams +from .test_list_response import TestListResponse as TestListResponse +from .test_delete_response import TestDeleteResponse as TestDeleteResponse diff --git a/src/cloudflare/types/speed/test.py b/src/cloudflare/types/speed/pages/test.py similarity index 87% rename from src/cloudflare/types/speed/test.py rename to src/cloudflare/types/speed/pages/test.py index 7bb5951eb72..11667f87e5d 100644 --- a/src/cloudflare/types/speed/test.py +++ b/src/cloudflare/types/speed/pages/test.py @@ -6,9 +6,9 @@ from pydantic import Field as FieldInfo -from ..._models import BaseModel -from .labeled_region import LabeledRegion -from .lighthouse_report import LighthouseReport +from ...._models import BaseModel +from ..labeled_region import LabeledRegion +from ..lighthouse_report import LighthouseReport __all__ = ["Test"] diff --git a/src/cloudflare/types/speed/test_create_params.py b/src/cloudflare/types/speed/pages/test_create_params.py similarity index 100% rename from src/cloudflare/types/speed/test_create_params.py rename to src/cloudflare/types/speed/pages/test_create_params.py diff --git a/src/cloudflare/types/speed/test_delete_params.py b/src/cloudflare/types/speed/pages/test_delete_params.py similarity index 100% rename from src/cloudflare/types/speed/test_delete_params.py rename to src/cloudflare/types/speed/pages/test_delete_params.py diff --git a/src/cloudflare/types/speed/test_delete_response.py b/src/cloudflare/types/speed/pages/test_delete_response.py similarity index 89% rename from src/cloudflare/types/speed/test_delete_response.py rename to src/cloudflare/types/speed/pages/test_delete_response.py index 9e375ef09b7..728079ebc28 100644 --- a/src/cloudflare/types/speed/test_delete_response.py +++ b/src/cloudflare/types/speed/pages/test_delete_response.py @@ -2,7 +2,7 @@ from typing import Optional -from ..._models import BaseModel +from ...._models import BaseModel __all__ = ["TestDeleteResponse"] diff --git a/src/cloudflare/types/speed/test_list_params.py b/src/cloudflare/types/speed/pages/test_list_params.py similarity index 100% rename from src/cloudflare/types/speed/test_list_params.py rename to src/cloudflare/types/speed/pages/test_list_params.py diff --git a/src/cloudflare/types/speed/test_list_response.py b/src/cloudflare/types/speed/pages/test_list_response.py similarity index 87% rename from src/cloudflare/types/speed/test_list_response.py rename to src/cloudflare/types/speed/pages/test_list_response.py index 122df70f30f..7433af9070e 100644 --- a/src/cloudflare/types/speed/test_list_response.py +++ b/src/cloudflare/types/speed/pages/test_list_response.py @@ -2,8 +2,8 @@ from typing import List, Optional -from ..._models import BaseModel -from ..shared.response_info import ResponseInfo +from ...._models import BaseModel +from ...shared.response_info import ResponseInfo __all__ = ["TestListResponse", "ResultInfo"] diff --git a/src/cloudflare/types/speed/schedule_create_response.py b/src/cloudflare/types/speed/schedule_create_response.py index 50ef4d668ed..5fe02042ea6 100644 --- a/src/cloudflare/types/speed/schedule_create_response.py +++ b/src/cloudflare/types/speed/schedule_create_response.py @@ -2,9 +2,9 @@ from typing import Optional -from .test import Test from .schedule import Schedule from ..._models import BaseModel +from .pages.test import Test __all__ = ["ScheduleCreateResponse"] diff --git a/src/cloudflare/types/speed/speed_schedule_get_params.py b/src/cloudflare/types/speed/schedule_delete_params.py similarity index 89% rename from src/cloudflare/types/speed/speed_schedule_get_params.py rename to src/cloudflare/types/speed/schedule_delete_params.py index 403ed349a61..4ac243958a3 100644 --- a/src/cloudflare/types/speed/speed_schedule_get_params.py +++ b/src/cloudflare/types/speed/schedule_delete_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["SpeedScheduleGetParams"] +__all__ = ["ScheduleDeleteParams"] -class SpeedScheduleGetParams(TypedDict, total=False): +class ScheduleDeleteParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" diff --git a/src/cloudflare/types/speed/speed_delete_response.py b/src/cloudflare/types/speed/schedule_delete_response.py similarity index 74% rename from src/cloudflare/types/speed/speed_delete_response.py rename to src/cloudflare/types/speed/schedule_delete_response.py index 71d39113616..1449d733066 100644 --- a/src/cloudflare/types/speed/speed_delete_response.py +++ b/src/cloudflare/types/speed/schedule_delete_response.py @@ -4,9 +4,9 @@ from ..._models import BaseModel -__all__ = ["SpeedDeleteResponse"] +__all__ = ["ScheduleDeleteResponse"] -class SpeedDeleteResponse(BaseModel): +class ScheduleDeleteResponse(BaseModel): count: Optional[float] = None """Number of items affected.""" diff --git a/src/cloudflare/types/speed/speed_delete_params.py b/src/cloudflare/types/speed/schedule_get_params.py similarity index 90% rename from src/cloudflare/types/speed/speed_delete_params.py rename to src/cloudflare/types/speed/schedule_get_params.py index 130cab3ecd4..e9c75fdf435 100644 --- a/src/cloudflare/types/speed/speed_delete_params.py +++ b/src/cloudflare/types/speed/schedule_get_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["SpeedDeleteParams"] +__all__ = ["ScheduleGetParams"] -class SpeedDeleteParams(TypedDict, total=False): +class ScheduleGetParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" diff --git a/src/cloudflare/types/speed/schedule_param.py b/src/cloudflare/types/speed/schedule_param.py deleted file mode 100644 index 0b2f7bb2059..00000000000 --- a/src/cloudflare/types/speed/schedule_param.py +++ /dev/null @@ -1,40 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, TypedDict - -__all__ = ["ScheduleParam"] - - -class ScheduleParam(TypedDict, total=False): - frequency: Literal["DAILY", "WEEKLY"] - """The frequency of the test.""" - - region: Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ] - """A test region.""" - - url: str - """A URL.""" diff --git a/src/cloudflare/types/ssl/__init__.py b/src/cloudflare/types/ssl/__init__.py index 6fce3a9b641..6734fbac734 100644 --- a/src/cloudflare/types/ssl/__init__.py +++ b/src/cloudflare/types/ssl/__init__.py @@ -3,7 +3,10 @@ from __future__ import annotations from .host import Host as Host +from .status import Status as Status from .verification import Verification as Verification +from .request_validity import RequestValidity as RequestValidity +from .validation_method import ValidationMethod as ValidationMethod from .analyze_create_params import AnalyzeCreateParams as AnalyzeCreateParams from .analyze_create_response import AnalyzeCreateResponse as AnalyzeCreateResponse from .verification_get_params import VerificationGetParams as VerificationGetParams @@ -14,6 +17,5 @@ from .certificate_pack_edit_params import CertificatePackEditParams as CertificatePackEditParams from .certificate_pack_list_params import CertificatePackListParams as CertificatePackListParams from .certificate_pack_get_response import CertificatePackGetResponse as CertificatePackGetResponse -from .certificate_pack_delete_params import CertificatePackDeleteParams as CertificatePackDeleteParams from .certificate_pack_edit_response import CertificatePackEditResponse as CertificatePackEditResponse from .certificate_pack_delete_response import CertificatePackDeleteResponse as CertificatePackDeleteResponse diff --git a/src/cloudflare/types/ssl/certificate_pack_delete_params.py b/src/cloudflare/types/ssl/certificate_pack_delete_params.py deleted file mode 100644 index ccd358d487f..00000000000 --- a/src/cloudflare/types/ssl/certificate_pack_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["CertificatePackDeleteParams"] - - -class CertificatePackDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/ssl/certificate_pack_edit_response.py b/src/cloudflare/types/ssl/certificate_pack_edit_response.py index 2b9475f83c5..545348d5b33 100644 --- a/src/cloudflare/types/ssl/certificate_pack_edit_response.py +++ b/src/cloudflare/types/ssl/certificate_pack_edit_response.py @@ -4,6 +4,7 @@ from typing_extensions import Literal from .host import Host +from .status import Status from ..._models import BaseModel __all__ = ["CertificatePackEditResponse"] @@ -33,31 +34,7 @@ class CertificatePackEditResponse(BaseModel): empty. """ - status: Optional[ - Literal[ - "initializing", - "pending_validation", - "deleted", - "pending_issuance", - "pending_deployment", - "pending_deletion", - "pending_expiration", - "expired", - "active", - "initializing_timed_out", - "validation_timed_out", - "issuance_timed_out", - "deployment_timed_out", - "deletion_timed_out", - "pending_cleanup", - "staging_deployment", - "staging_active", - "deactivating", - "inactive", - "backup_issued", - "holding_deployment", - ] - ] = None + status: Optional[Status] = None """Status of certificate pack.""" type: Optional[Literal["advanced"]] = None diff --git a/src/cloudflare/types/ssl/certificate_packs/order_create_response.py b/src/cloudflare/types/ssl/certificate_packs/order_create_response.py index e0c4d08946a..2f95bb27fc1 100644 --- a/src/cloudflare/types/ssl/certificate_packs/order_create_response.py +++ b/src/cloudflare/types/ssl/certificate_packs/order_create_response.py @@ -4,6 +4,7 @@ from typing_extensions import Literal from ..host import Host +from ..status import Status from ...._models import BaseModel __all__ = ["OrderCreateResponse"] @@ -33,31 +34,7 @@ class OrderCreateResponse(BaseModel): empty. """ - status: Optional[ - Literal[ - "initializing", - "pending_validation", - "deleted", - "pending_issuance", - "pending_deployment", - "pending_deletion", - "pending_expiration", - "expired", - "active", - "initializing_timed_out", - "validation_timed_out", - "issuance_timed_out", - "deployment_timed_out", - "deletion_timed_out", - "pending_cleanup", - "staging_deployment", - "staging_active", - "deactivating", - "inactive", - "backup_issued", - "holding_deployment", - ] - ] = None + status: Optional[Status] = None """Status of certificate pack.""" type: Optional[Literal["advanced"]] = None diff --git a/src/cloudflare/types/ssl/request_validity.py b/src/cloudflare/types/ssl/request_validity.py new file mode 100644 index 00000000000..bbacbc27cd1 --- /dev/null +++ b/src/cloudflare/types/ssl/request_validity.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["RequestValidity"] + +RequestValidity = Literal[7, 30, 90, 365, 730, 1095, 5475] diff --git a/src/cloudflare/types/ssl/status.py b/src/cloudflare/types/ssl/status.py new file mode 100644 index 00000000000..aac3d6b759b --- /dev/null +++ b/src/cloudflare/types/ssl/status.py @@ -0,0 +1,29 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["Status"] + +Status = Literal[ + "initializing", + "pending_validation", + "deleted", + "pending_issuance", + "pending_deployment", + "pending_deletion", + "pending_expiration", + "expired", + "active", + "initializing_timed_out", + "validation_timed_out", + "issuance_timed_out", + "deployment_timed_out", + "deletion_timed_out", + "pending_cleanup", + "staging_deployment", + "staging_active", + "deactivating", + "inactive", + "backup_issued", + "holding_deployment", +] diff --git a/src/cloudflare/types/ssl/validation_method.py b/src/cloudflare/types/ssl/validation_method.py new file mode 100644 index 00000000000..f7aae0fdcd3 --- /dev/null +++ b/src/cloudflare/types/ssl/validation_method.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["ValidationMethod"] + +ValidationMethod = Literal["http", "cname", "txt"] diff --git a/src/cloudflare/types/ssl/verification.py b/src/cloudflare/types/ssl/verification.py index deae77ca45f..3c917bd9955 100644 --- a/src/cloudflare/types/ssl/verification.py +++ b/src/cloudflare/types/ssl/verification.py @@ -4,6 +4,7 @@ from typing_extensions import Literal from ..._models import BaseModel +from .validation_method import ValidationMethod __all__ = ["Verification", "VerificationInfo"] @@ -31,7 +32,7 @@ class Verification(BaseModel): signature: Optional[Literal["ECDSAWithSHA256", "SHA1WithRSA", "SHA256WithRSA"]] = None """Certificate's signature algorithm.""" - validation_method: Optional[Literal["http", "cname", "txt"]] = None + validation_method: Optional[ValidationMethod] = None """Validation method in use for a certificate pack order.""" verification_info: Optional[VerificationInfo] = None diff --git a/src/cloudflare/types/stream/__init__.py b/src/cloudflare/types/stream/__init__.py index f9400109986..d2cc2a2aed1 100644 --- a/src/cloudflare/types/stream/__init__.py +++ b/src/cloudflare/types/stream/__init__.py @@ -12,7 +12,6 @@ from .allowed_origins import AllowedOrigins as AllowedOrigins from .key_get_response import KeyGetResponse as KeyGetResponse from .key_create_params import KeyCreateParams as KeyCreateParams -from .key_delete_params import KeyDeleteParams as KeyDeleteParams from .clip_create_params import ClipCreateParams as ClipCreateParams from .copy_create_params import CopyCreateParams as CopyCreateParams from .embed_get_response import EmbedGetResponse as EmbedGetResponse @@ -21,25 +20,21 @@ from .token_create_params import TokenCreateParams as TokenCreateParams from .caption_get_response import CaptionGetResponse as CaptionGetResponse from .stream_create_params import StreamCreateParams as StreamCreateParams -from .stream_delete_params import StreamDeleteParams as StreamDeleteParams from .webhook_get_response import WebhookGetResponse as WebhookGetResponse from .download_get_response import DownloadGetResponse as DownloadGetResponse from .token_create_response import TokenCreateResponse as TokenCreateResponse -from .webhook_delete_params import WebhookDeleteParams as WebhookDeleteParams from .webhook_update_params import WebhookUpdateParams as WebhookUpdateParams from .download_create_params import DownloadCreateParams as DownloadCreateParams from .live_input_list_params import LiveInputListParams as LiveInputListParams from .audio_track_copy_params import AudioTrackCopyParams as AudioTrackCopyParams from .audio_track_edit_params import AudioTrackEditParams as AudioTrackEditParams from .watermark_create_params import WatermarkCreateParams as WatermarkCreateParams -from .watermark_delete_params import WatermarkDeleteParams as WatermarkDeleteParams from .webhook_delete_response import WebhookDeleteResponse as WebhookDeleteResponse from .webhook_update_response import WebhookUpdateResponse as WebhookUpdateResponse from .audio_track_get_response import AudioTrackGetResponse as AudioTrackGetResponse from .download_create_response import DownloadCreateResponse as DownloadCreateResponse from .download_delete_response import DownloadDeleteResponse as DownloadDeleteResponse from .live_input_create_params import LiveInputCreateParams as LiveInputCreateParams -from .live_input_delete_params import LiveInputDeleteParams as LiveInputDeleteParams from .live_input_list_response import LiveInputListResponse as LiveInputListResponse from .live_input_update_params import LiveInputUpdateParams as LiveInputUpdateParams from .watermark_delete_response import WatermarkDeleteResponse as WatermarkDeleteResponse diff --git a/src/cloudflare/types/stream/captions/__init__.py b/src/cloudflare/types/stream/captions/__init__.py index f34bcc36978..412e8beb9f9 100644 --- a/src/cloudflare/types/stream/captions/__init__.py +++ b/src/cloudflare/types/stream/captions/__init__.py @@ -2,6 +2,5 @@ from __future__ import annotations -from .language_delete_params import LanguageDeleteParams as LanguageDeleteParams from .language_update_params import LanguageUpdateParams as LanguageUpdateParams from .language_delete_response import LanguageDeleteResponse as LanguageDeleteResponse diff --git a/src/cloudflare/types/stream/captions/language_delete_params.py b/src/cloudflare/types/stream/captions/language_delete_params.py deleted file mode 100644 index 348f01f68e0..00000000000 --- a/src/cloudflare/types/stream/captions/language_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["LanguageDeleteParams"] - - -class LanguageDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - identifier: Required[str] - """A Cloudflare-generated unique identifier for a media item.""" - - body: Required[object] diff --git a/src/cloudflare/types/stream/key_delete_params.py b/src/cloudflare/types/stream/key_delete_params.py deleted file mode 100644 index d4e21761a90..00000000000 --- a/src/cloudflare/types/stream/key_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["KeyDeleteParams"] - - -class KeyDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/stream/live_input_delete_params.py b/src/cloudflare/types/stream/live_input_delete_params.py deleted file mode 100644 index 7677bd9f9ed..00000000000 --- a/src/cloudflare/types/stream/live_input_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["LiveInputDeleteParams"] - - -class LiveInputDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/stream/live_inputs/__init__.py b/src/cloudflare/types/stream/live_inputs/__init__.py index e8063b8b859..95307755244 100644 --- a/src/cloudflare/types/stream/live_inputs/__init__.py +++ b/src/cloudflare/types/stream/live_inputs/__init__.py @@ -4,5 +4,4 @@ from .output import Output as Output from .output_create_params import OutputCreateParams as OutputCreateParams -from .output_delete_params import OutputDeleteParams as OutputDeleteParams from .output_update_params import OutputUpdateParams as OutputUpdateParams diff --git a/src/cloudflare/types/stream/live_inputs/output_delete_params.py b/src/cloudflare/types/stream/live_inputs/output_delete_params.py deleted file mode 100644 index 83c119db571..00000000000 --- a/src/cloudflare/types/stream/live_inputs/output_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["OutputDeleteParams"] - - -class OutputDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - live_input_identifier: Required[str] - """A unique identifier for a live input.""" - - body: Required[object] diff --git a/src/cloudflare/types/stream/stream_delete_params.py b/src/cloudflare/types/stream/stream_delete_params.py deleted file mode 100644 index dd5ef8cbb5d..00000000000 --- a/src/cloudflare/types/stream/stream_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["StreamDeleteParams"] - - -class StreamDeleteParams(TypedDict, total=False): - account_id: Required[str] - """The account identifier tag.""" - - body: Required[object] diff --git a/src/cloudflare/types/stream/watermark_delete_params.py b/src/cloudflare/types/stream/watermark_delete_params.py deleted file mode 100644 index 5fc8a672ea1..00000000000 --- a/src/cloudflare/types/stream/watermark_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["WatermarkDeleteParams"] - - -class WatermarkDeleteParams(TypedDict, total=False): - account_id: Required[str] - """The account identifier tag.""" - - body: Required[object] diff --git a/src/cloudflare/types/stream/webhook_delete_params.py b/src/cloudflare/types/stream/webhook_delete_params.py deleted file mode 100644 index 63b392c9146..00000000000 --- a/src/cloudflare/types/stream/webhook_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["WebhookDeleteParams"] - - -class WebhookDeleteParams(TypedDict, total=False): - account_id: Required[str] - """The account identifier tag.""" - - body: Required[object] diff --git a/src/cloudflare/types/subscriptions/__init__.py b/src/cloudflare/types/subscriptions/__init__.py index 662a2dae32c..82a9f1efdb6 100644 --- a/src/cloudflare/types/subscriptions/__init__.py +++ b/src/cloudflare/types/subscriptions/__init__.py @@ -4,7 +4,6 @@ from .subscription_get_response import SubscriptionGetResponse as SubscriptionGetResponse from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams -from .subscription_delete_params import SubscriptionDeleteParams as SubscriptionDeleteParams from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse from .subscription_delete_response import SubscriptionDeleteResponse as SubscriptionDeleteResponse diff --git a/src/cloudflare/types/subscriptions/subscription_delete_params.py b/src/cloudflare/types/subscriptions/subscription_delete_params.py deleted file mode 100644 index 9fb12eee32c..00000000000 --- a/src/cloudflare/types/subscriptions/subscription_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["SubscriptionDeleteParams"] - - -class SubscriptionDeleteParams(TypedDict, total=False): - account_identifier: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/url_scanner/url_scanner_scan_params.py b/src/cloudflare/types/url_scanner/url_scanner_scan_params.py index 3c7a9527f47..76879316d3e 100644 --- a/src/cloudflare/types/url_scanner/url_scanner_scan_params.py +++ b/src/cloudflare/types/url_scanner/url_scanner_scan_params.py @@ -46,16 +46,18 @@ class URLScannerScanParams(TypedDict, total=False): """Filter scans by main page Autonomous System Number (ASN).""" page_hostname: str - """Filter scans by main page hostname .""" + """Filter scans by main page hostname (domain of effective URL).""" page_ip: str """Filter scans by main page IP address (IPv4 or IPv6).""" page_path: str - """Filter scans by exact match URL path (also supports suffix search).""" + """ + Filter scans by exact match of effective URL path (also supports suffix search). + """ page_url: str - """Filter scans by exact match to scanned URL (_after redirects_)""" + """Filter scans by submitted or scanned URL""" path: str """Filter scans by url path of _any_ request made by the webpage.""" @@ -64,4 +66,4 @@ class URLScannerScanParams(TypedDict, total=False): """Scan uuid""" url: str - """Filter scans by exact match URL of _any_ request made by the webpage""" + """Filter scans by URL of _any_ request made by the webpage""" diff --git a/src/cloudflare/types/user/__init__.py b/src/cloudflare/types/user/__init__.py index 357891efc5e..986ee04d241 100644 --- a/src/cloudflare/types/user/__init__.py +++ b/src/cloudflare/types/user/__init__.py @@ -3,7 +3,6 @@ from __future__ import annotations from .invite import Invite as Invite -from .policy import Policy as Policy from .cidr_list import CIDRList as CIDRList from .rate_plan import RatePlan as RatePlan from .organization import Organization as Organization @@ -19,7 +18,6 @@ from .user_edit_response import UserEditResponse as UserEditResponse from .invite_get_response import InviteGetResponse as InviteGetResponse from .token_create_params import TokenCreateParams as TokenCreateParams -from .token_delete_params import TokenDeleteParams as TokenDeleteParams from .token_update_params import TokenUpdateParams as TokenUpdateParams from .invite_edit_response import InviteEditResponse as InviteEditResponse from .audit_log_list_params import AuditLogListParams as AuditLogListParams @@ -33,8 +31,6 @@ from .subscription_edit_params import SubscriptionEditParams as SubscriptionEditParams from .organization_get_response import OrganizationGetResponse as OrganizationGetResponse from .subscription_get_response import SubscriptionGetResponse as SubscriptionGetResponse -from .organization_delete_params import OrganizationDeleteParams as OrganizationDeleteParams -from .subscription_delete_params import SubscriptionDeleteParams as SubscriptionDeleteParams from .subscription_edit_response import SubscriptionEditResponse as SubscriptionEditResponse from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams from .organization_delete_response import OrganizationDeleteResponse as OrganizationDeleteResponse diff --git a/src/cloudflare/types/user/organization.py b/src/cloudflare/types/user/organization.py index 1db4388d7de..6c1aa83f02d 100644 --- a/src/cloudflare/types/user/organization.py +++ b/src/cloudflare/types/user/organization.py @@ -1,9 +1,9 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional -from typing_extensions import Literal from ..._models import BaseModel +from ..accounts.status import Status from ..shared.permission import Permission __all__ = ["Organization"] @@ -22,5 +22,5 @@ class Organization(BaseModel): roles: Optional[List[str]] = None """List of roles that a user has within an organization.""" - status: Optional[Literal["member", "invited"]] = None + status: Optional[Status] = None """Whether the user is a member of the organization or has an inivitation pending.""" diff --git a/src/cloudflare/types/user/organization_delete_params.py b/src/cloudflare/types/user/organization_delete_params.py deleted file mode 100644 index 0344f7e4d9a..00000000000 --- a/src/cloudflare/types/user/organization_delete_params.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["OrganizationDeleteParams"] - - -class OrganizationDeleteParams(TypedDict, total=False): - body: Required[object] diff --git a/src/cloudflare/types/user/policy.py b/src/cloudflare/types/user/policy.py deleted file mode 100644 index 02bb3290430..00000000000 --- a/src/cloudflare/types/user/policy.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["Policy", "PermissionGroup"] - - -class PermissionGroup(BaseModel): - id: str - """Identifier of the group.""" - - name: Optional[str] = None - """Name of the group.""" - - -class Policy(BaseModel): - id: str - """Policy identifier.""" - - effect: Literal["allow", "deny"] - """Allow or deny operations against the resources.""" - - permission_groups: List[PermissionGroup] - """A set of permission groups that are specified to the policy.""" - - resources: object - """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/user/subscription_delete_params.py b/src/cloudflare/types/user/subscription_delete_params.py deleted file mode 100644 index 1f60057b206..00000000000 --- a/src/cloudflare/types/user/subscription_delete_params.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["SubscriptionDeleteParams"] - - -class SubscriptionDeleteParams(TypedDict, total=False): - body: Required[object] diff --git a/src/cloudflare/types/user/token_delete_params.py b/src/cloudflare/types/user/token_delete_params.py deleted file mode 100644 index 6b9d4f8abef..00000000000 --- a/src/cloudflare/types/user/token_delete_params.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["TokenDeleteParams"] - - -class TokenDeleteParams(TypedDict, total=False): - body: Required[object] diff --git a/src/cloudflare/types/user/token_delete_response.py b/src/cloudflare/types/user/token_delete_response.py index 2229135e433..bcf86ebe198 100644 --- a/src/cloudflare/types/user/token_delete_response.py +++ b/src/cloudflare/types/user/token_delete_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["TokenDeleteResponse"] diff --git a/src/cloudflare/types/waiting_rooms/__init__.py b/src/cloudflare/types/waiting_rooms/__init__.py index 28092b72bf5..c6c280c212e 100644 --- a/src/cloudflare/types/waiting_rooms/__init__.py +++ b/src/cloudflare/types/waiting_rooms/__init__.py @@ -3,7 +3,6 @@ from __future__ import annotations from .event import Event as Event -from .setting import Setting as Setting from .waiting_room import WaitingRoom as WaitingRoom from .rule_edit_params import RuleEditParams as RuleEditParams from .additional_routes import AdditionalRoutes as AdditionalRoutes @@ -12,11 +11,9 @@ from .event_list_params import EventListParams as EventListParams from .waiting_room_rule import WaitingRoomRule as WaitingRoomRule from .rule_create_params import RuleCreateParams as RuleCreateParams -from .rule_delete_params import RuleDeleteParams as RuleDeleteParams from .rule_edit_response import RuleEditResponse as RuleEditResponse from .rule_update_params import RuleUpdateParams as RuleUpdateParams from .event_create_params import EventCreateParams as EventCreateParams -from .event_delete_params import EventDeleteParams as EventDeleteParams from .event_update_params import EventUpdateParams as EventUpdateParams from .page_preview_params import PagePreviewParams as PagePreviewParams from .setting_edit_params import SettingEditParams as SettingEditParams @@ -35,6 +32,5 @@ from .waiting_room_edit_params import WaitingRoomEditParams as WaitingRoomEditParams from .waiting_room_list_params import WaitingRoomListParams as WaitingRoomListParams from .waiting_room_create_params import WaitingRoomCreateParams as WaitingRoomCreateParams -from .waiting_room_delete_params import WaitingRoomDeleteParams as WaitingRoomDeleteParams from .waiting_room_update_params import WaitingRoomUpdateParams as WaitingRoomUpdateParams from .waiting_room_delete_response import WaitingRoomDeleteResponse as WaitingRoomDeleteResponse diff --git a/src/cloudflare/types/waiting_rooms/event_delete_params.py b/src/cloudflare/types/waiting_rooms/event_delete_params.py deleted file mode 100644 index 785cbedc49a..00000000000 --- a/src/cloudflare/types/waiting_rooms/event_delete_params.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["EventDeleteParams"] - - -class EventDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - waiting_room_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/waiting_rooms/rule_delete_params.py b/src/cloudflare/types/waiting_rooms/rule_delete_params.py deleted file mode 100644 index 34c03b42387..00000000000 --- a/src/cloudflare/types/waiting_rooms/rule_delete_params.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["RuleDeleteParams"] - - -class RuleDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - waiting_room_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/waiting_rooms/setting.py b/src/cloudflare/types/waiting_rooms/setting.py deleted file mode 100644 index 62555a567ef..00000000000 --- a/src/cloudflare/types/waiting_rooms/setting.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from ..._models import BaseModel - -__all__ = ["Setting"] - - -class Setting(BaseModel): - search_engine_crawler_bypass: bool - """ - Whether to allow verified search engine crawlers to bypass all waiting rooms on - this zone. Verified search engine crawlers will not be tracked or counted by the - waiting room system, and will not appear in waiting room analytics. - """ diff --git a/src/cloudflare/types/waiting_rooms/setting_edit_response.py b/src/cloudflare/types/waiting_rooms/setting_edit_response.py index 26f3670ed99..bae5f32f498 100644 --- a/src/cloudflare/types/waiting_rooms/setting_edit_response.py +++ b/src/cloudflare/types/waiting_rooms/setting_edit_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["SettingEditResponse"] diff --git a/src/cloudflare/types/waiting_rooms/setting_get_response.py b/src/cloudflare/types/waiting_rooms/setting_get_response.py index 098bb2df1ed..1f349caa00f 100644 --- a/src/cloudflare/types/waiting_rooms/setting_get_response.py +++ b/src/cloudflare/types/waiting_rooms/setting_get_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["SettingGetResponse"] diff --git a/src/cloudflare/types/waiting_rooms/setting_update_response.py b/src/cloudflare/types/waiting_rooms/setting_update_response.py index e613bcf0f93..756f6b7045d 100644 --- a/src/cloudflare/types/waiting_rooms/setting_update_response.py +++ b/src/cloudflare/types/waiting_rooms/setting_update_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["SettingUpdateResponse"] diff --git a/src/cloudflare/types/waiting_rooms/waiting_room_delete_params.py b/src/cloudflare/types/waiting_rooms/waiting_room_delete_params.py deleted file mode 100644 index 3db5c55c43d..00000000000 --- a/src/cloudflare/types/waiting_rooms/waiting_room_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["WaitingRoomDeleteParams"] - - -class WaitingRoomDeleteParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/warp_connector/__init__.py b/src/cloudflare/types/warp_connector/__init__.py index 9fbbe448c87..26ce695dbce 100644 --- a/src/cloudflare/types/warp_connector/__init__.py +++ b/src/cloudflare/types/warp_connector/__init__.py @@ -6,7 +6,6 @@ from .warp_connector_list_params import WARPConnectorListParams as WARPConnectorListParams from .warp_connector_get_response import WARPConnectorGetResponse as WARPConnectorGetResponse from .warp_connector_create_params import WARPConnectorCreateParams as WARPConnectorCreateParams -from .warp_connector_delete_params import WARPConnectorDeleteParams as WARPConnectorDeleteParams from .warp_connector_edit_response import WARPConnectorEditResponse as WARPConnectorEditResponse from .warp_connector_list_response import WARPConnectorListResponse as WARPConnectorListResponse from .warp_connector_token_response import WARPConnectorTokenResponse as WARPConnectorTokenResponse diff --git a/src/cloudflare/types/warp_connector/warp_connector_delete_params.py b/src/cloudflare/types/warp_connector/warp_connector_delete_params.py deleted file mode 100644 index 27bd820f545..00000000000 --- a/src/cloudflare/types/warp_connector/warp_connector_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["WARPConnectorDeleteParams"] - - -class WARPConnectorDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Cloudflare account ID""" - - body: Required[object] diff --git a/src/cloudflare/types/web3/__init__.py b/src/cloudflare/types/web3/__init__.py index 4cf398f3222..020395070ff 100644 --- a/src/cloudflare/types/web3/__init__.py +++ b/src/cloudflare/types/web3/__init__.py @@ -3,8 +3,6 @@ from __future__ import annotations from .hostname import Hostname as Hostname -from .hostname_param import HostnameParam as HostnameParam from .hostname_edit_params import HostnameEditParams as HostnameEditParams from .hostname_create_params import HostnameCreateParams as HostnameCreateParams -from .hostname_delete_params import HostnameDeleteParams as HostnameDeleteParams from .hostname_delete_response import HostnameDeleteResponse as HostnameDeleteResponse diff --git a/src/cloudflare/types/web3/hostname_delete_params.py b/src/cloudflare/types/web3/hostname_delete_params.py deleted file mode 100644 index 2ca89e1cf67..00000000000 --- a/src/cloudflare/types/web3/hostname_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["HostnameDeleteParams"] - - -class HostnameDeleteParams(TypedDict, total=False): - zone_identifier: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/web3/hostname_delete_response.py b/src/cloudflare/types/web3/hostname_delete_response.py index 7a3f3c4094e..44db180c19c 100644 --- a/src/cloudflare/types/web3/hostname_delete_response.py +++ b/src/cloudflare/types/web3/hostname_delete_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["HostnameDeleteResponse"] diff --git a/src/cloudflare/types/web3/hostname_param.py b/src/cloudflare/types/web3/hostname_param.py deleted file mode 100644 index 87d4041607d..00000000000 --- a/src/cloudflare/types/web3/hostname_param.py +++ /dev/null @@ -1,18 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, TypedDict - -__all__ = ["HostnameParam"] - - -class HostnameParam(TypedDict, total=False): - description: str - """An optional description of the hostname.""" - - dnslink: str - """DNSLink value used if the target is ipfs.""" - - target: Literal["ethereum", "ipfs", "ipfs_universal_path"] - """Target gateway of the hostname.""" diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/__init__.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/__init__.py index e28878b6b70..af858392ae3 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/__init__.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/__init__.py @@ -4,7 +4,6 @@ from .entry_get_response import EntryGetResponse as EntryGetResponse from .entry_create_params import EntryCreateParams as EntryCreateParams -from .entry_delete_params import EntryDeleteParams as EntryDeleteParams from .entry_list_response import EntryListResponse as EntryListResponse from .entry_update_params import EntryUpdateParams as EntryUpdateParams from .entry_create_response import EntryCreateResponse as EntryCreateResponse diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_params.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_params.py deleted file mode 100644 index 1a69c5ee227..00000000000 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["EntryDeleteParams"] - - -class EntryDeleteParams(TypedDict, total=False): - zone_identifier: Required[str] - """Identifier""" - - identifier: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_response.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_response.py index 06acd440f41..12b15777367 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_response.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_delete_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ......_models import BaseModel __all__ = ["EntryDeleteResponse"] diff --git a/src/cloudflare/types/workers/__init__.py b/src/cloudflare/types/workers/__init__.py index 0a1b7dabef1..6e066a47460 100644 --- a/src/cloudflare/types/workers/__init__.py +++ b/src/cloudflare/types/workers/__init__.py @@ -18,7 +18,6 @@ from .mtls_cert_binding import MTLSCERTBinding as MTLSCERTBinding from .stepped_migration import SteppedMigration as SteppedMigration from .domain_list_params import DomainListParams as DomainListParams -from .domain_delete_params import DomainDeleteParams as DomainDeleteParams from .domain_update_params import DomainUpdateParams as DomainUpdateParams from .kv_namespace_binding import KVNamespaceBinding as KVNamespaceBinding from .migration_step_param import MigrationStepParam as MigrationStepParam diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 888e17d7d99..b06bf72cc7a 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -62,13 +62,13 @@ class TextEmbeddings(TypedDict, total=False): class SpeechRecognition(TypedDict, total=False): account_id: Required[str] - audio: Iterable[float] + audio: Required[Iterable[float]] class ImageClassification(TypedDict, total=False): account_id: Required[str] - image: Iterable[float] + image: Required[Iterable[float]] class ObjectDetection(TypedDict, total=False): diff --git a/src/cloudflare/types/workers/domain_delete_params.py b/src/cloudflare/types/workers/domain_delete_params.py deleted file mode 100644 index 59d634fdbef..00000000000 --- a/src/cloudflare/types/workers/domain_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["DomainDeleteParams"] - - -class DomainDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/workers/mtls_cert_binding.py b/src/cloudflare/types/workers/mtls_cert_binding.py index ce77744c7c7..cdc8618cefb 100644 --- a/src/cloudflare/types/workers/mtls_cert_binding.py +++ b/src/cloudflare/types/workers/mtls_cert_binding.py @@ -9,8 +9,6 @@ class MTLSCERTBinding(BaseModel): - certificate: object - name: str """A JavaScript variable name for the binding.""" diff --git a/src/cloudflare/types/workers/mtls_cert_binding_param.py b/src/cloudflare/types/workers/mtls_cert_binding_param.py index e6d8c865b55..945050492c8 100644 --- a/src/cloudflare/types/workers/mtls_cert_binding_param.py +++ b/src/cloudflare/types/workers/mtls_cert_binding_param.py @@ -8,8 +8,6 @@ class MTLSCERTBindingParam(TypedDict, total=False): - certificate: Required[object] - type: Required[Literal["mtls_certificate"]] """The class of resource that the binding provides.""" diff --git a/src/cloudflare/types/workers/script_delete_params.py b/src/cloudflare/types/workers/script_delete_params.py index 0766c499c83..1d8d872feca 100644 --- a/src/cloudflare/types/workers/script_delete_params.py +++ b/src/cloudflare/types/workers/script_delete_params.py @@ -11,8 +11,6 @@ class ScriptDeleteParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - body: Required[object] - force: bool """ If set to true, delete will not be stopped by associated service binding, diff --git a/src/cloudflare/types/workers/scripts/__init__.py b/src/cloudflare/types/workers/scripts/__init__.py index dca9f8b1963..233a054aa7a 100644 --- a/src/cloudflare/types/workers/scripts/__init__.py +++ b/src/cloudflare/types/workers/scripts/__init__.py @@ -4,12 +4,10 @@ from .schedule import Schedule as Schedule from .deployment import Deployment as Deployment -from .schedule_param import ScheduleParam as ScheduleParam from .consumer_script import ConsumerScript as ConsumerScript from .deployment_param import DeploymentParam as DeploymentParam from .tail_get_response import TailGetResponse as TailGetResponse from .tail_create_params import TailCreateParams as TailCreateParams -from .tail_delete_params import TailDeleteParams as TailDeleteParams from .setting_edit_params import SettingEditParams as SettingEditParams from .tail_create_response import TailCreateResponse as TailCreateResponse from .tail_delete_response import TailDeleteResponse as TailDeleteResponse diff --git a/src/cloudflare/types/workers/scripts/schedule_param.py b/src/cloudflare/types/workers/scripts/schedule_param.py deleted file mode 100644 index 5054e6e4f94..00000000000 --- a/src/cloudflare/types/workers/scripts/schedule_param.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import TypedDict - -__all__ = ["ScheduleParam"] - - -class ScheduleParam(TypedDict, total=False): - pass diff --git a/src/cloudflare/types/workers/scripts/tail_delete_params.py b/src/cloudflare/types/workers/scripts/tail_delete_params.py deleted file mode 100644 index 7b10be84f1b..00000000000 --- a/src/cloudflare/types/workers/scripts/tail_delete_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["TailDeleteParams"] - - -class TailDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - script_name: Required[str] - """Name of the script, used in URLs and route configuration.""" - - body: Required[object] diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_delete_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_delete_params.py index 7e319272717..4ab2a41fd37 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_delete_params.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_delete_params.py @@ -14,8 +14,6 @@ class ScriptDeleteParams(TypedDict, total=False): dispatch_namespace: Required[str] """Name of the Workers for Platforms dispatch namespace.""" - body: Required[object] - force: bool """ If set to true, delete will not be stopped by associated service binding, diff --git a/src/cloudflare/types/zero_trust/__init__.py b/src/cloudflare/types/zero_trust/__init__.py index 733d9109806..fe2de93ed13 100644 --- a/src/cloudflare/types/zero_trust/__init__.py +++ b/src/cloudflare/types/zero_trust/__init__.py @@ -45,7 +45,6 @@ from .tunnel_get_response import TunnelGetResponse as TunnelGetResponse from .generic_oauth_config import GenericOAuthConfig as GenericOAuthConfig from .tunnel_create_params import TunnelCreateParams as TunnelCreateParams -from .tunnel_delete_params import TunnelDeleteParams as TunnelDeleteParams from .tunnel_edit_response import TunnelEditResponse as TunnelEditResponse from .tunnel_list_response import TunnelListResponse as TunnelListResponse from .email_list_rule_param import EmailListRuleParam as EmailListRuleParam diff --git a/src/cloudflare/types/zero_trust/access/__init__.py b/src/cloudflare/types/zero_trust/access/__init__.py index bdbafbcc60b..eca299d4f71 100644 --- a/src/cloudflare/types/zero_trust/access/__init__.py +++ b/src/cloudflare/types/zero_trust/access/__init__.py @@ -8,16 +8,16 @@ from .application import Application as Application from .certificate import Certificate as Certificate from .custom_page import CustomPage as CustomPage +from .allowed_idps import AllowedIdPs as AllowedIdPs from .app_id_param import AppIDParam as AppIDParam from .cors_headers import CORSHeaders as CORSHeaders -from .allowed_idpsh import AllowedIdpsh as AllowedIdpsh -from .custom_pagesh import CustomPagesh as CustomPagesh from .saml_saas_app import SAMLSaaSApp as SAMLSaaSApp from .service_token import ServiceToken as ServiceToken +from .allowed_headers import AllowedHeaders as AllowedHeaders +from .allowed_methods import AllowedMethods as AllowedMethods +from .allowed_origins import AllowedOrigins as AllowedOrigins from .saas_app_source import SaaSAppSource as SaaSAppSource -from .allowed_headersh import AllowedHeadersh as AllowedHeadersh -from .allowed_methodsh import AllowedMethodsh as AllowedMethodsh -from .allowed_originsh import AllowedOriginsh as AllowedOriginsh +from .application_type import ApplicationType as ApplicationType from .key_get_response import KeyGetResponse as KeyGetResponse from .zero_trust_group import ZeroTrustGroup as ZeroTrustGroup from .key_update_params import KeyUpdateParams as KeyUpdateParams @@ -29,14 +29,13 @@ from .key_rotate_response import KeyRotateResponse as KeyRotateResponse from .key_update_response import KeyUpdateResponse as KeyUpdateResponse from .saml_saas_app_param import SAMLSaaSAppParam as SAMLSaaSAppParam +from .self_hosted_domains import SelfHostedDomains as SelfHostedDomains from .tag_delete_response import TagDeleteResponse as TagDeleteResponse from .associated_hostnames import AssociatedHostnames as AssociatedHostnames from .saas_app_name_format import SaaSAppNameFormat as SaaSAppNameFormat -from .self_hosted_domainsh import SelfHostedDomainsh as SelfHostedDomainsh from .group_delete_response import GroupDeleteResponse as GroupDeleteResponse from .saas_app_source_param import SaaSAppSourceParam as SaaSAppSourceParam from .bookmark_create_params import BookmarkCreateParams as BookmarkCreateParams -from .bookmark_delete_params import BookmarkDeleteParams as BookmarkDeleteParams from .bookmark_update_params import BookmarkUpdateParams as BookmarkUpdateParams from .saas_app_name_id_format import SaaSAppNameIDFormat as SaaSAppNameIDFormat from .bookmark_delete_response import BookmarkDeleteResponse as BookmarkDeleteResponse diff --git a/src/cloudflare/types/zero_trust/access/allowed_idpsh.py b/src/cloudflare/types/zero_trust/access/allowed_headers.py similarity index 64% rename from src/cloudflare/types/zero_trust/access/allowed_idpsh.py rename to src/cloudflare/types/zero_trust/access/allowed_headers.py index 06ac561930d..4eeff39570c 100644 --- a/src/cloudflare/types/zero_trust/access/allowed_idpsh.py +++ b/src/cloudflare/types/zero_trust/access/allowed_headers.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -__all__ = ["AllowedIdpsh"] +__all__ = ["AllowedHeaders"] -AllowedIdpsh = str +AllowedHeaders = str diff --git a/src/cloudflare/types/zero_trust/access/custom_pagesh.py b/src/cloudflare/types/zero_trust/access/allowed_idps.py similarity index 65% rename from src/cloudflare/types/zero_trust/access/custom_pagesh.py rename to src/cloudflare/types/zero_trust/access/allowed_idps.py index c85ccdf5283..79c7e1af7e3 100644 --- a/src/cloudflare/types/zero_trust/access/custom_pagesh.py +++ b/src/cloudflare/types/zero_trust/access/allowed_idps.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -__all__ = ["CustomPagesh"] +__all__ = ["AllowedIdPs"] -CustomPagesh = str +AllowedIdPs = str diff --git a/src/cloudflare/types/zero_trust/access/allowed_methods.py b/src/cloudflare/types/zero_trust/access/allowed_methods.py new file mode 100644 index 00000000000..c1c9e45b63b --- /dev/null +++ b/src/cloudflare/types/zero_trust/access/allowed_methods.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["AllowedMethods"] + +AllowedMethods = Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"] diff --git a/src/cloudflare/types/zero_trust/access/allowed_methodsh.py b/src/cloudflare/types/zero_trust/access/allowed_methodsh.py deleted file mode 100644 index 9ce6cd1709b..00000000000 --- a/src/cloudflare/types/zero_trust/access/allowed_methodsh.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import Literal - -__all__ = ["AllowedMethodsh"] - -AllowedMethodsh = Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"] diff --git a/src/cloudflare/types/zero_trust/access/allowed_originsh.py b/src/cloudflare/types/zero_trust/access/allowed_origins.py similarity index 63% rename from src/cloudflare/types/zero_trust/access/allowed_originsh.py rename to src/cloudflare/types/zero_trust/access/allowed_origins.py index dbd56ff86ca..d18558e3958 100644 --- a/src/cloudflare/types/zero_trust/access/allowed_originsh.py +++ b/src/cloudflare/types/zero_trust/access/allowed_origins.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -__all__ = ["AllowedOriginsh"] +__all__ = ["AllowedOrigins"] -AllowedOriginsh = str +AllowedOrigins = str diff --git a/src/cloudflare/types/zero_trust/access/application.py b/src/cloudflare/types/zero_trust/access/application.py index cd1cae01256..433fd75e505 100644 --- a/src/cloudflare/types/zero_trust/access/application.py +++ b/src/cloudflare/types/zero_trust/access/application.py @@ -5,11 +5,11 @@ from typing_extensions import Literal from ...._models import BaseModel +from .allowed_idps import AllowedIdPs from .cors_headers import CORSHeaders -from .allowed_idpsh import AllowedIdpsh -from .custom_pagesh import CustomPagesh from .saml_saas_app import SAMLSaaSApp -from .self_hosted_domainsh import SelfHostedDomainsh +from .application_type import ApplicationType +from .self_hosted_domains import SelfHostedDomains __all__ = [ "Application", @@ -50,7 +50,7 @@ class SelfHostedApplication(BaseModel): authentication. """ - allowed_idps: Optional[List[AllowedIdpsh]] = None + allowed_idps: Optional[List[AllowedIdPs]] = None """The identity providers your users can select when connecting to this application. @@ -92,7 +92,7 @@ class SelfHostedApplication(BaseModel): application when failing non-identity rules. """ - custom_pages: Optional[List[CustomPagesh]] = None + custom_pages: Optional[List[str]] = None """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: Optional[bool] = None @@ -131,7 +131,7 @@ class SelfHostedApplication(BaseModel): attacks. """ - self_hosted_domains: Optional[List[SelfHostedDomainsh]] = None + self_hosted_domains: Optional[List[SelfHostedDomains]] = None """List of domains that Access will secure.""" service_auth_401_redirect: Optional[bool] = None @@ -225,7 +225,7 @@ class SaaSApplication(BaseModel): id: Optional[str] = None """UUID""" - allowed_idps: Optional[List[AllowedIdpsh]] = None + allowed_idps: Optional[List[AllowedIdPs]] = None """The identity providers your users can select when connecting to this application. @@ -247,7 +247,7 @@ class SaaSApplication(BaseModel): created_at: Optional[datetime] = None - custom_pages: Optional[List[CustomPagesh]] = None + custom_pages: Optional[List[str]] = None """The custom pages that will be displayed when applicable for this application""" logo_url: Optional[str] = None @@ -292,7 +292,7 @@ class BrowserSSHApplication(BaseModel): authentication. """ - allowed_idps: Optional[List[AllowedIdpsh]] = None + allowed_idps: Optional[List[AllowedIdPs]] = None """The identity providers your users can select when connecting to this application. @@ -334,7 +334,7 @@ class BrowserSSHApplication(BaseModel): application when failing non-identity rules. """ - custom_pages: Optional[List[CustomPagesh]] = None + custom_pages: Optional[List[str]] = None """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: Optional[bool] = None @@ -373,7 +373,7 @@ class BrowserSSHApplication(BaseModel): attacks. """ - self_hosted_domains: Optional[List[SelfHostedDomainsh]] = None + self_hosted_domains: Optional[List[SelfHostedDomains]] = None """List of domains that Access will secure.""" service_auth_401_redirect: Optional[bool] = None @@ -420,7 +420,7 @@ class BrowserVncApplication(BaseModel): authentication. """ - allowed_idps: Optional[List[AllowedIdpsh]] = None + allowed_idps: Optional[List[AllowedIdPs]] = None """The identity providers your users can select when connecting to this application. @@ -462,7 +462,7 @@ class BrowserVncApplication(BaseModel): application when failing non-identity rules. """ - custom_pages: Optional[List[CustomPagesh]] = None + custom_pages: Optional[List[str]] = None """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: Optional[bool] = None @@ -501,7 +501,7 @@ class BrowserVncApplication(BaseModel): attacks. """ - self_hosted_domains: Optional[List[SelfHostedDomainsh]] = None + self_hosted_domains: Optional[List[SelfHostedDomains]] = None """List of domains that Access will secure.""" service_auth_401_redirect: Optional[bool] = None @@ -527,13 +527,13 @@ class BrowserVncApplication(BaseModel): class AppLauncherApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] + type: ApplicationType """The application type.""" id: Optional[str] = None """UUID""" - allowed_idps: Optional[List[AllowedIdpsh]] = None + allowed_idps: Optional[List[AllowedIdPs]] = None """The identity providers your users can select when connecting to this application. @@ -573,13 +573,13 @@ class AppLauncherApplication(BaseModel): class DeviceEnrollmentPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] + type: ApplicationType """The application type.""" id: Optional[str] = None """UUID""" - allowed_idps: Optional[List[AllowedIdpsh]] = None + allowed_idps: Optional[List[AllowedIdPs]] = None """The identity providers your users can select when connecting to this application. @@ -619,13 +619,13 @@ class DeviceEnrollmentPermissionsApplication(BaseModel): class BrowserIsolationPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] + type: ApplicationType """The application type.""" id: Optional[str] = None """UUID""" - allowed_idps: Optional[List[AllowedIdpsh]] = None + allowed_idps: Optional[List[AllowedIdPs]] = None """The identity providers your users can select when connecting to this application. diff --git a/src/cloudflare/types/zero_trust/access/application_create_params.py b/src/cloudflare/types/zero_trust/access/application_create_params.py index 0197e6e388d..d8f91af3899 100644 --- a/src/cloudflare/types/zero_trust/access/application_create_params.py +++ b/src/cloudflare/types/zero_trust/access/application_create_params.py @@ -5,11 +5,11 @@ from typing import Dict, List, Union from typing_extensions import Literal, Required, TypedDict -from .allowed_idpsh import AllowedIdpsh -from .custom_pagesh import CustomPagesh +from .allowed_idps import AllowedIdPs +from .application_type import ApplicationType from .cors_headers_param import CORSHeadersParam from .saml_saas_app_param import SAMLSaaSAppParam -from .self_hosted_domainsh import SelfHostedDomainsh +from .self_hosted_domains import SelfHostedDomains __all__ = [ "ApplicationCreateParams", @@ -53,7 +53,7 @@ class SelfHostedApplication(TypedDict, total=False): authentication. """ - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -90,7 +90,7 @@ class SelfHostedApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPagesh] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -129,7 +129,7 @@ class SelfHostedApplication(TypedDict, total=False): attacks. """ - self_hosted_domains: List[SelfHostedDomainsh] + self_hosted_domains: List[SelfHostedDomains] """List of domains that Access will secure.""" service_auth_401_redirect: bool @@ -159,7 +159,7 @@ class SaaSApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -176,7 +176,7 @@ class SaaSApplication(TypedDict, total=False): You must specify only one identity provider in allowed_idps. """ - custom_pages: List[CustomPagesh] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" logo_url: str @@ -283,7 +283,7 @@ class BrowserSSHApplication(TypedDict, total=False): authentication. """ - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -320,7 +320,7 @@ class BrowserSSHApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPagesh] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -359,7 +359,7 @@ class BrowserSSHApplication(TypedDict, total=False): attacks. """ - self_hosted_domains: List[SelfHostedDomainsh] + self_hosted_domains: List[SelfHostedDomains] """List of domains that Access will secure.""" service_auth_401_redirect: bool @@ -407,7 +407,7 @@ class BrowserVncApplication(TypedDict, total=False): authentication. """ - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -444,7 +444,7 @@ class BrowserVncApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPagesh] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -483,7 +483,7 @@ class BrowserVncApplication(TypedDict, total=False): attacks. """ - self_hosted_domains: List[SelfHostedDomainsh] + self_hosted_domains: List[SelfHostedDomains] """List of domains that Access will secure.""" service_auth_401_redirect: bool @@ -507,7 +507,7 @@ class BrowserVncApplication(TypedDict, total=False): class AppLauncherApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -516,7 +516,7 @@ class AppLauncherApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -539,7 +539,7 @@ class AppLauncherApplication(TypedDict, total=False): class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -548,7 +548,7 @@ class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -571,7 +571,7 @@ class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): class BrowserIsolationPermissionsApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -580,7 +580,7 @@ class BrowserIsolationPermissionsApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. diff --git a/src/cloudflare/types/zero_trust/access/application_type.py b/src/cloudflare/types/zero_trust/access/application_type.py new file mode 100644 index 00000000000..a15d52f3b44 --- /dev/null +++ b/src/cloudflare/types/zero_trust/access/application_type.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["ApplicationType"] + +ApplicationType = Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] diff --git a/src/cloudflare/types/zero_trust/access/application_update_params.py b/src/cloudflare/types/zero_trust/access/application_update_params.py index 06535294710..53fac9bc0b1 100644 --- a/src/cloudflare/types/zero_trust/access/application_update_params.py +++ b/src/cloudflare/types/zero_trust/access/application_update_params.py @@ -5,11 +5,11 @@ from typing import Dict, List, Union from typing_extensions import Literal, Required, TypedDict -from .allowed_idpsh import AllowedIdpsh -from .custom_pagesh import CustomPagesh +from .allowed_idps import AllowedIdPs +from .application_type import ApplicationType from .cors_headers_param import CORSHeadersParam from .saml_saas_app_param import SAMLSaaSAppParam -from .self_hosted_domainsh import SelfHostedDomainsh +from .self_hosted_domains import SelfHostedDomains __all__ = [ "ApplicationUpdateParams", @@ -53,7 +53,7 @@ class SelfHostedApplication(TypedDict, total=False): authentication. """ - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -90,7 +90,7 @@ class SelfHostedApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPagesh] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -129,7 +129,7 @@ class SelfHostedApplication(TypedDict, total=False): attacks. """ - self_hosted_domains: List[SelfHostedDomainsh] + self_hosted_domains: List[SelfHostedDomains] """List of domains that Access will secure.""" service_auth_401_redirect: bool @@ -159,7 +159,7 @@ class SaaSApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -176,7 +176,7 @@ class SaaSApplication(TypedDict, total=False): You must specify only one identity provider in allowed_idps. """ - custom_pages: List[CustomPagesh] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" logo_url: str @@ -283,7 +283,7 @@ class BrowserSSHApplication(TypedDict, total=False): authentication. """ - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -320,7 +320,7 @@ class BrowserSSHApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPagesh] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -359,7 +359,7 @@ class BrowserSSHApplication(TypedDict, total=False): attacks. """ - self_hosted_domains: List[SelfHostedDomainsh] + self_hosted_domains: List[SelfHostedDomains] """List of domains that Access will secure.""" service_auth_401_redirect: bool @@ -407,7 +407,7 @@ class BrowserVncApplication(TypedDict, total=False): authentication. """ - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -444,7 +444,7 @@ class BrowserVncApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPagesh] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -483,7 +483,7 @@ class BrowserVncApplication(TypedDict, total=False): attacks. """ - self_hosted_domains: List[SelfHostedDomainsh] + self_hosted_domains: List[SelfHostedDomains] """List of domains that Access will secure.""" service_auth_401_redirect: bool @@ -507,7 +507,7 @@ class BrowserVncApplication(TypedDict, total=False): class AppLauncherApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -516,7 +516,7 @@ class AppLauncherApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -539,7 +539,7 @@ class AppLauncherApplication(TypedDict, total=False): class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -548,7 +548,7 @@ class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. @@ -571,7 +571,7 @@ class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): class BrowserIsolationPermissionsApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -580,7 +580,7 @@ class BrowserIsolationPermissionsApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - allowed_idps: List[AllowedIdpsh] + allowed_idps: List[AllowedIdPs] """The identity providers your users can select when connecting to this application. diff --git a/src/cloudflare/types/zero_trust/access/applications/__init__.py b/src/cloudflare/types/zero_trust/access/applications/__init__.py index 6abb930af01..a624e99e93d 100644 --- a/src/cloudflare/types/zero_trust/access/applications/__init__.py +++ b/src/cloudflare/types/zero_trust/access/applications/__init__.py @@ -4,7 +4,6 @@ from .ca import CA as CA from .policy import Policy as Policy -from .policy_param import PolicyParam as PolicyParam from .approval_group import ApprovalGroup as ApprovalGroup from .ca_get_response import CAGetResponse as CAGetResponse from .ca_create_response import CACreateResponse as CACreateResponse diff --git a/src/cloudflare/types/zero_trust/access/applications/policy_param.py b/src/cloudflare/types/zero_trust/access/applications/policy_param.py deleted file mode 100644 index c9d3abfd454..00000000000 --- a/src/cloudflare/types/zero_trust/access/applications/policy_param.py +++ /dev/null @@ -1,69 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Iterable -from typing_extensions import Literal, TypedDict - -from ...access_rule_param import AccessRuleParam -from .approval_group_param import ApprovalGroupParam - -__all__ = ["PolicyParam"] - - -class PolicyParam(TypedDict, total=False): - approval_groups: Iterable[ApprovalGroupParam] - """Administrators who can approve a temporary authentication request.""" - - approval_required: bool - """ - Requires the user to request access from an administrator at the start of each - session. - """ - - decision: Literal["allow", "deny", "non_identity", "bypass"] - """The action Access will take if a user matches this policy.""" - - exclude: Iterable[AccessRuleParam] - """Rules evaluated with a NOT logical operator. - - To match the policy, a user cannot meet any of the Exclude rules. - """ - - include: Iterable[AccessRuleParam] - """Rules evaluated with an OR logical operator. - - A user needs to meet only one of the Include rules. - """ - - isolation_required: bool - """ - Require this application to be served in an isolated browser for users matching - this policy. 'Client Web Isolation' must be on for the account in order to use - this feature. - """ - - name: str - """The name of the Access policy.""" - - precedence: int - """The order of execution for this policy. Must be unique for each policy.""" - - purpose_justification_prompt: str - """A custom message that will appear on the purpose justification screen.""" - - purpose_justification_required: bool - """Require users to enter a justification when they log in to the application.""" - - require: Iterable[AccessRuleParam] - """Rules evaluated with an AND logical operator. - - To match the policy, a user must meet all of the Require rules. - """ - - session_duration: str - """The amount of time that tokens issued for the application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ diff --git a/src/cloudflare/types/zero_trust/access/bookmark_delete_params.py b/src/cloudflare/types/zero_trust/access/bookmark_delete_params.py deleted file mode 100644 index 394d90aa66a..00000000000 --- a/src/cloudflare/types/zero_trust/access/bookmark_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["BookmarkDeleteParams"] - - -class BookmarkDeleteParams(TypedDict, total=False): - identifier: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/access/certificates/certificate_settings.py b/src/cloudflare/types/zero_trust/access/certificates/certificate_settings.py index f2307e896f0..d120c65c65e 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/certificate_settings.py +++ b/src/cloudflare/types/zero_trust/access/certificates/certificate_settings.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ....._models import BaseModel __all__ = ["CertificateSettings"] diff --git a/src/cloudflare/types/zero_trust/access/cors_headers.py b/src/cloudflare/types/zero_trust/access/cors_headers.py index dd0d1dee6d6..36337dcbc64 100644 --- a/src/cloudflare/types/zero_trust/access/cors_headers.py +++ b/src/cloudflare/types/zero_trust/access/cors_headers.py @@ -3,9 +3,9 @@ from typing import List, Optional from ...._models import BaseModel -from .allowed_headersh import AllowedHeadersh -from .allowed_methodsh import AllowedMethodsh -from .allowed_originsh import AllowedOriginsh +from .allowed_headers import AllowedHeaders +from .allowed_methods import AllowedMethods +from .allowed_origins import AllowedOrigins __all__ = ["CORSHeaders"] @@ -26,13 +26,13 @@ class CORSHeaders(BaseModel): client certificates) with requests. """ - allowed_headers: Optional[List[AllowedHeadersh]] = None + allowed_headers: Optional[List[AllowedHeaders]] = None """Allowed HTTP request headers.""" - allowed_methods: Optional[List[AllowedMethodsh]] = None + allowed_methods: Optional[List[AllowedMethods]] = None """Allowed HTTP request methods.""" - allowed_origins: Optional[List[AllowedOriginsh]] = None + allowed_origins: Optional[List[AllowedOrigins]] = None """Allowed origins.""" max_age: Optional[float] = None diff --git a/src/cloudflare/types/zero_trust/access/cors_headers_param.py b/src/cloudflare/types/zero_trust/access/cors_headers_param.py index 9a78d765436..2ddd6c8de42 100644 --- a/src/cloudflare/types/zero_trust/access/cors_headers_param.py +++ b/src/cloudflare/types/zero_trust/access/cors_headers_param.py @@ -5,9 +5,9 @@ from typing import List from typing_extensions import TypedDict -from .allowed_headersh import AllowedHeadersh -from .allowed_methodsh import AllowedMethodsh -from .allowed_originsh import AllowedOriginsh +from .allowed_headers import AllowedHeaders +from .allowed_methods import AllowedMethods +from .allowed_origins import AllowedOrigins __all__ = ["CORSHeadersParam"] @@ -28,13 +28,13 @@ class CORSHeadersParam(TypedDict, total=False): client certificates) with requests. """ - allowed_headers: List[AllowedHeadersh] + allowed_headers: List[AllowedHeaders] """Allowed HTTP request headers.""" - allowed_methods: List[AllowedMethodsh] + allowed_methods: List[AllowedMethods] """Allowed HTTP request methods.""" - allowed_origins: List[AllowedOriginsh] + allowed_origins: List[AllowedOrigins] """Allowed origins.""" max_age: float diff --git a/src/cloudflare/types/zero_trust/access/allowed_headersh.py b/src/cloudflare/types/zero_trust/access/self_hosted_domains.py similarity index 61% rename from src/cloudflare/types/zero_trust/access/allowed_headersh.py rename to src/cloudflare/types/zero_trust/access/self_hosted_domains.py index 5eab7035a5c..cadbea12ad3 100644 --- a/src/cloudflare/types/zero_trust/access/allowed_headersh.py +++ b/src/cloudflare/types/zero_trust/access/self_hosted_domains.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -__all__ = ["AllowedHeadersh"] +__all__ = ["SelfHostedDomains"] -AllowedHeadersh = str +SelfHostedDomains = str diff --git a/src/cloudflare/types/zero_trust/access/self_hosted_domainsh.py b/src/cloudflare/types/zero_trust/access/self_hosted_domainsh.py deleted file mode 100644 index 7dd81dca382..00000000000 --- a/src/cloudflare/types/zero_trust/access/self_hosted_domainsh.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - -__all__ = ["SelfHostedDomainsh"] - -SelfHostedDomainsh = str diff --git a/src/cloudflare/types/zero_trust/access_device_posture_rule.py b/src/cloudflare/types/zero_trust/access_device_posture_rule.py index 7465d128873..d4eb806317e 100644 --- a/src/cloudflare/types/zero_trust/access_device_posture_rule.py +++ b/src/cloudflare/types/zero_trust/access_device_posture_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["AccessDevicePostureRule", "DevicePosture"] diff --git a/src/cloudflare/types/zero_trust/any_valid_service_token_rule.py b/src/cloudflare/types/zero_trust/any_valid_service_token_rule.py index 2613ccdd5fd..9ab0ef01a37 100644 --- a/src/cloudflare/types/zero_trust/any_valid_service_token_rule.py +++ b/src/cloudflare/types/zero_trust/any_valid_service_token_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["AnyValidServiceTokenRule"] diff --git a/src/cloudflare/types/zero_trust/authentication_method_rule.py b/src/cloudflare/types/zero_trust/authentication_method_rule.py index 6c95a0f424b..ab9bdced279 100644 --- a/src/cloudflare/types/zero_trust/authentication_method_rule.py +++ b/src/cloudflare/types/zero_trust/authentication_method_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["AuthenticationMethodRule", "AuthMethod"] diff --git a/src/cloudflare/types/zero_trust/azure_group_rule.py b/src/cloudflare/types/zero_trust/azure_group_rule.py index aecd2930885..6df84aaf221 100644 --- a/src/cloudflare/types/zero_trust/azure_group_rule.py +++ b/src/cloudflare/types/zero_trust/azure_group_rule.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + from pydantic import Field as FieldInfo from ..._models import BaseModel diff --git a/src/cloudflare/types/zero_trust/certificate_rule.py b/src/cloudflare/types/zero_trust/certificate_rule.py index 5327168c525..fb76060608c 100644 --- a/src/cloudflare/types/zero_trust/certificate_rule.py +++ b/src/cloudflare/types/zero_trust/certificate_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["CertificateRule"] diff --git a/src/cloudflare/types/zero_trust/country_rule.py b/src/cloudflare/types/zero_trust/country_rule.py index a2bb9437377..0d84bda7097 100644 --- a/src/cloudflare/types/zero_trust/country_rule.py +++ b/src/cloudflare/types/zero_trust/country_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["CountryRule", "Geo"] diff --git a/src/cloudflare/types/zero_trust/device_experience_monitor.py b/src/cloudflare/types/zero_trust/device_experience_monitor.py index ca07797fd0a..cb84b45bfba 100644 --- a/src/cloudflare/types/zero_trust/device_experience_monitor.py +++ b/src/cloudflare/types/zero_trust/device_experience_monitor.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["DeviceExperienceMonitor"] diff --git a/src/cloudflare/types/zero_trust/devices/__init__.py b/src/cloudflare/types/zero_trust/devices/__init__.py index cdcdaa700c9..629e4c5cec8 100644 --- a/src/cloudflare/types/zero_trust/devices/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/__init__.py @@ -31,14 +31,11 @@ from .workspace_one_input import WorkspaceOneInput as WorkspaceOneInput from .firewall_input_param import FirewallInputParam as FirewallInputParam from .policy_create_params import PolicyCreateParams as PolicyCreateParams -from .policy_delete_params import PolicyDeleteParams as PolicyDeleteParams from .revoke_create_params import RevokeCreateParams as RevokeCreateParams from .disk_encryption_input import DiskEncryptionInput as DiskEncryptionInput from .network_create_params import NetworkCreateParams as NetworkCreateParams -from .network_delete_params import NetworkDeleteParams as NetworkDeleteParams from .network_update_params import NetworkUpdateParams as NetworkUpdateParams from .posture_create_params import PostureCreateParams as PostureCreateParams -from .posture_delete_params import PostureDeleteParams as PostureDeleteParams from .posture_update_params import PostureUpdateParams as PostureUpdateParams from .sentinelone_s2s_input import SentineloneS2sInput as SentineloneS2sInput from .setting_update_params import SettingUpdateParams as SettingUpdateParams diff --git a/src/cloudflare/types/zero_trust/devices/client_certificate_input.py b/src/cloudflare/types/zero_trust/devices/client_certificate_input.py index f1884b8bcdc..e8dc8dc8ba3 100644 --- a/src/cloudflare/types/zero_trust/devices/client_certificate_input.py +++ b/src/cloudflare/types/zero_trust/devices/client_certificate_input.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ...._models import BaseModel __all__ = ["ClientCertificateInput"] diff --git a/src/cloudflare/types/zero_trust/devices/network_delete_params.py b/src/cloudflare/types/zero_trust/devices/network_delete_params.py deleted file mode 100644 index f8d4d2308be..00000000000 --- a/src/cloudflare/types/zero_trust/devices/network_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["NetworkDeleteParams"] - - -class NetworkDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/devices/policy_delete_params.py b/src/cloudflare/types/zero_trust/devices/policy_delete_params.py deleted file mode 100644 index 4cb2ee753ce..00000000000 --- a/src/cloudflare/types/zero_trust/devices/policy_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["PolicyDeleteParams"] - - -class PolicyDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/devices/posture/__init__.py b/src/cloudflare/types/zero_trust/devices/posture/__init__.py index c2a4c5f170b..419d1479120 100644 --- a/src/cloudflare/types/zero_trust/devices/posture/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/posture/__init__.py @@ -5,5 +5,4 @@ from .integration import Integration as Integration from .integration_edit_params import IntegrationEditParams as IntegrationEditParams from .integration_create_params import IntegrationCreateParams as IntegrationCreateParams -from .integration_delete_params import IntegrationDeleteParams as IntegrationDeleteParams from .integration_delete_response import IntegrationDeleteResponse as IntegrationDeleteResponse diff --git a/src/cloudflare/types/zero_trust/devices/posture/integration_delete_params.py b/src/cloudflare/types/zero_trust/devices/posture/integration_delete_params.py deleted file mode 100644 index ec8c43a8246..00000000000 --- a/src/cloudflare/types/zero_trust/devices/posture/integration_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["IntegrationDeleteParams"] - - -class IntegrationDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/devices/posture_delete_params.py b/src/cloudflare/types/zero_trust/devices/posture_delete_params.py deleted file mode 100644 index 302a213ee48..00000000000 --- a/src/cloudflare/types/zero_trust/devices/posture_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["PostureDeleteParams"] - - -class PostureDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_response.py b/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_response.py index cc90fd794a6..9d8697adeb4 100644 --- a/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_response.py +++ b/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_response.py @@ -16,16 +16,12 @@ class DeviceListResponse(BaseModel): device_id: str = FieldInfo(alias="deviceId") """Device identifier (UUID v4)""" - mode: object - platform: str """Operating system""" status: str """Network status""" - timestamp: object - version: str """WARP client version""" diff --git a/src/cloudflare/types/zero_trust/dex/tests/unique_devices.py b/src/cloudflare/types/zero_trust/dex/tests/unique_devices.py index 7c43e52888b..2b5472dbf8e 100644 --- a/src/cloudflare/types/zero_trust/dex/tests/unique_devices.py +++ b/src/cloudflare/types/zero_trust/dex/tests/unique_devices.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + from pydantic import Field as FieldInfo from ....._models import BaseModel diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py b/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py index 0b64a904912..0bc90b29380 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py @@ -7,7 +7,6 @@ from .custom_profile import CustomProfile as CustomProfile from .predefined_profile import PredefinedProfile as PredefinedProfile from .custom_create_params import CustomCreateParams as CustomCreateParams -from .custom_delete_params import CustomDeleteParams as CustomDeleteParams from .custom_update_params import CustomUpdateParams as CustomUpdateParams from .custom_create_response import CustomCreateResponse as CustomCreateResponse from .custom_delete_response import CustomDeleteResponse as CustomDeleteResponse diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_delete_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_delete_params.py deleted file mode 100644 index a4c6ca2be51..00000000000 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["CustomDeleteParams"] - - -class CustomDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/dlp/skip_configuration.py b/src/cloudflare/types/zero_trust/dlp/skip_configuration.py index c7a9139bf06..5a525608141 100644 --- a/src/cloudflare/types/zero_trust/dlp/skip_configuration.py +++ b/src/cloudflare/types/zero_trust/dlp/skip_configuration.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ...._models import BaseModel __all__ = ["SkipConfiguration"] diff --git a/src/cloudflare/types/zero_trust/domain_rule.py b/src/cloudflare/types/zero_trust/domain_rule.py index 4c75958da62..7c469d7a2a4 100644 --- a/src/cloudflare/types/zero_trust/domain_rule.py +++ b/src/cloudflare/types/zero_trust/domain_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["DomainRule", "EmailDomain"] diff --git a/src/cloudflare/types/zero_trust/email_list_rule.py b/src/cloudflare/types/zero_trust/email_list_rule.py index 6423b3d2f6b..4323cde054f 100644 --- a/src/cloudflare/types/zero_trust/email_list_rule.py +++ b/src/cloudflare/types/zero_trust/email_list_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["EmailListRule", "EmailList"] diff --git a/src/cloudflare/types/zero_trust/email_rule.py b/src/cloudflare/types/zero_trust/email_rule.py index 1f344e6499a..4e56f956384 100644 --- a/src/cloudflare/types/zero_trust/email_rule.py +++ b/src/cloudflare/types/zero_trust/email_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["EmailRule", "Email"] diff --git a/src/cloudflare/types/zero_trust/everyone_rule.py b/src/cloudflare/types/zero_trust/everyone_rule.py index c6eb677a828..3077a7b52b3 100644 --- a/src/cloudflare/types/zero_trust/everyone_rule.py +++ b/src/cloudflare/types/zero_trust/everyone_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["EveryoneRule"] diff --git a/src/cloudflare/types/zero_trust/external_evaluation_rule.py b/src/cloudflare/types/zero_trust/external_evaluation_rule.py index ab6449b3a48..c72a4dea246 100644 --- a/src/cloudflare/types/zero_trust/external_evaluation_rule.py +++ b/src/cloudflare/types/zero_trust/external_evaluation_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["ExternalEvaluationRule", "ExternalEvaluation"] diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index 836e219582a..b8627d5f6fc 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -22,11 +22,9 @@ from .location_network import LocationNetwork as LocationNetwork from .gateway_item_param import GatewayItemParam as GatewayItemParam from .list_create_params import ListCreateParams as ListCreateParams -from .list_delete_params import ListDeleteParams as ListDeleteParams from .list_update_params import ListUpdateParams as ListUpdateParams from .protocol_detection import ProtocolDetection as ProtocolDetection from .rule_create_params import RuleCreateParams as RuleCreateParams -from .rule_delete_params import RuleDeleteParams as RuleDeleteParams from .rule_setting_param import RuleSettingParam as RuleSettingParam from .rule_update_params import RuleUpdateParams as RuleUpdateParams from .tls_settings_param import TLSSettingsParam as TLSSettingsParam @@ -41,7 +39,6 @@ from .notification_settings import NotificationSettings as NotificationSettings from .body_scanning_settings import BodyScanningSettings as BodyScanningSettings from .location_create_params import LocationCreateParams as LocationCreateParams -from .location_delete_params import LocationDeleteParams as LocationDeleteParams from .location_network_param import LocationNetworkParam as LocationNetworkParam from .location_update_params import LocationUpdateParams as LocationUpdateParams from .extended_email_matching import ExtendedEmailMatching as ExtendedEmailMatching @@ -62,7 +59,6 @@ from .notification_settings_param import NotificationSettingsParam as NotificationSettingsParam from .body_scanning_settings_param import BodyScanningSettingsParam as BodyScanningSettingsParam from .proxy_endpoint_create_params import ProxyEndpointCreateParams as ProxyEndpointCreateParams -from .proxy_endpoint_delete_params import ProxyEndpointDeleteParams as ProxyEndpointDeleteParams from .configuration_update_response import ConfigurationUpdateResponse as ConfigurationUpdateResponse from .extended_email_matching_param import ExtendedEmailMatchingParam as ExtendedEmailMatchingParam from .dns_resolver_settings_v4_param import DNSResolverSettingsV4Param as DNSResolverSettingsV4Param diff --git a/src/cloudflare/types/zero_trust/gateway/list_delete_params.py b/src/cloudflare/types/zero_trust/gateway/list_delete_params.py deleted file mode 100644 index 42858bd751e..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/list_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ListDeleteParams"] - - -class ListDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/gateway/location_delete_params.py b/src/cloudflare/types/zero_trust/gateway/location_delete_params.py deleted file mode 100644 index afb7d137250..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/location_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["LocationDeleteParams"] - - -class LocationDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/gateway/location_network.py b/src/cloudflare/types/zero_trust/gateway/location_network.py index 7b520e22ba1..448729f3f29 100644 --- a/src/cloudflare/types/zero_trust/gateway/location_network.py +++ b/src/cloudflare/types/zero_trust/gateway/location_network.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ...._models import BaseModel __all__ = ["LocationNetwork"] diff --git a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_delete_params.py b/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_delete_params.py deleted file mode 100644 index 0eaa7e21a79..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ProxyEndpointDeleteParams"] - - -class ProxyEndpointDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/gateway/rule_delete_params.py b/src/cloudflare/types/zero_trust/gateway/rule_delete_params.py deleted file mode 100644 index f729aaf685c..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/rule_delete_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["RuleDeleteParams"] - - -class RuleDeleteParams(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/github_organization_rule.py b/src/cloudflare/types/zero_trust/github_organization_rule.py index 828ab5751e9..b9b297ae08b 100644 --- a/src/cloudflare/types/zero_trust/github_organization_rule.py +++ b/src/cloudflare/types/zero_trust/github_organization_rule.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + from pydantic import Field as FieldInfo from ..._models import BaseModel diff --git a/src/cloudflare/types/zero_trust/group_rule.py b/src/cloudflare/types/zero_trust/group_rule.py index 00aa6257072..def8e72459c 100644 --- a/src/cloudflare/types/zero_trust/group_rule.py +++ b/src/cloudflare/types/zero_trust/group_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["GroupRule", "Group"] diff --git a/src/cloudflare/types/zero_trust/gsuite_group_rule.py b/src/cloudflare/types/zero_trust/gsuite_group_rule.py index ebc864e0666..589bb8baef3 100644 --- a/src/cloudflare/types/zero_trust/gsuite_group_rule.py +++ b/src/cloudflare/types/zero_trust/gsuite_group_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["GSuiteGroupRule", "GSuite"] diff --git a/src/cloudflare/types/zero_trust/ip_list_rule.py b/src/cloudflare/types/zero_trust/ip_list_rule.py index 30388e43ef7..44db2dcf67c 100644 --- a/src/cloudflare/types/zero_trust/ip_list_rule.py +++ b/src/cloudflare/types/zero_trust/ip_list_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["IPListRule", "IPList"] diff --git a/src/cloudflare/types/zero_trust/ip_rule.py b/src/cloudflare/types/zero_trust/ip_rule.py index 503109876fe..9339b85191c 100644 --- a/src/cloudflare/types/zero_trust/ip_rule.py +++ b/src/cloudflare/types/zero_trust/ip_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["IPRule", "IP"] diff --git a/src/cloudflare/types/zero_trust/networks/__init__.py b/src/cloudflare/types/zero_trust/networks/__init__.py index 36cce8dd60e..3f825849118 100644 --- a/src/cloudflare/types/zero_trust/networks/__init__.py +++ b/src/cloudflare/types/zero_trust/networks/__init__.py @@ -4,7 +4,6 @@ from .route import Route as Route from .teamnet import Teamnet as Teamnet -from .route_param import RouteParam as RouteParam from .virtual_network import VirtualNetwork as VirtualNetwork from .route_edit_params import RouteEditParams as RouteEditParams from .route_list_params import RouteListParams as RouteListParams @@ -12,7 +11,6 @@ from .virtual_network_edit_params import VirtualNetworkEditParams as VirtualNetworkEditParams from .virtual_network_list_params import VirtualNetworkListParams as VirtualNetworkListParams from .virtual_network_create_params import VirtualNetworkCreateParams as VirtualNetworkCreateParams -from .virtual_network_delete_params import VirtualNetworkDeleteParams as VirtualNetworkDeleteParams from .virtual_network_edit_response import VirtualNetworkEditResponse as VirtualNetworkEditResponse from .virtual_network_create_response import VirtualNetworkCreateResponse as VirtualNetworkCreateResponse from .virtual_network_delete_response import VirtualNetworkDeleteResponse as VirtualNetworkDeleteResponse diff --git a/src/cloudflare/types/zero_trust/networks/route_param.py b/src/cloudflare/types/zero_trust/networks/route_param.py deleted file mode 100644 index 8fa3a2b483e..00000000000 --- a/src/cloudflare/types/zero_trust/networks/route_param.py +++ /dev/null @@ -1,31 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Annotated, TypedDict - -from ...._utils import PropertyInfo - -__all__ = ["RouteParam"] - - -class RouteParam(TypedDict, total=False): - comment: str - """Optional remark describing the route.""" - - created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """Timestamp of when the resource was created.""" - - deleted_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """Timestamp of when the resource was deleted. - - If `null`, the resource has not been deleted. - """ - - network: str - """The private IPv4 or IPv6 range connected by the route, in CIDR notation.""" - - virtual_network_id: str - """UUID of the virtual network.""" diff --git a/src/cloudflare/types/zero_trust/networks/virtual_network_delete_params.py b/src/cloudflare/types/zero_trust/networks/virtual_network_delete_params.py deleted file mode 100644 index 6fe5cb76ca2..00000000000 --- a/src/cloudflare/types/zero_trust/networks/virtual_network_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["VirtualNetworkDeleteParams"] - - -class VirtualNetworkDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Cloudflare account ID""" - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/okta_group_rule.py b/src/cloudflare/types/zero_trust/okta_group_rule.py index 1c9e66889d1..9f57c867141 100644 --- a/src/cloudflare/types/zero_trust/okta_group_rule.py +++ b/src/cloudflare/types/zero_trust/okta_group_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["OktaGroupRule", "Okta"] diff --git a/src/cloudflare/types/zero_trust/saml_group_rule.py b/src/cloudflare/types/zero_trust/saml_group_rule.py index 7a311bb901c..c1bf9e03312 100644 --- a/src/cloudflare/types/zero_trust/saml_group_rule.py +++ b/src/cloudflare/types/zero_trust/saml_group_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["SAMLGroupRule", "SAML"] diff --git a/src/cloudflare/types/zero_trust/service_token_rule.py b/src/cloudflare/types/zero_trust/service_token_rule.py index b8c4353ec77..a40140c3a32 100644 --- a/src/cloudflare/types/zero_trust/service_token_rule.py +++ b/src/cloudflare/types/zero_trust/service_token_rule.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["ServiceTokenRule", "ServiceToken"] diff --git a/src/cloudflare/types/zero_trust/tunnel_delete_params.py b/src/cloudflare/types/zero_trust/tunnel_delete_params.py deleted file mode 100644 index bf39b7b71e0..00000000000 --- a/src/cloudflare/types/zero_trust/tunnel_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["TunnelDeleteParams"] - - -class TunnelDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Cloudflare account ID""" - - body: Required[object] diff --git a/src/cloudflare/types/zero_trust/tunnels/__init__.py b/src/cloudflare/types/zero_trust/tunnels/__init__.py index cdfdf2d324e..7b1c7d4263f 100644 --- a/src/cloudflare/types/zero_trust/tunnels/__init__.py +++ b/src/cloudflare/types/zero_trust/tunnels/__init__.py @@ -5,7 +5,6 @@ from .client import Client as Client from .token_get_response import TokenGetResponse as TokenGetResponse from .connection_get_response import ConnectionGetResponse as ConnectionGetResponse -from .connection_delete_params import ConnectionDeleteParams as ConnectionDeleteParams from .management_create_params import ManagementCreateParams as ManagementCreateParams from .configuration_get_response import ConfigurationGetResponse as ConfigurationGetResponse from .connection_delete_response import ConnectionDeleteResponse as ConnectionDeleteResponse diff --git a/src/cloudflare/types/zero_trust/tunnels/connection_delete_params.py b/src/cloudflare/types/zero_trust/tunnels/connection_delete_params.py deleted file mode 100644 index 2fe5468e16d..00000000000 --- a/src/cloudflare/types/zero_trust/tunnels/connection_delete_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["ConnectionDeleteParams"] - - -class ConnectionDeleteParams(TypedDict, total=False): - account_id: Required[str] - """Cloudflare account ID""" - - body: Required[object] diff --git a/src/cloudflare/types/zones/__init__.py b/src/cloudflare/types/zones/__init__.py index 1f0b10e4ded..3d3e43049cf 100644 --- a/src/cloudflare/types/zones/__init__.py +++ b/src/cloudflare/types/zones/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .type import Type as Type from .zone import Zone as Zone from .zone_hold import ZoneHold as ZoneHold from .nameserver import Nameserver as Nameserver diff --git a/src/cloudflare/types/zones/custom_nameserver_get_response.py b/src/cloudflare/types/zones/custom_nameserver_get_response.py index a257787a184..e28ec99293d 100644 --- a/src/cloudflare/types/zones/custom_nameserver_get_response.py +++ b/src/cloudflare/types/zones/custom_nameserver_get_response.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union +from typing import List __all__ = ["CustomNameserverGetResponse"] -CustomNameserverGetResponse = Union[List[object], str, object, None] +CustomNameserverGetResponse = List[object] diff --git a/src/cloudflare/types/zones/custom_nameserver_update_response.py b/src/cloudflare/types/zones/custom_nameserver_update_response.py index d2c3ed336e7..ca378e8247d 100644 --- a/src/cloudflare/types/zones/custom_nameserver_update_response.py +++ b/src/cloudflare/types/zones/custom_nameserver_update_response.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union +from typing import List __all__ = ["CustomNameserverUpdateResponse"] -CustomNameserverUpdateResponse = Union[List[object], str, object, None] +CustomNameserverUpdateResponse = List[object] diff --git a/src/cloudflare/types/zones/type.py b/src/cloudflare/types/zones/type.py new file mode 100644 index 00000000000..d5f60d0c7f4 --- /dev/null +++ b/src/cloudflare/types/zones/type.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["Type"] + +Type = Literal["full", "partial", "secondary"] diff --git a/src/cloudflare/types/zones/zone.py b/src/cloudflare/types/zones/zone.py index 74e8da2e9ef..38102060124 100644 --- a/src/cloudflare/types/zones/zone.py +++ b/src/cloudflare/types/zones/zone.py @@ -78,14 +78,14 @@ class Zone(BaseModel): name: str """The domain name""" + name_servers: List[str] + """The name servers Cloudflare assigns to a zone""" + original_dnshost: Optional[str] = None """DNS host at the time of switching to Cloudflare""" original_name_servers: Optional[List[str]] = None - """ - Original name servers before moving to Cloudflare Notes: Is this only available - for full zones? - """ + """Original name servers before moving to Cloudflare""" original_registrar: Optional[str] = None """Registrar for the domain at the time of switching to Cloudflare""" diff --git a/src/cloudflare/types/zones/zone_create_params.py b/src/cloudflare/types/zones/zone_create_params.py index 492bd7fab19..9500909dced 100644 --- a/src/cloudflare/types/zones/zone_create_params.py +++ b/src/cloudflare/types/zones/zone_create_params.py @@ -2,7 +2,9 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict + +from .type import Type __all__ = ["ZoneCreateParams", "Account"] @@ -13,7 +15,7 @@ class ZoneCreateParams(TypedDict, total=False): name: Required[str] """The domain name""" - type: Literal["full", "partial", "secondary"] + type: Type """A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. diff --git a/src/cloudflare/types/zones/zone_delete_response.py b/src/cloudflare/types/zones/zone_delete_response.py index 8c55f4a3e09..55ffb51fd69 100644 --- a/src/cloudflare/types/zones/zone_delete_response.py +++ b/src/cloudflare/types/zones/zone_delete_response.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + from ..._models import BaseModel __all__ = ["ZoneDeleteResponse"] diff --git a/tests/api_resources/accounts/test_members.py b/tests/api_resources/accounts/test_members.py index 9aa9ad36804..4b8885d1efd 100644 --- a/tests/api_resources/accounts/test_members.py +++ b/tests/api_resources/accounts/test_members.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.shared.member import Member -from cloudflare.types.accounts.member_list_response import MemberListResponse -from cloudflare.types.accounts.user_with_invite_code import UserWithInviteCode -from cloudflare.types.accounts.member_delete_response import MemberDeleteResponse +from cloudflare.types.shared import Member +from cloudflare.types.accounts import ( + MemberListResponse, + UserWithInviteCode, + MemberDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,11 +23,10 @@ class TestMembers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: member = client.accounts.members.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -35,11 +36,10 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(UserWithInviteCode, member, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: member = client.accounts.members.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -50,11 +50,10 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(UserWithInviteCode, member, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -68,11 +67,10 @@ def test_raw_response_create(self, client: Cloudflare) -> None: member = response.parse() assert_matches_type(UserWithInviteCode, member, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -88,12 +86,25 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + def test_path_params_create(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.accounts.members.with_raw_response.create( + account_id="", + email="user@example.com", + roles=[ + "3536bcfad5faccb999b47003c79917fb", + "3536bcfad5faccb999b47003c79917fb", + "3536bcfad5faccb999b47003c79917fb", + ], + ) + + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: member = client.accounts.members.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -102,12 +113,12 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Member, member, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -120,12 +131,12 @@ def test_raw_response_update(self, client: Cloudflare) -> None: member = response.parse() assert_matches_type(Member, member, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -140,13 +151,24 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.accounts.members.with_raw_response.update( + "4536bcfad5faccb111b47003c79917fa", + account_id="", + roles=[ + {"id": "3536bcfad5faccb999b47003c79917fb"}, + {"id": "3536bcfad5faccb999b47003c79917fb"}, + {"id": "3536bcfad5faccb999b47003c79917fb"}, + ], + ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.update( "", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -154,19 +176,17 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: member = client.accounts.members.list( - account_id={}, + account_id="string", ) assert_matches_type(SyncV4PagePaginationArray[MemberListResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: member = client.accounts.members.list( - account_id={}, + account_id="string", direction="desc", order="status", page=1, @@ -175,11 +195,10 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[MemberListResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.list( - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -187,11 +206,10 @@ def test_raw_response_list(self, client: Cloudflare) -> None: member = response.parse() assert_matches_type(SyncV4PagePaginationArray[MemberListResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.list( - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -201,23 +219,26 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + def test_path_params_list(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.accounts.members.with_raw_response.list( + account_id="", + ) + @parametrize def test_method_delete(self, client: Cloudflare) -> None: member = client.accounts.members.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, - body={}, + account_id="string", ) assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, - body={}, + account_id="string", ) assert response.is_closed is True @@ -225,13 +246,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: member = response.parse() assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, - body={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -241,31 +260,33 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.accounts.members.with_raw_response.delete( + "4536bcfad5faccb111b47003c79917fa", + account_id="", + ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.delete( "", - account_id={}, - body={}, + account_id="string", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: member = client.accounts.members.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert_matches_type(Member, member, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -273,12 +294,11 @@ def test_raw_response_get(self, client: Cloudflare) -> None: member = response.parse() assert_matches_type(Member, member, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -288,24 +308,28 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.accounts.members.with_raw_response.get( + "4536bcfad5faccb111b47003c79917fa", + account_id="", + ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.get( "", - account_id={}, + account_id="string", ) class TestAsyncMembers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -315,11 +339,10 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(UserWithInviteCode, member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -330,11 +353,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(UserWithInviteCode, member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -348,11 +370,10 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: member = await response.parse() assert_matches_type(UserWithInviteCode, member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -368,12 +389,25 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.accounts.members.with_raw_response.create( + account_id="", + email="user@example.com", + roles=[ + "3536bcfad5faccb999b47003c79917fb", + "3536bcfad5faccb999b47003c79917fb", + "3536bcfad5faccb999b47003c79917fb", + ], + ) + + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -382,12 +416,12 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Member, member, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -400,12 +434,12 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: member = await response.parse() assert_matches_type(Member, member, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -420,13 +454,24 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.accounts.members.with_raw_response.update( + "4536bcfad5faccb111b47003c79917fa", + account_id="", + roles=[ + {"id": "3536bcfad5faccb999b47003c79917fb"}, + {"id": "3536bcfad5faccb999b47003c79917fb"}, + {"id": "3536bcfad5faccb999b47003c79917fb"}, + ], + ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.update( "", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -434,19 +479,17 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.list( - account_id={}, + account_id="string", ) assert_matches_type(AsyncV4PagePaginationArray[MemberListResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.list( - account_id={}, + account_id="string", direction="desc", order="status", page=1, @@ -455,11 +498,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[MemberListResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.list( - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -467,11 +509,10 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: member = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[MemberListResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.list( - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -481,23 +522,26 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.accounts.members.with_raw_response.list( + account_id="", + ) + @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, - body={}, + account_id="string", ) assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, - body={}, + account_id="string", ) assert response.is_closed is True @@ -505,13 +549,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: member = await response.parse() assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, - body={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -521,31 +563,33 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.accounts.members.with_raw_response.delete( + "4536bcfad5faccb111b47003c79917fa", + account_id="", + ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.delete( "", - account_id={}, - body={}, + account_id="string", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert_matches_type(Member, member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -553,12 +597,11 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: member = await response.parse() assert_matches_type(Member, member, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -568,11 +611,16 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.accounts.members.with_raw_response.get( + "4536bcfad5faccb111b47003c79917fa", + account_id="", + ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.get( "", - account_id={}, + account_id="string", ) diff --git a/tests/api_resources/accounts/test_roles.py b/tests/api_resources/accounts/test_roles.py index 0012acf6de2..8da99847106 100644 --- a/tests/api_resources/accounts/test_roles.py +++ b/tests/api_resources/accounts/test_roles.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.shared.role import Role -from cloudflare.types.accounts.role_get_response import RoleGetResponse +from cloudflare.types.shared import Role +from cloudflare.types.accounts import RoleGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,19 +19,17 @@ class TestRoles: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: role = client.accounts.roles.list( - account_id={}, + account_id="string", ) assert_matches_type(SyncSinglePage[Role], role, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.accounts.roles.with_raw_response.list( - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -39,11 +37,10 @@ def test_raw_response_list(self, client: Cloudflare) -> None: role = response.parse() assert_matches_type(SyncSinglePage[Role], role, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.accounts.roles.with_streaming_response.list( - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -53,21 +50,26 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + def test_path_params_list(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.accounts.roles.with_raw_response.list( + account_id="", + ) + @parametrize def test_method_get(self, client: Cloudflare) -> None: role = client.accounts.roles.get( {}, - account_id={}, + account_id="string", ) assert_matches_type(RoleGetResponse, role, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.accounts.roles.with_raw_response.get( {}, - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -75,12 +77,11 @@ def test_raw_response_get(self, client: Cloudflare) -> None: role = response.parse() assert_matches_type(RoleGetResponse, role, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.accounts.roles.with_streaming_response.get( {}, - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -90,23 +91,29 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.accounts.roles.with_raw_response.get( + {}, + account_id="", + ) + class TestAsyncRoles: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: role = await async_client.accounts.roles.list( - account_id={}, + account_id="string", ) assert_matches_type(AsyncSinglePage[Role], role, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.roles.with_raw_response.list( - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -114,11 +121,10 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: role = await response.parse() assert_matches_type(AsyncSinglePage[Role], role, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.roles.with_streaming_response.list( - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,21 +134,26 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.accounts.roles.with_raw_response.list( + account_id="", + ) + @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: role = await async_client.accounts.roles.get( {}, - account_id={}, + account_id="string", ) assert_matches_type(RoleGetResponse, role, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.roles.with_raw_response.get( {}, - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -150,12 +161,11 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: role = await response.parse() assert_matches_type(RoleGetResponse, role, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.roles.with_streaming_response.get( {}, - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -164,3 +174,11 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert_matches_type(RoleGetResponse, role, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.accounts.roles.with_raw_response.get( + {}, + account_id="", + ) diff --git a/tests/api_resources/acm/test_total_tls.py b/tests/api_resources/acm/test_total_tls.py index 252f2eeaeaf..cf7af173e5f 100644 --- a/tests/api_resources/acm/test_total_tls.py +++ b/tests/api_resources/acm/test_total_tls.py @@ -3,14 +3,16 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.acm.total_tls_get_response import TotalTLSGetResponse -from cloudflare.types.acm.total_tls_create_response import TotalTLSCreateResponse +from cloudflare.types.acm import ( + TotalTLSGetResponse, + TotalTLSCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,16 +20,14 @@ class TestTotalTLS: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: total_tls = client.acm.total_tls.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(TotalTLSCreateResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSCreateResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: total_tls = client.acm.total_tls.create( @@ -35,9 +35,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: enabled=True, certificate_authority="google", ) - assert_matches_type(TotalTLSCreateResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSCreateResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.acm.total_tls.with_raw_response.create( @@ -48,9 +47,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" total_tls = response.parse() - assert_matches_type(TotalTLSCreateResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSCreateResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.acm.total_tls.with_streaming_response.create( @@ -61,11 +59,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" total_tls = response.parse() - assert_matches_type(TotalTLSCreateResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSCreateResponse], total_tls, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -74,15 +71,13 @@ def test_path_params_create(self, client: Cloudflare) -> None: enabled=True, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: total_tls = client.acm.total_tls.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TotalTLSGetResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSGetResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.acm.total_tls.with_raw_response.get( @@ -92,9 +87,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" total_tls = response.parse() - assert_matches_type(TotalTLSGetResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSGetResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.acm.total_tls.with_streaming_response.get( @@ -104,11 +98,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" total_tls = response.parse() - assert_matches_type(TotalTLSGetResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSGetResponse], total_tls, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -120,16 +113,14 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTotalTLS: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: total_tls = await async_client.acm.total_tls.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(TotalTLSCreateResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSCreateResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: total_tls = await async_client.acm.total_tls.create( @@ -137,9 +128,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare enabled=True, certificate_authority="google", ) - assert_matches_type(TotalTLSCreateResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSCreateResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.acm.total_tls.with_raw_response.create( @@ -150,9 +140,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" total_tls = await response.parse() - assert_matches_type(TotalTLSCreateResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSCreateResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.acm.total_tls.with_streaming_response.create( @@ -163,11 +152,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" total_tls = await response.parse() - assert_matches_type(TotalTLSCreateResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSCreateResponse], total_tls, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -176,15 +164,13 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: enabled=True, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: total_tls = await async_client.acm.total_tls.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TotalTLSGetResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSGetResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.acm.total_tls.with_raw_response.get( @@ -194,9 +180,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" total_tls = await response.parse() - assert_matches_type(TotalTLSGetResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSGetResponse], total_tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.acm.total_tls.with_streaming_response.get( @@ -206,11 +191,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" total_tls = await response.parse() - assert_matches_type(TotalTLSGetResponse, total_tls, path=["response"]) + assert_matches_type(Optional[TotalTLSGetResponse], total_tls, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/addressing/address_maps/test_accounts.py b/tests/api_resources/addressing/address_maps/test_accounts.py index 78926097266..048fa6d00a5 100644 --- a/tests/api_resources/addressing/address_maps/test_accounts.py +++ b/tests/api_resources/addressing/address_maps/test_accounts.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.addressing.address_maps.account_delete_response import AccountDeleteResponse -from cloudflare.types.addressing.address_maps.account_update_response import AccountUpdateResponse +from cloudflare.types.addressing.address_maps import AccountDeleteResponse, AccountUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestAccounts: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: account = client.addressing.address_maps.accounts.update( @@ -28,7 +26,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AccountUpdateResponse], account, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.accounts.with_raw_response.update( @@ -42,7 +39,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: account = response.parse() assert_matches_type(Optional[AccountUpdateResponse], account, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.accounts.with_streaming_response.update( @@ -58,7 +54,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -75,23 +70,19 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: account = client.addressing.address_maps.accounts.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.accounts.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -99,13 +90,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: account = response.parse() assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.accounts.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -115,28 +104,24 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) class TestAsyncAccounts: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: account = await async_client.addressing.address_maps.accounts.update( @@ -146,7 +131,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AccountUpdateResponse], account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.accounts.with_raw_response.update( @@ -160,7 +144,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: account = await response.parse() assert_matches_type(Optional[AccountUpdateResponse], account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.accounts.with_streaming_response.update( @@ -176,7 +159,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -193,23 +175,19 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: account = await async_client.addressing.address_maps.accounts.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.accounts.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -217,13 +195,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: account = await response.parse() assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.accounts.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -233,19 +209,16 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) diff --git a/tests/api_resources/addressing/address_maps/test_ips.py b/tests/api_resources/addressing/address_maps/test_ips.py index f7d5578d9b9..418da599930 100644 --- a/tests/api_resources/addressing/address_maps/test_ips.py +++ b/tests/api_resources/addressing/address_maps/test_ips.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.addressing.address_maps.ip_delete_response import IPDeleteResponse -from cloudflare.types.addressing.address_maps.ip_update_response import IPUpdateResponse +from cloudflare.types.addressing.address_maps import IPDeleteResponse, IPUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestIPs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: ip = client.addressing.address_maps.ips.update( @@ -29,7 +27,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IPUpdateResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.ips.with_raw_response.update( @@ -44,7 +41,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: ip = response.parse() assert_matches_type(Optional[IPUpdateResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.ips.with_streaming_response.update( @@ -61,7 +57,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -88,25 +83,21 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: ip = client.addressing.address_maps.ips.delete( "192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[IPDeleteResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.ips.with_raw_response.delete( "192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -114,14 +105,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: ip = response.parse() assert_matches_type(Optional[IPDeleteResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.ips.with_streaming_response.delete( "192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -131,7 +120,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -139,7 +127,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): @@ -147,7 +134,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): @@ -155,14 +141,12 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) class TestAsyncIPs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ip = await async_client.addressing.address_maps.ips.update( @@ -173,7 +157,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IPUpdateResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.ips.with_raw_response.update( @@ -188,7 +171,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: ip = await response.parse() assert_matches_type(Optional[IPUpdateResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.ips.with_streaming_response.update( @@ -205,7 +187,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -232,25 +213,21 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ip = await async_client.addressing.address_maps.ips.delete( "192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[IPDeleteResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.ips.with_raw_response.delete( "192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -258,14 +235,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: ip = await response.parse() assert_matches_type(Optional[IPDeleteResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.ips.with_streaming_response.delete( "192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -275,7 +250,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -283,7 +257,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): @@ -291,7 +264,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): @@ -299,5 +271,4 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) diff --git a/tests/api_resources/addressing/address_maps/test_zones.py b/tests/api_resources/addressing/address_maps/test_zones.py index 0d555264b02..2eb4c69d4b1 100644 --- a/tests/api_resources/addressing/address_maps/test_zones.py +++ b/tests/api_resources/addressing/address_maps/test_zones.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.addressing.address_maps.zone_delete_response import ZoneDeleteResponse -from cloudflare.types.addressing.address_maps.zone_update_response import ZoneUpdateResponse +from cloudflare.types.addressing.address_maps import ZoneDeleteResponse, ZoneUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestZones: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: zone = client.addressing.address_maps.zones.update( @@ -29,7 +27,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ZoneUpdateResponse], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.zones.with_raw_response.update( @@ -44,7 +41,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: zone = response.parse() assert_matches_type(Optional[ZoneUpdateResponse], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.zones.with_streaming_response.update( @@ -61,7 +57,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -88,25 +83,21 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: zone = client.addressing.address_maps.zones.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[ZoneDeleteResponse], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.zones.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -114,14 +105,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: zone = response.parse() assert_matches_type(Optional[ZoneDeleteResponse], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.zones.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -131,7 +120,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -139,7 +127,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -147,7 +134,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): @@ -155,14 +141,12 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) class TestAsyncZones: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: zone = await async_client.addressing.address_maps.zones.update( @@ -173,7 +157,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ZoneUpdateResponse], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.zones.with_raw_response.update( @@ -188,7 +171,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: zone = await response.parse() assert_matches_type(Optional[ZoneUpdateResponse], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.zones.with_streaming_response.update( @@ -205,7 +187,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -232,25 +213,21 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: zone = await async_client.addressing.address_maps.zones.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[ZoneDeleteResponse], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.zones.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -258,14 +235,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: zone = await response.parse() assert_matches_type(Optional[ZoneDeleteResponse], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.zones.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -275,7 +250,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -283,7 +257,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -291,7 +264,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): @@ -299,5 +271,4 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) diff --git a/tests/api_resources/addressing/loa_documents/test_downloads.py b/tests/api_resources/addressing/loa_documents/test_downloads.py index aa02e80594c..db82ee230fa 100644 --- a/tests/api_resources/addressing/loa_documents/test_downloads.py +++ b/tests/api_resources/addressing/loa_documents/test_downloads.py @@ -16,7 +16,6 @@ class TestDownloads: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: download = client.addressing.loa_documents.downloads.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(object, download, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.loa_documents.downloads.with_raw_response.get( @@ -38,7 +36,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: download = response.parse() assert_matches_type(object, download, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.loa_documents.downloads.with_streaming_response.get( @@ -53,7 +50,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -72,7 +68,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownloads: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: download = await async_client.addressing.loa_documents.downloads.get( @@ -81,7 +76,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(object, download, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.loa_documents.downloads.with_raw_response.get( @@ -94,7 +88,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: download = await response.parse() assert_matches_type(object, download, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.loa_documents.downloads.with_streaming_response.get( @@ -109,7 +102,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py index 3d1dc415316..00ba32f6d14 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.addressing.prefixes.bgp.service_binding import ServiceBinding -from cloudflare.types.addressing.prefixes.bgp.binding_delete_response import BindingDeleteResponse +from cloudflare.types.addressing.prefixes.bgp import ServiceBinding, BindingDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestBindings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.create( @@ -28,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.create( @@ -39,7 +36,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.create( @@ -52,7 +48,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: binding = response.parse() assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.create( @@ -67,7 +62,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -82,7 +76,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.list( @@ -91,7 +84,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.list( @@ -104,7 +96,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: binding = response.parse() assert_matches_type(SyncSinglePage[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.list( @@ -119,7 +110,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -134,7 +124,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.delete( @@ -144,7 +133,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(BindingDeleteResponse, binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.delete( @@ -158,7 +146,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: binding = response.parse() assert_matches_type(BindingDeleteResponse, binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.delete( @@ -174,7 +161,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -198,7 +184,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.get( @@ -208,7 +193,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.get( @@ -222,7 +206,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: binding = response.parse() assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.get( @@ -238,7 +221,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -266,7 +248,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBindings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.create( @@ -275,7 +256,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.create( @@ -286,7 +266,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.create( @@ -299,7 +278,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: binding = await response.parse() assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.create( @@ -314,7 +292,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -329,7 +306,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.list( @@ -338,7 +314,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.list( @@ -351,7 +326,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: binding = await response.parse() assert_matches_type(AsyncSinglePage[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.list( @@ -366,7 +340,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -381,7 +354,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.delete( @@ -391,7 +363,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(BindingDeleteResponse, binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.delete( @@ -405,7 +376,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: binding = await response.parse() assert_matches_type(BindingDeleteResponse, binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.delete( @@ -421,7 +391,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -445,7 +414,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.get( @@ -455,7 +423,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.get( @@ -469,7 +436,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: binding = await response.parse() assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.get( @@ -485,7 +451,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py b/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py index ce4a9a2793e..26c21604b3d 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.addressing.prefixes.bgp.bgp_prefix import BGPPrefix +from cloudflare.types.addressing.prefixes.bgp import BGPPrefix base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestPrefixes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.list( @@ -27,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.prefixes.with_raw_response.list( @@ -40,7 +38,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: prefix = response.parse() assert_matches_type(SyncSinglePage[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.prefixes.with_streaming_response.list( @@ -55,7 +52,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -70,7 +66,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.edit( @@ -80,7 +75,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.edit( @@ -91,7 +85,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( @@ -105,7 +98,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: prefix = response.parse() assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.prefixes.with_streaming_response.edit( @@ -121,7 +113,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -145,7 +136,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.get( @@ -155,7 +145,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.prefixes.with_raw_response.get( @@ -169,7 +158,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: prefix = response.parse() assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.prefixes.with_streaming_response.get( @@ -185,7 +173,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -213,7 +200,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPrefixes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.list( @@ -222,7 +208,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.list( @@ -235,7 +220,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: prefix = await response.parse() assert_matches_type(AsyncSinglePage[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.prefixes.with_streaming_response.list( @@ -250,7 +234,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -265,7 +248,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.edit( @@ -275,7 +257,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.edit( @@ -286,7 +267,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( @@ -300,7 +280,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: prefix = await response.parse() assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.prefixes.with_streaming_response.edit( @@ -316,7 +295,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -340,7 +318,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.get( @@ -350,7 +327,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.get( @@ -364,7 +340,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: prefix = await response.parse() assert_matches_type(Optional[BGPPrefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.prefixes.with_streaming_response.get( @@ -380,7 +355,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/addressing/prefixes/bgp/test_statuses.py b/tests/api_resources/addressing/prefixes/bgp/test_statuses.py index c136cf59840..50503a8f33f 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_statuses.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_statuses.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.addressing.prefixes.bgp.status_get_response import StatusGetResponse -from cloudflare.types.addressing.prefixes.bgp.status_edit_response import StatusEditResponse +from cloudflare.types.addressing.prefixes.bgp import StatusGetResponse, StatusEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestStatuses: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: status = client.addressing.prefixes.bgp.statuses.edit( @@ -28,7 +26,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[StatusEditResponse], status, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.statuses.with_raw_response.edit( @@ -42,7 +39,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: status = response.parse() assert_matches_type(Optional[StatusEditResponse], status, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.statuses.with_streaming_response.edit( @@ -58,7 +54,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -75,7 +70,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: advertised=True, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: status = client.addressing.prefixes.bgp.statuses.get( @@ -84,7 +78,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[StatusGetResponse], status, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.statuses.with_raw_response.get( @@ -97,7 +90,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: status = response.parse() assert_matches_type(Optional[StatusGetResponse], status, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.statuses.with_streaming_response.get( @@ -112,7 +104,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -131,7 +122,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStatuses: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: status = await async_client.addressing.prefixes.bgp.statuses.edit( @@ -141,7 +131,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[StatusEditResponse], status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.statuses.with_raw_response.edit( @@ -155,7 +144,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: status = await response.parse() assert_matches_type(Optional[StatusEditResponse], status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.statuses.with_streaming_response.edit( @@ -171,7 +159,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -188,7 +175,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: advertised=True, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: status = await async_client.addressing.prefixes.bgp.statuses.get( @@ -197,7 +183,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[StatusGetResponse], status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.statuses.with_raw_response.get( @@ -210,7 +195,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: status = await response.parse() assert_matches_type(Optional[StatusGetResponse], status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.statuses.with_streaming_response.get( @@ -225,7 +209,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/addressing/prefixes/test_delegations.py b/tests/api_resources/addressing/prefixes/test_delegations.py index 36319156092..0ee088ab967 100644 --- a/tests/api_resources/addressing/prefixes/test_delegations.py +++ b/tests/api_resources/addressing/prefixes/test_delegations.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.addressing.prefixes.delegations import Delegations -from cloudflare.types.addressing.prefixes.delegation_delete_response import DelegationDeleteResponse +from cloudflare.types.addressing.prefixes import Delegations, DelegationDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestDelegations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.create( @@ -30,7 +28,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Delegations], delegation, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.create( @@ -45,7 +42,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: delegation = response.parse() assert_matches_type(Optional[Delegations], delegation, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.create( @@ -62,7 +58,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -81,7 +76,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.list( @@ -90,7 +84,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Delegations], delegation, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.list( @@ -103,7 +96,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: delegation = response.parse() assert_matches_type(SyncSinglePage[Delegations], delegation, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.list( @@ -118,7 +110,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -133,25 +124,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.delete( "d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[DelegationDeleteResponse], delegation, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.delete( "d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -159,14 +146,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: delegation = response.parse() assert_matches_type(Optional[DelegationDeleteResponse], delegation, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.delete( "d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -176,7 +161,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -184,7 +168,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "d933b1530bc56c9953cf8ce166da8004", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): @@ -192,7 +175,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `delegation_id` but received ''"): @@ -200,14 +182,12 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) class TestAsyncDelegations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.create( @@ -218,7 +198,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Delegations], delegation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.create( @@ -233,7 +212,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: delegation = await response.parse() assert_matches_type(Optional[Delegations], delegation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.create( @@ -250,7 +228,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -269,7 +246,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.list( @@ -278,7 +254,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Delegations], delegation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.list( @@ -291,7 +266,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: delegation = await response.parse() assert_matches_type(AsyncSinglePage[Delegations], delegation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.list( @@ -306,7 +280,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -321,25 +294,21 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.delete( "d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[DelegationDeleteResponse], delegation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.delete( "d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -347,14 +316,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: delegation = await response.parse() assert_matches_type(Optional[DelegationDeleteResponse], delegation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.delete( "d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -364,7 +331,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -372,7 +338,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "d933b1530bc56c9953cf8ce166da8004", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): @@ -380,7 +345,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `delegation_id` but received ''"): @@ -388,5 +352,4 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) diff --git a/tests/api_resources/addressing/test_address_maps.py b/tests/api_resources/addressing/test_address_maps.py index f86b0bfbdcd..1a4e0b0a57c 100644 --- a/tests/api_resources/addressing/test_address_maps.py +++ b/tests/api_resources/addressing/test_address_maps.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.addressing.address_map import AddressMap -from cloudflare.types.addressing.address_map_get_response import AddressMapGetResponse -from cloudflare.types.addressing.address_map_create_response import AddressMapCreateResponse -from cloudflare.types.addressing.address_map_delete_response import AddressMapDeleteResponse +from cloudflare.types.addressing import ( + AddressMap, + AddressMapGetResponse, + AddressMapCreateResponse, + AddressMapDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestAddressMaps: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.create( @@ -39,7 +39,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.create( @@ -51,7 +50,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: address_map = response.parse() assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.create( @@ -65,7 +63,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +70,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.list( @@ -81,7 +77,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.list( @@ -93,7 +88,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: address_map = response.parse() assert_matches_type(SyncSinglePage[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.list( @@ -107,7 +101,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -115,23 +108,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[AddressMapDeleteResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -139,13 +128,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: address_map = response.parse() assert_matches_type(Optional[AddressMapDeleteResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,24 +142,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.edit( @@ -181,7 +164,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.edit( @@ -193,7 +175,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.edit( @@ -206,7 +187,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: address_map = response.parse() assert_matches_type(Optional[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.edit( @@ -221,7 +201,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -236,7 +215,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.get( @@ -245,7 +223,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.get( @@ -258,7 +235,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: address_map = response.parse() assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.get( @@ -273,7 +249,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -292,7 +267,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAddressMaps: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.create( @@ -300,7 +274,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.create( @@ -310,7 +283,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.create( @@ -322,7 +294,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: address_map = await response.parse() assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.create( @@ -336,7 +307,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -344,7 +314,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.list( @@ -352,7 +321,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.list( @@ -364,7 +332,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: address_map = await response.parse() assert_matches_type(AsyncSinglePage[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.list( @@ -378,7 +345,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -386,23 +352,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[AddressMapDeleteResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -410,13 +372,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: address_map = await response.parse() assert_matches_type(Optional[AddressMapDeleteResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -426,24 +386,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.edit( @@ -452,7 +408,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.edit( @@ -464,7 +419,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.edit( @@ -477,7 +431,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: address_map = await response.parse() assert_matches_type(Optional[AddressMap], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.edit( @@ -492,7 +445,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -507,7 +459,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.get( @@ -516,7 +467,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.get( @@ -529,7 +479,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: address_map = await response.parse() assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.get( @@ -544,7 +493,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/addressing/test_loa_documents.py b/tests/api_resources/addressing/test_loa_documents.py index e30e833227b..b3bc8c3e862 100644 --- a/tests/api_resources/addressing/test_loa_documents.py +++ b/tests/api_resources/addressing/test_loa_documents.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.addressing.loa_document_create_response import LOADocumentCreateResponse +from cloudflare.types.addressing import LOADocumentCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,7 @@ class TestLOADocuments: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: loa_document = client.addressing.loa_documents.create( @@ -26,7 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LOADocumentCreateResponse], loa_document, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.loa_documents.with_raw_response.create( @@ -39,7 +39,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: loa_document = response.parse() assert_matches_type(Optional[LOADocumentCreateResponse], loa_document, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.loa_documents.with_streaming_response.create( @@ -54,7 +54,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -67,7 +67,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncLOADocuments: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: loa_document = await async_client.addressing.loa_documents.create( @@ -76,7 +76,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[LOADocumentCreateResponse], loa_document, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.loa_documents.with_raw_response.create( @@ -89,7 +89,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: loa_document = await response.parse() assert_matches_type(Optional[LOADocumentCreateResponse], loa_document, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.loa_documents.with_streaming_response.create( @@ -104,7 +104,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/addressing/test_prefixes.py b/tests/api_resources/addressing/test_prefixes.py index 6002ebc12b1..b26d7471d10 100644 --- a/tests/api_resources/addressing/test_prefixes.py +++ b/tests/api_resources/addressing/test_prefixes.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.addressing.prefix import Prefix -from cloudflare.types.addressing.prefix_delete_response import PrefixDeleteResponse +from cloudflare.types.addressing import Prefix, PrefixDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestPrefixes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.create( @@ -30,7 +28,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.create( @@ -45,7 +42,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: prefix = response.parse() assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.create( @@ -62,7 +58,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +68,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: loa_document_id="d933b1530bc56c9953cf8ce166da8004", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.list( @@ -81,7 +75,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.list( @@ -93,7 +86,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: prefix = response.parse() assert_matches_type(SyncSinglePage[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.list( @@ -107,7 +99,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -115,23 +106,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[PrefixDeleteResponse], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -139,13 +126,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: prefix = response.parse() assert_matches_type(Optional[PrefixDeleteResponse], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,24 +140,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.edit( @@ -182,7 +163,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.edit( @@ -196,7 +176,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: prefix = response.parse() assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.edit( @@ -212,7 +191,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -229,7 +207,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: description="Internal test prefix", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.get( @@ -238,7 +215,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.get( @@ -251,7 +227,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: prefix = response.parse() assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.get( @@ -266,7 +241,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -285,7 +259,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPrefixes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.create( @@ -296,7 +269,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.create( @@ -311,7 +283,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: prefix = await response.parse() assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.create( @@ -328,7 +299,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -339,7 +309,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: loa_document_id="d933b1530bc56c9953cf8ce166da8004", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.list( @@ -347,7 +316,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.list( @@ -359,7 +327,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: prefix = await response.parse() assert_matches_type(AsyncSinglePage[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.list( @@ -373,7 +340,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -381,23 +347,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[PrefixDeleteResponse], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -405,13 +367,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: prefix = await response.parse() assert_matches_type(Optional[PrefixDeleteResponse], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -421,24 +381,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.edit( @@ -448,7 +404,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.edit( @@ -462,7 +417,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: prefix = await response.parse() assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.edit( @@ -478,7 +432,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -495,7 +448,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: description="Internal test prefix", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.get( @@ -504,7 +456,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.get( @@ -517,7 +468,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: prefix = await response.parse() assert_matches_type(Optional[Prefix], prefix, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.get( @@ -532,7 +482,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/addressing/test_services.py b/tests/api_resources/addressing/test_services.py index 76a7f62b536..e54cb33ece0 100644 --- a/tests/api_resources/addressing/test_services.py +++ b/tests/api_resources/addressing/test_services.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.addressing.service_list_response import ServiceListResponse +from cloudflare.types.addressing import ServiceListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestServices: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: service = client.addressing.services.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[ServiceListResponse], service, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.services.with_raw_response.list( @@ -38,7 +36,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: service = response.parse() assert_matches_type(SyncSinglePage[ServiceListResponse], service, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.services.with_streaming_response.list( @@ -52,7 +49,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +60,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncServices: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: service = await async_client.addressing.services.list( @@ -72,7 +67,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[ServiceListResponse], service, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.services.with_raw_response.list( @@ -84,7 +78,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: service = await response.parse() assert_matches_type(AsyncSinglePage[ServiceListResponse], service, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.services.with_streaming_response.list( @@ -98,7 +91,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/ai_gateway/__init__.py b/tests/api_resources/ai_gateway/__init__.py new file mode 100644 index 00000000000..fd8019a9a1a --- /dev/null +++ b/tests/api_resources/ai_gateway/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py new file mode 100644 index 00000000000..f6dc3fd63d1 --- /dev/null +++ b/tests/api_resources/ai_gateway/test_logs.py @@ -0,0 +1,153 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare._utils import parse_datetime +from cloudflare.types.ai_gateway import LogGetResponse + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestLogs: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + log = client.ai_gateway.logs.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + def test_method_get_with_all_params(self, client: Cloudflare) -> None: + log = client.ai_gateway.logs.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cached=True, + direction="asc", + end_date=parse_datetime("2019-12-27T18:11:19.117Z"), + order_by="created_at", + page=1, + per_page=5, + search="string", + start_date=parse_datetime("2019-12-27T18:11:19.117Z"), + success=True, + ) + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.ai_gateway.logs.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + log = response.parse() + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.ai_gateway.logs.with_streaming_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + log = response.parse() + assert_matches_type(LogGetResponse, log, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.logs.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.logs.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + +class TestAsyncLogs: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + log = await async_client.ai_gateway.logs.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: + log = await async_client.ai_gateway.logs.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cached=True, + direction="asc", + end_date=parse_datetime("2019-12-27T18:11:19.117Z"), + order_by="created_at", + page=1, + per_page=5, + search="string", + start_date=parse_datetime("2019-12-27T18:11:19.117Z"), + success=True, + ) + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.logs.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + log = await response.parse() + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.logs.with_streaming_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + log = await response.parse() + assert_matches_type(LogGetResponse, log, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.logs.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.logs.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) diff --git a/tests/api_resources/alerting/destinations/test_eligible.py b/tests/api_resources/alerting/destinations/test_eligible.py index 72cd31f1b77..ee7c9caff3e 100644 --- a/tests/api_resources/alerting/destinations/test_eligible.py +++ b/tests/api_resources/alerting/destinations/test_eligible.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.alerting.destinations.eligible_get_response import EligibleGetResponse +from cloudflare.types.alerting.destinations import EligibleGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestEligible: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: eligible = client.alerting.destinations.eligible.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[EligibleGetResponse], eligible, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.alerting.destinations.eligible.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: eligible = response.parse() assert_matches_type(Optional[EligibleGetResponse], eligible, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.alerting.destinations.eligible.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEligible: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: eligible = await async_client.alerting.destinations.eligible.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[EligibleGetResponse], eligible, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.eligible.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: eligible = await response.parse() assert_matches_type(Optional[EligibleGetResponse], eligible, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.eligible.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/alerting/destinations/test_pagerduty.py b/tests/api_resources/alerting/destinations/test_pagerduty.py index 06db14e6021..912f43e1c42 100644 --- a/tests/api_resources/alerting/destinations/test_pagerduty.py +++ b/tests/api_resources/alerting/destinations/test_pagerduty.py @@ -9,10 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.alerting.destinations.pagerduty_get_response import PagerdutyGetResponse -from cloudflare.types.alerting.destinations.pagerduty_link_response import PagerdutyLinkResponse -from cloudflare.types.alerting.destinations.pagerduty_create_response import PagerdutyCreateResponse -from cloudflare.types.alerting.destinations.pagerduty_delete_response import PagerdutyDeleteResponse +from cloudflare.types.alerting.destinations import ( + PagerdutyGetResponse, + PagerdutyLinkResponse, + PagerdutyCreateResponse, + PagerdutyDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestPagerduty: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: pagerduty = client.alerting.destinations.pagerduty.create( @@ -28,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(PagerdutyCreateResponse, pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.alerting.destinations.pagerduty.with_raw_response.create( @@ -40,7 +40,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: pagerduty = response.parse() assert_matches_type(PagerdutyCreateResponse, pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.alerting.destinations.pagerduty.with_streaming_response.create( @@ -54,7 +53,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -62,7 +60,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: pagerduty = client.alerting.destinations.pagerduty.delete( @@ -70,7 +67,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[PagerdutyDeleteResponse], pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.alerting.destinations.pagerduty.with_raw_response.delete( @@ -82,7 +78,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: pagerduty = response.parse() assert_matches_type(Optional[PagerdutyDeleteResponse], pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.alerting.destinations.pagerduty.with_streaming_response.delete( @@ -96,7 +91,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -104,7 +98,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: pagerduty = client.alerting.destinations.pagerduty.get( @@ -112,7 +105,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[PagerdutyGetResponse], pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.alerting.destinations.pagerduty.with_raw_response.get( @@ -124,7 +116,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: pagerduty = response.parse() assert_matches_type(Optional[PagerdutyGetResponse], pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.alerting.destinations.pagerduty.with_streaming_response.get( @@ -138,7 +129,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -146,7 +136,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_link(self, client: Cloudflare) -> None: pagerduty = client.alerting.destinations.pagerduty.link( @@ -155,7 +144,6 @@ def test_method_link(self, client: Cloudflare) -> None: ) assert_matches_type(PagerdutyLinkResponse, pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_link(self, client: Cloudflare) -> None: response = client.alerting.destinations.pagerduty.with_raw_response.link( @@ -168,7 +156,6 @@ def test_raw_response_link(self, client: Cloudflare) -> None: pagerduty = response.parse() assert_matches_type(PagerdutyLinkResponse, pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_link(self, client: Cloudflare) -> None: with client.alerting.destinations.pagerduty.with_streaming_response.link( @@ -183,7 +170,6 @@ def test_streaming_response_link(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_link(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -202,7 +188,6 @@ def test_path_params_link(self, client: Cloudflare) -> None: class TestAsyncPagerduty: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: pagerduty = await async_client.alerting.destinations.pagerduty.create( @@ -210,7 +195,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PagerdutyCreateResponse, pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.pagerduty.with_raw_response.create( @@ -222,7 +206,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: pagerduty = await response.parse() assert_matches_type(PagerdutyCreateResponse, pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.pagerduty.with_streaming_response.create( @@ -236,7 +219,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -244,7 +226,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: pagerduty = await async_client.alerting.destinations.pagerduty.delete( @@ -252,7 +233,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[PagerdutyDeleteResponse], pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.pagerduty.with_raw_response.delete( @@ -264,7 +244,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: pagerduty = await response.parse() assert_matches_type(Optional[PagerdutyDeleteResponse], pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.pagerduty.with_streaming_response.delete( @@ -278,7 +257,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -286,7 +264,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: pagerduty = await async_client.alerting.destinations.pagerduty.get( @@ -294,7 +271,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[PagerdutyGetResponse], pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.pagerduty.with_raw_response.get( @@ -306,7 +282,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: pagerduty = await response.parse() assert_matches_type(Optional[PagerdutyGetResponse], pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.pagerduty.with_streaming_response.get( @@ -320,7 +295,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -328,7 +302,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_link(self, async_client: AsyncCloudflare) -> None: pagerduty = await async_client.alerting.destinations.pagerduty.link( @@ -337,7 +310,6 @@ async def test_method_link(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PagerdutyLinkResponse, pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_link(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.pagerduty.with_raw_response.link( @@ -350,7 +322,6 @@ async def test_raw_response_link(self, async_client: AsyncCloudflare) -> None: pagerduty = await response.parse() assert_matches_type(PagerdutyLinkResponse, pagerduty, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_link(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.pagerduty.with_streaming_response.link( @@ -365,7 +336,6 @@ async def test_streaming_response_link(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_link(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/alerting/destinations/test_webhooks.py b/tests/api_resources/alerting/destinations/test_webhooks.py index 98bd0ec8991..9da98e9f458 100644 --- a/tests/api_resources/alerting/destinations/test_webhooks.py +++ b/tests/api_resources/alerting/destinations/test_webhooks.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.alerting.destinations.webhooks import Webhooks -from cloudflare.types.alerting.destinations.webhook_create_response import WebhookCreateResponse -from cloudflare.types.alerting.destinations.webhook_delete_response import WebhookDeleteResponse -from cloudflare.types.alerting.destinations.webhook_update_response import WebhookUpdateResponse +from cloudflare.types.alerting.destinations import ( + Webhooks, + WebhookCreateResponse, + WebhookDeleteResponse, + WebhookUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestWebhooks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.create( @@ -31,7 +32,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(WebhookCreateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.create( @@ -42,7 +42,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(WebhookCreateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.create( @@ -56,7 +55,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: webhook = response.parse() assert_matches_type(WebhookCreateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.create( @@ -72,7 +70,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -82,7 +79,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.update( @@ -93,7 +89,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(WebhookUpdateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.update( @@ -105,7 +100,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(WebhookUpdateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.update( @@ -120,7 +114,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: webhook = response.parse() assert_matches_type(WebhookUpdateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.update( @@ -137,7 +130,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -156,7 +148,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.list( @@ -164,7 +155,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Webhooks], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.list( @@ -176,7 +166,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: webhook = response.parse() assert_matches_type(SyncSinglePage[Webhooks], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.list( @@ -190,7 +179,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -198,7 +186,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.delete( @@ -207,7 +194,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[WebhookDeleteResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.delete( @@ -220,7 +206,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: webhook = response.parse() assert_matches_type(Optional[WebhookDeleteResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.delete( @@ -235,7 +220,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -250,7 +234,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.get( @@ -259,7 +242,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Webhooks, webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.get( @@ -272,7 +254,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: webhook = response.parse() assert_matches_type(Webhooks, webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.get( @@ -287,7 +268,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -306,7 +286,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWebhooks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.create( @@ -316,7 +295,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WebhookCreateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.create( @@ -327,7 +305,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(WebhookCreateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.create( @@ -341,7 +318,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: webhook = await response.parse() assert_matches_type(WebhookCreateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.create( @@ -357,7 +333,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -367,7 +342,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.update( @@ -378,7 +352,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WebhookUpdateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.update( @@ -390,7 +363,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(WebhookUpdateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.update( @@ -405,7 +377,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: webhook = await response.parse() assert_matches_type(WebhookUpdateResponse, webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.update( @@ -422,7 +393,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -441,7 +411,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.list( @@ -449,7 +418,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Webhooks], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.list( @@ -461,7 +429,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: webhook = await response.parse() assert_matches_type(AsyncSinglePage[Webhooks], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.list( @@ -475,7 +442,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -483,7 +449,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.delete( @@ -492,7 +457,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[WebhookDeleteResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.delete( @@ -505,7 +469,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: webhook = await response.parse() assert_matches_type(Optional[WebhookDeleteResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.delete( @@ -520,7 +483,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -535,7 +497,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.get( @@ -544,7 +505,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Webhooks, webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.get( @@ -557,7 +517,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: webhook = await response.parse() assert_matches_type(Webhooks, webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.get( @@ -572,7 +531,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/alerting/test_available_alerts.py b/tests/api_resources/alerting/test_available_alerts.py index a788c4241c6..253ff803cdf 100644 --- a/tests/api_resources/alerting/test_available_alerts.py +++ b/tests/api_resources/alerting/test_available_alerts.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.alerting.available_alert_list_response import AvailableAlertListResponse +from cloudflare.types.alerting import AvailableAlertListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAvailableAlerts: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: available_alert = client.alerting.available_alerts.list( @@ -25,7 +24,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.alerting.available_alerts.with_raw_response.list( @@ -37,7 +35,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: available_alert = response.parse() assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.alerting.available_alerts.with_streaming_response.list( @@ -51,7 +48,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAvailableAlerts: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: available_alert = await async_client.alerting.available_alerts.list( @@ -71,7 +66,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.available_alerts.with_raw_response.list( @@ -83,7 +77,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: available_alert = await response.parse() assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.available_alerts.with_streaming_response.list( @@ -97,7 +90,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/alerting/test_history.py b/tests/api_resources/alerting/test_history.py index 33daab848a8..43ef79ac5c3 100644 --- a/tests/api_resources/alerting/test_history.py +++ b/tests/api_resources/alerting/test_history.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.alerting.history import History +from cloudflare.types.alerting import History base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +19,6 @@ class TestHistory: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: history = client.alerting.history.list( @@ -27,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[History], history, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: history = client.alerting.history.list( @@ -39,7 +37,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[History], history, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.alerting.history.with_raw_response.list( @@ -51,7 +48,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: history = response.parse() assert_matches_type(SyncV4PagePaginationArray[History], history, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.alerting.history.with_streaming_response.list( @@ -65,7 +61,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -77,7 +72,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncHistory: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: history = await async_client.alerting.history.list( @@ -85,7 +79,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[History], history, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: history = await async_client.alerting.history.list( @@ -97,7 +90,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[History], history, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.history.with_raw_response.list( @@ -109,7 +101,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: history = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[History], history, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.history.with_streaming_response.list( @@ -123,7 +114,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/alerting/test_policies.py b/tests/api_resources/alerting/test_policies.py index b776db81ba2..c66a55a5837 100644 --- a/tests/api_resources/alerting/test_policies.py +++ b/tests/api_resources/alerting/test_policies.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.alerting.policy import Policy -from cloudflare.types.alerting.policy_create_response import PolicyCreateResponse -from cloudflare.types.alerting.policy_delete_response import PolicyDeleteResponse -from cloudflare.types.alerting.policy_update_response import PolicyUpdateResponse +from cloudflare.types.alerting import ( + Policy, + PolicyCreateResponse, + PolicyDeleteResponse, + PolicyUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestPolicies: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: policy = client.alerting.policies.create( @@ -37,7 +38,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: policy = client.alerting.policies.create( @@ -96,7 +96,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.create( @@ -116,7 +115,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.create( @@ -138,7 +136,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -154,7 +151,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="SSL Notification Event Policy", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.alerting.policies.update( @@ -163,7 +159,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.alerting.policies.update( @@ -223,7 +218,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.update( @@ -236,7 +230,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.update( @@ -251,7 +244,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -266,7 +258,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: policy = client.alerting.policies.list( @@ -274,7 +265,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.list( @@ -286,7 +276,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(SyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.list( @@ -300,7 +289,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -308,7 +296,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.alerting.policies.delete( @@ -317,7 +304,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.delete( @@ -330,7 +316,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.delete( @@ -345,7 +330,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -360,7 +344,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.alerting.policies.get( @@ -369,7 +352,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.get( @@ -382,7 +364,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.get( @@ -397,7 +378,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -416,7 +396,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.create( @@ -432,7 +411,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.create( @@ -491,7 +469,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.create( @@ -511,7 +488,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.create( @@ -533,7 +509,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -549,7 +524,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="SSL Notification Event Policy", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.update( @@ -558,7 +532,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.update( @@ -618,7 +591,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.update( @@ -631,7 +603,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.update( @@ -646,7 +617,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -661,7 +631,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.list( @@ -669,7 +638,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.list( @@ -681,7 +649,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(AsyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.list( @@ -695,7 +662,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -703,7 +669,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.delete( @@ -712,7 +677,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.delete( @@ -725,7 +689,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.delete( @@ -740,7 +703,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -755,7 +717,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.get( @@ -764,7 +725,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.get( @@ -777,7 +737,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.get( @@ -792,7 +751,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/argo/test_smart_routing.py b/tests/api_resources/argo/test_smart_routing.py index c5080d0ba11..8622689044d 100644 --- a/tests/api_resources/argo/test_smart_routing.py +++ b/tests/api_resources/argo/test_smart_routing.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.argo.smart_routing_get_response import SmartRoutingGetResponse -from cloudflare.types.argo.smart_routing_edit_response import SmartRoutingEditResponse +from cloudflare.types.argo import SmartRoutingGetResponse, SmartRoutingEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestSmartRouting: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: smart_routing = client.argo.smart_routing.edit( @@ -27,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.argo.smart_routing.with_raw_response.edit( @@ -40,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: smart_routing = response.parse() assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.argo.smart_routing.with_streaming_response.edit( @@ -55,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -64,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: smart_routing = client.argo.smart_routing.get( @@ -72,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.argo.smart_routing.with_raw_response.get( @@ -84,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: smart_routing = response.parse() assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.argo.smart_routing.with_streaming_response.get( @@ -98,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -110,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSmartRouting: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: smart_routing = await async_client.argo.smart_routing.edit( @@ -119,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.argo.smart_routing.with_raw_response.edit( @@ -132,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: smart_routing = await response.parse() assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.argo.smart_routing.with_streaming_response.edit( @@ -147,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -156,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: smart_routing = await async_client.argo.smart_routing.get( @@ -164,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.argo.smart_routing.with_raw_response.get( @@ -176,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: smart_routing = await response.parse() assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.argo.smart_routing.with_streaming_response.get( @@ -190,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/argo/test_tiered_caching.py b/tests/api_resources/argo/test_tiered_caching.py index e9c0d454595..9afbafa5d1c 100644 --- a/tests/api_resources/argo/test_tiered_caching.py +++ b/tests/api_resources/argo/test_tiered_caching.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.argo.tiered_caching_get_response import TieredCachingGetResponse -from cloudflare.types.argo.tiered_caching_edit_response import TieredCachingEditResponse +from cloudflare.types.argo import TieredCachingGetResponse, TieredCachingEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestTieredCaching: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: tiered_caching = client.argo.tiered_caching.edit( @@ -27,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(TieredCachingEditResponse, tiered_caching, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.argo.tiered_caching.with_raw_response.edit( @@ -40,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: tiered_caching = response.parse() assert_matches_type(TieredCachingEditResponse, tiered_caching, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.argo.tiered_caching.with_streaming_response.edit( @@ -55,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -64,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tiered_caching = client.argo.tiered_caching.get( @@ -72,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(TieredCachingGetResponse, tiered_caching, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.argo.tiered_caching.with_raw_response.get( @@ -84,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tiered_caching = response.parse() assert_matches_type(TieredCachingGetResponse, tiered_caching, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.argo.tiered_caching.with_streaming_response.get( @@ -98,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -110,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTieredCaching: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: tiered_caching = await async_client.argo.tiered_caching.edit( @@ -119,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TieredCachingEditResponse, tiered_caching, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.argo.tiered_caching.with_raw_response.edit( @@ -132,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: tiered_caching = await response.parse() assert_matches_type(TieredCachingEditResponse, tiered_caching, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.argo.tiered_caching.with_streaming_response.edit( @@ -147,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -156,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tiered_caching = await async_client.argo.tiered_caching.get( @@ -164,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TieredCachingGetResponse, tiered_caching, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.argo.tiered_caching.with_raw_response.get( @@ -176,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tiered_caching = await response.parse() assert_matches_type(TieredCachingGetResponse, tiered_caching, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.argo.tiered_caching.with_streaming_response.get( @@ -190,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/billing/test_profiles.py b/tests/api_resources/billing/test_profiles.py index 4b9416d2dbf..03230b18439 100644 --- a/tests/api_resources/billing/test_profiles.py +++ b/tests/api_resources/billing/test_profiles.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.billing.profile_get_response import ProfileGetResponse +from cloudflare.types.billing import ProfileGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestProfiles: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: profile = client.billing.profiles.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.billing.profiles.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: profile = response.parse() assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.billing.profiles.with_streaming_response.get( @@ -55,7 +52,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncProfiles: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: profile = await async_client.billing.profiles.get( @@ -63,7 +59,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.billing.profiles.with_raw_response.get( @@ -75,7 +70,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: profile = await response.parse() assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.billing.profiles.with_streaming_response.get( diff --git a/tests/api_resources/cache/test_cache_reserve.py b/tests/api_resources/cache/test_cache_reserve.py index ba5feb7dc37..fb8eab75309 100644 --- a/tests/api_resources/cache/test_cache_reserve.py +++ b/tests/api_resources/cache/test_cache_reserve.py @@ -9,10 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.cache.cache_reserve_get_response import CacheReserveGetResponse -from cloudflare.types.cache.cache_reserve_edit_response import CacheReserveEditResponse -from cloudflare.types.cache.cache_reserve_clear_response import CacheReserveClearResponse -from cloudflare.types.cache.cache_reserve_status_response import CacheReserveStatusResponse +from cloudflare.types.cache import ( + CacheReserveGetResponse, + CacheReserveEditResponse, + CacheReserveClearResponse, + CacheReserveStatusResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestCacheReserve: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_clear(self, client: Cloudflare) -> None: cache_reserve = client.cache.cache_reserve.clear( @@ -29,7 +30,6 @@ def test_method_clear(self, client: Cloudflare) -> None: ) assert_matches_type(CacheReserveClearResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_clear(self, client: Cloudflare) -> None: response = client.cache.cache_reserve.with_raw_response.clear( @@ -42,7 +42,6 @@ def test_raw_response_clear(self, client: Cloudflare) -> None: cache_reserve = response.parse() assert_matches_type(CacheReserveClearResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_clear(self, client: Cloudflare) -> None: with client.cache.cache_reserve.with_streaming_response.clear( @@ -57,7 +56,6 @@ def test_streaming_response_clear(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_clear(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -66,7 +64,6 @@ def test_path_params_clear(self, client: Cloudflare) -> None: body="{}", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: cache_reserve = client.cache.cache_reserve.edit( @@ -75,7 +72,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(CacheReserveEditResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cache.cache_reserve.with_raw_response.edit( @@ -88,7 +84,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: cache_reserve = response.parse() assert_matches_type(CacheReserveEditResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cache.cache_reserve.with_streaming_response.edit( @@ -103,7 +98,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -112,7 +106,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: cache_reserve = client.cache.cache_reserve.get( @@ -120,7 +113,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(CacheReserveGetResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cache.cache_reserve.with_raw_response.get( @@ -132,7 +124,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: cache_reserve = response.parse() assert_matches_type(CacheReserveGetResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cache.cache_reserve.with_streaming_response.get( @@ -146,7 +137,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -154,7 +144,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_status(self, client: Cloudflare) -> None: cache_reserve = client.cache.cache_reserve.status( @@ -162,7 +151,6 @@ def test_method_status(self, client: Cloudflare) -> None: ) assert_matches_type(CacheReserveStatusResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_status(self, client: Cloudflare) -> None: response = client.cache.cache_reserve.with_raw_response.status( @@ -174,7 +162,6 @@ def test_raw_response_status(self, client: Cloudflare) -> None: cache_reserve = response.parse() assert_matches_type(CacheReserveStatusResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_status(self, client: Cloudflare) -> None: with client.cache.cache_reserve.with_streaming_response.status( @@ -188,7 +175,6 @@ def test_streaming_response_status(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_status(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -200,7 +186,6 @@ def test_path_params_status(self, client: Cloudflare) -> None: class TestAsyncCacheReserve: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_clear(self, async_client: AsyncCloudflare) -> None: cache_reserve = await async_client.cache.cache_reserve.clear( @@ -209,7 +194,6 @@ async def test_method_clear(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CacheReserveClearResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_clear(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.cache_reserve.with_raw_response.clear( @@ -222,7 +206,6 @@ async def test_raw_response_clear(self, async_client: AsyncCloudflare) -> None: cache_reserve = await response.parse() assert_matches_type(CacheReserveClearResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_clear(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.cache_reserve.with_streaming_response.clear( @@ -237,7 +220,6 @@ async def test_streaming_response_clear(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_clear(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -246,7 +228,6 @@ async def test_path_params_clear(self, async_client: AsyncCloudflare) -> None: body="{}", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: cache_reserve = await async_client.cache.cache_reserve.edit( @@ -255,7 +236,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CacheReserveEditResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.cache_reserve.with_raw_response.edit( @@ -268,7 +248,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: cache_reserve = await response.parse() assert_matches_type(CacheReserveEditResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.cache_reserve.with_streaming_response.edit( @@ -283,7 +262,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -292,7 +270,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: cache_reserve = await async_client.cache.cache_reserve.get( @@ -300,7 +277,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CacheReserveGetResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.cache_reserve.with_raw_response.get( @@ -312,7 +288,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: cache_reserve = await response.parse() assert_matches_type(CacheReserveGetResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.cache_reserve.with_streaming_response.get( @@ -326,7 +301,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -334,7 +308,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_status(self, async_client: AsyncCloudflare) -> None: cache_reserve = await async_client.cache.cache_reserve.status( @@ -342,7 +315,6 @@ async def test_method_status(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CacheReserveStatusResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_status(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.cache_reserve.with_raw_response.status( @@ -354,7 +326,6 @@ async def test_raw_response_status(self, async_client: AsyncCloudflare) -> None: cache_reserve = await response.parse() assert_matches_type(CacheReserveStatusResponse, cache_reserve, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_status(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.cache_reserve.with_streaming_response.status( @@ -368,7 +339,6 @@ async def test_streaming_response_status(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_status(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/cache/test_regional_tiered_cache.py b/tests/api_resources/cache/test_regional_tiered_cache.py index 74247e9092d..ec3ddfeb861 100644 --- a/tests/api_resources/cache/test_regional_tiered_cache.py +++ b/tests/api_resources/cache/test_regional_tiered_cache.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.cache.regional_tiered_cache_get_response import RegionalTieredCacheGetResponse -from cloudflare.types.cache.regional_tiered_cache_edit_response import RegionalTieredCacheEditResponse +from cloudflare.types.cache import ( + RegionalTieredCacheGetResponse, + RegionalTieredCacheEditResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestRegionalTieredCache: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: regional_tiered_cache = client.cache.regional_tiered_cache.edit( @@ -27,7 +28,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(RegionalTieredCacheEditResponse, regional_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cache.regional_tiered_cache.with_raw_response.edit( @@ -40,7 +40,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: regional_tiered_cache = response.parse() assert_matches_type(RegionalTieredCacheEditResponse, regional_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cache.regional_tiered_cache.with_streaming_response.edit( @@ -55,7 +54,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -64,7 +62,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: regional_tiered_cache = client.cache.regional_tiered_cache.get( @@ -72,7 +69,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(RegionalTieredCacheGetResponse, regional_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cache.regional_tiered_cache.with_raw_response.get( @@ -84,7 +80,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: regional_tiered_cache = response.parse() assert_matches_type(RegionalTieredCacheGetResponse, regional_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cache.regional_tiered_cache.with_streaming_response.get( @@ -98,7 +93,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -110,7 +104,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRegionalTieredCache: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: regional_tiered_cache = await async_client.cache.regional_tiered_cache.edit( @@ -119,7 +112,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RegionalTieredCacheEditResponse, regional_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.regional_tiered_cache.with_raw_response.edit( @@ -132,7 +124,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: regional_tiered_cache = await response.parse() assert_matches_type(RegionalTieredCacheEditResponse, regional_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.regional_tiered_cache.with_streaming_response.edit( @@ -147,7 +138,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -156,7 +146,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: regional_tiered_cache = await async_client.cache.regional_tiered_cache.get( @@ -164,7 +153,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RegionalTieredCacheGetResponse, regional_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.regional_tiered_cache.with_raw_response.get( @@ -176,7 +164,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: regional_tiered_cache = await response.parse() assert_matches_type(RegionalTieredCacheGetResponse, regional_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.regional_tiered_cache.with_streaming_response.get( @@ -190,7 +177,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/cache/test_smart_tiered_cache.py b/tests/api_resources/cache/test_smart_tiered_cache.py index 4b8df77a630..b683f9fc4dc 100644 --- a/tests/api_resources/cache/test_smart_tiered_cache.py +++ b/tests/api_resources/cache/test_smart_tiered_cache.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.cache.smart_tiered_cache_get_response import SmartTieredCacheGetResponse -from cloudflare.types.cache.smart_tiered_cache_edit_response import SmartTieredCacheEditResponse -from cloudflare.types.cache.smart_tiered_cache_delete_response import SmartTieredCacheDeleteResponse +from cloudflare.types.cache import ( + SmartTieredCacheGetResponse, + SmartTieredCacheEditResponse, + SmartTieredCacheDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,21 +21,17 @@ class TestSmartTieredCache: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: smart_tiered_cache = client.cache.smart_tiered_cache.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(SmartTieredCacheDeleteResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cache.smart_tiered_cache.with_raw_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -41,12 +39,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: smart_tiered_cache = response.parse() assert_matches_type(SmartTieredCacheDeleteResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cache.smart_tiered_cache.with_streaming_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -56,16 +52,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.cache.smart_tiered_cache.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: smart_tiered_cache = client.cache.smart_tiered_cache.edit( @@ -74,7 +67,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(SmartTieredCacheEditResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cache.smart_tiered_cache.with_raw_response.edit( @@ -87,7 +79,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: smart_tiered_cache = response.parse() assert_matches_type(SmartTieredCacheEditResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cache.smart_tiered_cache.with_streaming_response.edit( @@ -102,7 +93,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -111,7 +101,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: smart_tiered_cache = client.cache.smart_tiered_cache.get( @@ -119,7 +108,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(SmartTieredCacheGetResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cache.smart_tiered_cache.with_raw_response.get( @@ -131,7 +119,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: smart_tiered_cache = response.parse() assert_matches_type(SmartTieredCacheGetResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cache.smart_tiered_cache.with_streaming_response.get( @@ -145,7 +132,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -157,21 +143,17 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSmartTieredCache: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: smart_tiered_cache = await async_client.cache.smart_tiered_cache.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(SmartTieredCacheDeleteResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.smart_tiered_cache.with_raw_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -179,12 +161,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: smart_tiered_cache = await response.parse() assert_matches_type(SmartTieredCacheDeleteResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.smart_tiered_cache.with_streaming_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -194,16 +174,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.cache.smart_tiered_cache.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: smart_tiered_cache = await async_client.cache.smart_tiered_cache.edit( @@ -212,7 +189,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SmartTieredCacheEditResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.smart_tiered_cache.with_raw_response.edit( @@ -225,7 +201,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: smart_tiered_cache = await response.parse() assert_matches_type(SmartTieredCacheEditResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.smart_tiered_cache.with_streaming_response.edit( @@ -240,7 +215,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -249,7 +223,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: smart_tiered_cache = await async_client.cache.smart_tiered_cache.get( @@ -257,7 +230,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SmartTieredCacheGetResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.smart_tiered_cache.with_raw_response.get( @@ -269,7 +241,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: smart_tiered_cache = await response.parse() assert_matches_type(SmartTieredCacheGetResponse, smart_tiered_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.smart_tiered_cache.with_streaming_response.get( @@ -283,7 +254,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/cache/test_variants.py b/tests/api_resources/cache/test_variants.py index a790a25d6c6..c46c601fbb8 100644 --- a/tests/api_resources/cache/test_variants.py +++ b/tests/api_resources/cache/test_variants.py @@ -9,9 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.cache.cache_variant import CacheVariant -from cloudflare.types.cache.variant_get_response import VariantGetResponse -from cloudflare.types.cache.variant_edit_response import VariantEditResponse +from cloudflare.types.cache import CacheVariant, VariantGetResponse, VariantEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,21 +17,17 @@ class TestVariants: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: variant = client.cache.variants.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(CacheVariant, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cache.variants.with_raw_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -41,12 +35,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: variant = response.parse() assert_matches_type(CacheVariant, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cache.variants.with_streaming_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -56,16 +48,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.cache.variants.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: variant = client.cache.variants.edit( @@ -74,7 +63,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: variant = client.cache.variants.edit( @@ -95,7 +83,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cache.variants.with_raw_response.edit( @@ -108,7 +95,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: variant = response.parse() assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cache.variants.with_streaming_response.edit( @@ -123,7 +109,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -132,7 +117,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: variant = client.cache.variants.get( @@ -140,7 +124,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(VariantGetResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cache.variants.with_raw_response.get( @@ -152,7 +135,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: variant = response.parse() assert_matches_type(VariantGetResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cache.variants.with_streaming_response.get( @@ -166,7 +148,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -178,21 +159,17 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVariants: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: variant = await async_client.cache.variants.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(CacheVariant, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.variants.with_raw_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -200,12 +177,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: variant = await response.parse() assert_matches_type(CacheVariant, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.variants.with_streaming_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -215,16 +190,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.cache.variants.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: variant = await async_client.cache.variants.edit( @@ -233,7 +205,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: variant = await async_client.cache.variants.edit( @@ -254,7 +225,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.variants.with_raw_response.edit( @@ -267,7 +237,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: variant = await response.parse() assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.variants.with_streaming_response.edit( @@ -282,7 +251,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -291,7 +259,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: variant = await async_client.cache.variants.get( @@ -299,7 +266,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(VariantGetResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.variants.with_raw_response.get( @@ -311,7 +277,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: variant = await response.parse() assert_matches_type(VariantGetResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.variants.with_streaming_response.get( @@ -325,7 +290,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/certificate_authorities/test_hostname_associations.py b/tests/api_resources/certificate_authorities/test_hostname_associations.py index ce33f3b87ff..799d89cd874 100644 --- a/tests/api_resources/certificate_authorities/test_hostname_associations.py +++ b/tests/api_resources/certificate_authorities/test_hostname_associations.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.certificate_authorities.hostname_association_get_response import HostnameAssociationGetResponse -from cloudflare.types.certificate_authorities.hostname_association_update_response import ( +from cloudflare.types.certificate_authorities import ( + HostnameAssociationGetResponse, HostnameAssociationUpdateResponse, ) @@ -20,15 +20,13 @@ class TestHostnameAssociations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: hostname_association = client.certificate_authorities.hostname_associations.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: hostname_association = client.certificate_authorities.hostname_associations.update( @@ -36,9 +34,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: hostnames=["api.example.com", "api.example.com", "api.example.com"], mtls_certificate_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ) - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.certificate_authorities.hostname_associations.with_raw_response.update( @@ -48,9 +45,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.certificate_authorities.hostname_associations.with_streaming_response.update( @@ -60,11 +56,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -72,24 +67,21 @@ def test_path_params_update(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: hostname_association = client.certificate_authorities.hostname_associations.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationGetResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: hostname_association = client.certificate_authorities.hostname_associations.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", mtls_certificate_id="b2134436-2555-4acf-be5b-26c48136575e", ) - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationGetResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.certificate_authorities.hostname_associations.with_raw_response.get( @@ -99,9 +91,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationGetResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.certificate_authorities.hostname_associations.with_streaming_response.get( @@ -111,11 +102,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationGetResponse], hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -127,15 +117,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHostnameAssociations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: hostname_association = await async_client.certificate_authorities.hostname_associations.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: hostname_association = await async_client.certificate_authorities.hostname_associations.update( @@ -143,9 +131,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare hostnames=["api.example.com", "api.example.com", "api.example.com"], mtls_certificate_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ) - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.certificate_authorities.hostname_associations.with_raw_response.update( @@ -155,9 +142,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.certificate_authorities.hostname_associations.with_streaming_response.update( @@ -167,11 +153,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationUpdateResponse], hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -179,24 +164,21 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: hostname_association = await async_client.certificate_authorities.hostname_associations.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationGetResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: hostname_association = await async_client.certificate_authorities.hostname_associations.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", mtls_certificate_id="b2134436-2555-4acf-be5b-26c48136575e", ) - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationGetResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.certificate_authorities.hostname_associations.with_raw_response.get( @@ -206,9 +188,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationGetResponse], hostname_association, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.certificate_authorities.hostname_associations.with_streaming_response.get( @@ -218,11 +199,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(Optional[HostnameAssociationGetResponse], hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/challenges/test_widgets.py b/tests/api_resources/challenges/test_widgets.py index a87a1021b16..4182376aa3d 100644 --- a/tests/api_resources/challenges/test_widgets.py +++ b/tests/api_resources/challenges/test_widgets.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.challenges.widget import Widget -from cloudflare.types.challenges.widget_list_response import WidgetListResponse +from cloudflare.types.challenges import ( + Widget, + WidgetListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestWidgets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: widget = client.challenges.widgets.create( @@ -30,7 +31,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: widget = client.challenges.widgets.create( @@ -49,7 +49,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.create( @@ -64,7 +63,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: widget = response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.create( @@ -81,7 +79,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -92,7 +89,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="blog.cloudflare.com login form", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: widget = client.challenges.widgets.update( @@ -104,7 +100,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: widget = client.challenges.widgets.update( @@ -119,7 +114,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.update( @@ -135,7 +129,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: widget = response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.update( @@ -153,7 +146,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -174,7 +166,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="blog.cloudflare.com login form", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: widget = client.challenges.widgets.list( @@ -182,7 +173,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: widget = client.challenges.widgets.list( @@ -194,7 +184,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.list( @@ -206,7 +195,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: widget = response.parse() assert_matches_type(SyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.list( @@ -220,7 +208,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -228,7 +215,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: widget = client.challenges.widgets.delete( @@ -237,7 +223,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.delete( @@ -250,7 +235,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: widget = response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.delete( @@ -265,7 +249,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -280,7 +263,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: widget = client.challenges.widgets.get( @@ -289,7 +271,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.get( @@ -302,7 +283,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: widget = response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.get( @@ -317,7 +297,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -332,7 +311,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_rotate_secret(self, client: Cloudflare) -> None: widget = client.challenges.widgets.rotate_secret( @@ -341,7 +319,6 @@ def test_method_rotate_secret(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_rotate_secret_with_all_params(self, client: Cloudflare) -> None: widget = client.challenges.widgets.rotate_secret( @@ -351,7 +328,6 @@ def test_method_rotate_secret_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_rotate_secret(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.rotate_secret( @@ -364,7 +340,6 @@ def test_raw_response_rotate_secret(self, client: Cloudflare) -> None: widget = response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_rotate_secret(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.rotate_secret( @@ -379,7 +354,6 @@ def test_streaming_response_rotate_secret(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_rotate_secret(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -398,7 +372,6 @@ def test_path_params_rotate_secret(self, client: Cloudflare) -> None: class TestAsyncWidgets: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.create( @@ -409,7 +382,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.create( @@ -428,7 +400,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.create( @@ -443,7 +414,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: widget = await response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.create( @@ -460,7 +430,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -471,7 +440,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="blog.cloudflare.com login form", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.update( @@ -483,7 +451,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.update( @@ -498,7 +465,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.update( @@ -514,7 +480,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: widget = await response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.update( @@ -532,7 +497,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -553,7 +517,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="blog.cloudflare.com login form", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.list( @@ -561,7 +524,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.list( @@ -573,7 +535,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.list( @@ -585,7 +546,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: widget = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.list( @@ -599,7 +559,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -607,7 +566,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.delete( @@ -616,7 +574,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.delete( @@ -629,7 +586,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: widget = await response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.delete( @@ -644,7 +600,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -659,7 +614,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.get( @@ -668,7 +622,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.get( @@ -681,7 +634,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: widget = await response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.get( @@ -696,7 +648,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -711,7 +662,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_rotate_secret(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.rotate_secret( @@ -720,7 +670,6 @@ async def test_method_rotate_secret(self, async_client: AsyncCloudflare) -> None ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_rotate_secret_with_all_params(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.rotate_secret( @@ -730,7 +679,6 @@ async def test_method_rotate_secret_with_all_params(self, async_client: AsyncClo ) assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_rotate_secret(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.rotate_secret( @@ -743,7 +691,6 @@ async def test_raw_response_rotate_secret(self, async_client: AsyncCloudflare) - widget = await response.parse() assert_matches_type(Optional[Widget], widget, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_rotate_secret(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.rotate_secret( @@ -758,7 +705,6 @@ async def test_streaming_response_rotate_secret(self, async_client: AsyncCloudfl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_rotate_secret(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/cloudforce_one/requests/test_message.py b/tests/api_resources/cloudforce_one/requests/test_message.py index 54822be59d5..e804d3ab846 100644 --- a/tests/api_resources/cloudforce_one/requests/test_message.py +++ b/tests/api_resources/cloudforce_one/requests/test_message.py @@ -3,16 +3,18 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.cloudforce_one.requests.message import Message -from cloudflare.types.cloudforce_one.requests.message_get_response import MessageGetResponse -from cloudflare.types.cloudforce_one.requests.message_delete_response import MessageDeleteResponse +from cloudflare.types.cloudforce_one.requests import ( + Message, + MessageGetResponse, + MessageDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,16 +22,14 @@ class TestMessage: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.create( @@ -37,9 +37,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="Can you elaborate on the type of DoS that occurred?", ) - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.create( @@ -50,9 +49,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.create( @@ -63,11 +61,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -82,7 +79,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.update( @@ -90,9 +86,8 @@ def test_method_update(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.update( @@ -105,9 +100,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: summary="DoS attack", tlp="clear", ) - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.update( @@ -119,9 +113,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.update( @@ -133,11 +126,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -154,7 +146,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: request_identifier="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.delete( @@ -164,7 +155,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(MessageDeleteResponse, message, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.delete( @@ -178,7 +168,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: message = response.parse() assert_matches_type(MessageDeleteResponse, message, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.delete( @@ -194,7 +183,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -211,7 +199,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: request_identifier="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.get( @@ -220,9 +207,8 @@ def test_method_get(self, client: Cloudflare) -> None: page=0, per_page=10, ) - assert_matches_type(MessageGetResponse, message, path=["response"]) + assert_matches_type(Optional[MessageGetResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.get( @@ -235,9 +221,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: sort_by="created", sort_order="asc", ) - assert_matches_type(MessageGetResponse, message, path=["response"]) + assert_matches_type(Optional[MessageGetResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.get( @@ -250,9 +235,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(MessageGetResponse, message, path=["response"]) + assert_matches_type(Optional[MessageGetResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.get( @@ -265,11 +249,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(MessageGetResponse, message, path=["response"]) + assert_matches_type(Optional[MessageGetResponse], message, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -292,16 +275,14 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMessage: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.create( @@ -309,9 +290,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="Can you elaborate on the type of DoS that occurred?", ) - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.create( @@ -322,9 +302,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.create( @@ -335,11 +314,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -354,7 +332,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.update( @@ -362,9 +339,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.update( @@ -377,9 +353,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare summary="DoS attack", tlp="clear", ) - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.update( @@ -391,9 +366,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.update( @@ -405,11 +379,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(Message, message, path=["response"]) + assert_matches_type(Optional[Message], message, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -426,7 +399,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: request_identifier="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.delete( @@ -436,7 +408,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(MessageDeleteResponse, message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.delete( @@ -450,7 +421,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: message = await response.parse() assert_matches_type(MessageDeleteResponse, message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.delete( @@ -466,7 +436,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -483,7 +452,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: request_identifier="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.get( @@ -492,9 +460,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: page=0, per_page=10, ) - assert_matches_type(MessageGetResponse, message, path=["response"]) + assert_matches_type(Optional[MessageGetResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.get( @@ -507,9 +474,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - sort_by="created", sort_order="asc", ) - assert_matches_type(MessageGetResponse, message, path=["response"]) + assert_matches_type(Optional[MessageGetResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.get( @@ -522,9 +488,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(MessageGetResponse, message, path=["response"]) + assert_matches_type(Optional[MessageGetResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.get( @@ -537,11 +502,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(MessageGetResponse, message, path=["response"]) + assert_matches_type(Optional[MessageGetResponse], message, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/cloudforce_one/requests/test_priority.py b/tests/api_resources/cloudforce_one/requests/test_priority.py index 9b3aa3fffdc..012e01b34cf 100644 --- a/tests/api_resources/cloudforce_one/requests/test_priority.py +++ b/tests/api_resources/cloudforce_one/requests/test_priority.py @@ -3,16 +3,17 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.cloudforce_one.item import Item -from cloudflare.types.cloudforce_one.quota import Quota -from cloudflare.types.cloudforce_one.requests.priority import Priority -from cloudflare.types.cloudforce_one.requests.priority_delete_response import PriorityDeleteResponse +from cloudflare.types.cloudforce_one import Item, Quota +from cloudflare.types.cloudforce_one.requests import ( + Priority, + PriorityDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +21,6 @@ class TestPriority: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.create( @@ -30,9 +30,8 @@ def test_method_create(self, client: Cloudflare) -> None: requirement="DoS attacks carried out by CVEs", tlp="clear", ) - assert_matches_type(Priority, priority, path=["response"]) + assert_matches_type(Optional[Priority], priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.create( @@ -46,9 +45,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(Priority, priority, path=["response"]) + assert_matches_type(Optional[Priority], priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.create( @@ -62,11 +60,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(Priority, priority, path=["response"]) + assert_matches_type(Optional[Priority], priority, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -78,7 +75,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: tlp="clear", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.update( @@ -89,9 +85,8 @@ def test_method_update(self, client: Cloudflare) -> None: requirement="DoS attacks carried out by CVEs", tlp="clear", ) - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.update( @@ -106,9 +101,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.update( @@ -123,11 +117,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -150,7 +143,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: tlp="clear", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.delete( @@ -159,7 +151,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(PriorityDeleteResponse, priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.delete( @@ -172,7 +163,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: priority = response.parse() assert_matches_type(PriorityDeleteResponse, priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.delete( @@ -187,7 +177,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -202,16 +191,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.get( @@ -222,9 +209,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.get( @@ -235,11 +221,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -254,15 +239,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_quota(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.quota( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Quota, priority, path=["response"]) + assert_matches_type(Optional[Quota], priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_quota(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.quota( @@ -272,9 +255,8 @@ def test_raw_response_quota(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(Quota, priority, path=["response"]) + assert_matches_type(Optional[Quota], priority, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_quota(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.quota( @@ -284,11 +266,10 @@ def test_streaming_response_quota(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(Quota, priority, path=["response"]) + assert_matches_type(Optional[Quota], priority, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_quota(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -300,7 +281,6 @@ def test_path_params_quota(self, client: Cloudflare) -> None: class TestAsyncPriority: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.create( @@ -310,9 +290,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: requirement="DoS attacks carried out by CVEs", tlp="clear", ) - assert_matches_type(Priority, priority, path=["response"]) + assert_matches_type(Optional[Priority], priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.create( @@ -326,9 +305,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(Priority, priority, path=["response"]) + assert_matches_type(Optional[Priority], priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.create( @@ -342,11 +320,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(Priority, priority, path=["response"]) + assert_matches_type(Optional[Priority], priority, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -358,7 +335,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: tlp="clear", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.update( @@ -369,9 +345,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: requirement="DoS attacks carried out by CVEs", tlp="clear", ) - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.update( @@ -386,9 +361,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.update( @@ -403,11 +377,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -430,7 +403,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: tlp="clear", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.delete( @@ -439,7 +411,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PriorityDeleteResponse, priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.delete( @@ -452,7 +423,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: priority = await response.parse() assert_matches_type(PriorityDeleteResponse, priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.delete( @@ -467,7 +437,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -482,16 +451,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.get( @@ -502,9 +469,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.get( @@ -515,11 +481,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(Item, priority, path=["response"]) + assert_matches_type(Optional[Item], priority, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -534,15 +499,13 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_quota(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.quota( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Quota, priority, path=["response"]) + assert_matches_type(Optional[Quota], priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_quota(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.quota( @@ -552,9 +515,8 @@ async def test_raw_response_quota(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(Quota, priority, path=["response"]) + assert_matches_type(Optional[Quota], priority, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_quota(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.quota( @@ -564,11 +526,10 @@ async def test_streaming_response_quota(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(Quota, priority, path=["response"]) + assert_matches_type(Optional[Quota], priority, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_quota(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/cloudforce_one/test_requests.py b/tests/api_resources/cloudforce_one/test_requests.py index c39acd3c50c..9e43e1a22b2 100644 --- a/tests/api_resources/cloudforce_one/test_requests.py +++ b/tests/api_resources/cloudforce_one/test_requests.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest @@ -11,12 +11,14 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.cloudforce_one.item import Item -from cloudflare.types.cloudforce_one.quota import Quota -from cloudflare.types.cloudforce_one.list_item import ListItem -from cloudflare.types.cloudforce_one.request_types import RequestTypes -from cloudflare.types.cloudforce_one.request_constants import RequestConstants -from cloudflare.types.cloudforce_one.request_delete_response import RequestDeleteResponse +from cloudflare.types.cloudforce_one import ( + Item, + Quota, + ListItem, + RequestTypes, + RequestConstants, + RequestDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,15 +26,13 @@ class TestRequests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.create( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.create( @@ -43,9 +43,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: summary="DoS attack", tlp="clear", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.create( @@ -55,9 +54,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.create( @@ -67,11 +65,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -79,16 +76,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.update( @@ -100,9 +95,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: summary="DoS attack", tlp="clear", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.update( @@ -113,9 +107,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.update( @@ -126,11 +119,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -145,7 +137,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.list( @@ -155,7 +146,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[ListItem], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.list( @@ -173,7 +163,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[ListItem], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.list( @@ -187,7 +176,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: request = response.parse() assert_matches_type(SyncV4PagePaginationArray[ListItem], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.list( @@ -203,7 +191,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -213,7 +200,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: per_page=10, ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.delete( @@ -222,7 +208,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(RequestDeleteResponse, request, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.delete( @@ -235,7 +220,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: request = response.parse() assert_matches_type(RequestDeleteResponse, request, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.delete( @@ -250,7 +234,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -265,15 +248,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_constants(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.constants( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestConstants, request, path=["response"]) + assert_matches_type(Optional[RequestConstants], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_constants(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.constants( @@ -283,9 +264,8 @@ def test_raw_response_constants(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestConstants, request, path=["response"]) + assert_matches_type(Optional[RequestConstants], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_constants(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.constants( @@ -295,11 +275,10 @@ def test_streaming_response_constants(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestConstants, request, path=["response"]) + assert_matches_type(Optional[RequestConstants], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_constants(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -307,16 +286,14 @@ def test_path_params_constants(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.get( @@ -327,9 +304,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.get( @@ -340,11 +316,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -359,15 +334,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_quota(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.quota( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Quota, request, path=["response"]) + assert_matches_type(Optional[Quota], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_quota(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.quota( @@ -377,9 +350,8 @@ def test_raw_response_quota(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(Quota, request, path=["response"]) + assert_matches_type(Optional[Quota], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_quota(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.quota( @@ -389,11 +361,10 @@ def test_streaming_response_quota(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(Quota, request, path=["response"]) + assert_matches_type(Optional[Quota], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_quota(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -401,15 +372,13 @@ def test_path_params_quota(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_types(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.types( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestTypes, request, path=["response"]) + assert_matches_type(Optional[RequestTypes], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_types(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.types( @@ -419,9 +388,8 @@ def test_raw_response_types(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestTypes, request, path=["response"]) + assert_matches_type(Optional[RequestTypes], request, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_types(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.types( @@ -431,11 +399,10 @@ def test_streaming_response_types(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestTypes, request, path=["response"]) + assert_matches_type(Optional[RequestTypes], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_types(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -447,15 +414,13 @@ def test_path_params_types(self, client: Cloudflare) -> None: class TestAsyncRequests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.create( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.create( @@ -466,9 +431,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare summary="DoS attack", tlp="clear", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.create( @@ -478,9 +442,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.create( @@ -490,11 +453,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -502,16 +464,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.update( @@ -523,9 +483,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare summary="DoS attack", tlp="clear", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.update( @@ -536,9 +495,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.update( @@ -549,11 +507,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -568,7 +525,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.list( @@ -578,7 +534,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[ListItem], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.list( @@ -596,7 +551,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[ListItem], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.list( @@ -610,7 +564,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: request = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[ListItem], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.list( @@ -626,7 +579,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -636,7 +588,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: per_page=10, ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.delete( @@ -645,7 +596,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RequestDeleteResponse, request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.delete( @@ -658,7 +608,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: request = await response.parse() assert_matches_type(RequestDeleteResponse, request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.delete( @@ -673,7 +622,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -688,15 +636,13 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_constants(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.constants( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestConstants, request, path=["response"]) + assert_matches_type(Optional[RequestConstants], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_constants(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.constants( @@ -706,9 +652,8 @@ async def test_raw_response_constants(self, async_client: AsyncCloudflare) -> No assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestConstants, request, path=["response"]) + assert_matches_type(Optional[RequestConstants], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_constants(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.constants( @@ -718,11 +663,10 @@ async def test_streaming_response_constants(self, async_client: AsyncCloudflare) assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestConstants, request, path=["response"]) + assert_matches_type(Optional[RequestConstants], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_constants(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -730,16 +674,14 @@ async def test_path_params_constants(self, async_client: AsyncCloudflare) -> Non "", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.get( @@ -750,9 +692,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.get( @@ -763,11 +704,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(Item, request, path=["response"]) + assert_matches_type(Optional[Item], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -782,15 +722,13 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_quota(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.quota( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Quota, request, path=["response"]) + assert_matches_type(Optional[Quota], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_quota(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.quota( @@ -800,9 +738,8 @@ async def test_raw_response_quota(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(Quota, request, path=["response"]) + assert_matches_type(Optional[Quota], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_quota(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.quota( @@ -812,11 +749,10 @@ async def test_streaming_response_quota(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(Quota, request, path=["response"]) + assert_matches_type(Optional[Quota], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_quota(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -824,15 +760,13 @@ async def test_path_params_quota(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_types(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.types( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestTypes, request, path=["response"]) + assert_matches_type(Optional[RequestTypes], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_types(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.types( @@ -842,9 +776,8 @@ async def test_raw_response_types(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestTypes, request, path=["response"]) + assert_matches_type(Optional[RequestTypes], request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_types(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.types( @@ -854,11 +787,10 @@ async def test_streaming_response_types(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestTypes, request, path=["response"]) + assert_matches_type(Optional[RequestTypes], request, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_types(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/custom_certificates/test_prioritize.py b/tests/api_resources/custom_certificates/test_prioritize.py index 74cd185a801..25accbd83cb 100644 --- a/tests/api_resources/custom_certificates/test_prioritize.py +++ b/tests/api_resources/custom_certificates/test_prioritize.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.custom_certificates.prioritize_update_response import PrioritizeUpdateResponse +from cloudflare.types.custom_certificates import PrioritizeUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestPrioritize: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: prioritize = client.custom_certificates.prioritize.update( @@ -26,7 +25,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[PrioritizeUpdateResponse], prioritize, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.custom_certificates.prioritize.with_raw_response.update( @@ -39,7 +37,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: prioritize = response.parse() assert_matches_type(Optional[PrioritizeUpdateResponse], prioritize, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.custom_certificates.prioritize.with_streaming_response.update( @@ -54,7 +51,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -67,7 +63,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncPrioritize: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: prioritize = await async_client.custom_certificates.prioritize.update( @@ -76,7 +71,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[PrioritizeUpdateResponse], prioritize, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.prioritize.with_raw_response.update( @@ -89,7 +83,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: prioritize = await response.parse() assert_matches_type(Optional[PrioritizeUpdateResponse], prioritize, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.prioritize.with_streaming_response.update( @@ -104,7 +97,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/custom_hostnames/test_fallback_origin.py b/tests/api_resources/custom_hostnames/test_fallback_origin.py index 67c87c3bbb3..06e7260f852 100644 --- a/tests/api_resources/custom_hostnames/test_fallback_origin.py +++ b/tests/api_resources/custom_hostnames/test_fallback_origin.py @@ -3,15 +3,17 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.custom_hostnames.fallback_origin_get_response import FallbackOriginGetResponse -from cloudflare.types.custom_hostnames.fallback_origin_delete_response import FallbackOriginDeleteResponse -from cloudflare.types.custom_hostnames.fallback_origin_update_response import FallbackOriginUpdateResponse +from cloudflare.types.custom_hostnames import ( + FallbackOriginGetResponse, + FallbackOriginDeleteResponse, + FallbackOriginUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,16 +21,14 @@ class TestFallbackOrigin: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: fallback_origin = client.custom_hostnames.fallback_origin.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", origin="fallback.example.com", ) - assert_matches_type(FallbackOriginUpdateResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginUpdateResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.custom_hostnames.fallback_origin.with_raw_response.update( @@ -39,9 +39,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = response.parse() - assert_matches_type(FallbackOriginUpdateResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginUpdateResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.custom_hostnames.fallback_origin.with_streaming_response.update( @@ -52,11 +51,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = response.parse() - assert_matches_type(FallbackOriginUpdateResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginUpdateResponse], fallback_origin, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -65,61 +63,51 @@ def test_path_params_update(self, client: Cloudflare) -> None: origin="fallback.example.com", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: fallback_origin = client.custom_hostnames.fallback_origin.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(FallbackOriginDeleteResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginDeleteResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_hostnames.fallback_origin.with_raw_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = response.parse() - assert_matches_type(FallbackOriginDeleteResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginDeleteResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_hostnames.fallback_origin.with_streaming_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = response.parse() - assert_matches_type(FallbackOriginDeleteResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginDeleteResponse], fallback_origin, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_hostnames.fallback_origin.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: fallback_origin = client.custom_hostnames.fallback_origin.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(FallbackOriginGetResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginGetResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.custom_hostnames.fallback_origin.with_raw_response.get( @@ -129,9 +117,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = response.parse() - assert_matches_type(FallbackOriginGetResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginGetResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.custom_hostnames.fallback_origin.with_streaming_response.get( @@ -141,11 +128,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = response.parse() - assert_matches_type(FallbackOriginGetResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginGetResponse], fallback_origin, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -157,16 +143,14 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFallbackOrigin: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: fallback_origin = await async_client.custom_hostnames.fallback_origin.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", origin="fallback.example.com", ) - assert_matches_type(FallbackOriginUpdateResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginUpdateResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.fallback_origin.with_raw_response.update( @@ -177,9 +161,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = await response.parse() - assert_matches_type(FallbackOriginUpdateResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginUpdateResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.fallback_origin.with_streaming_response.update( @@ -190,11 +173,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = await response.parse() - assert_matches_type(FallbackOriginUpdateResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginUpdateResponse], fallback_origin, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -203,61 +185,51 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origin="fallback.example.com", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: fallback_origin = await async_client.custom_hostnames.fallback_origin.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(FallbackOriginDeleteResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginDeleteResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.fallback_origin.with_raw_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = await response.parse() - assert_matches_type(FallbackOriginDeleteResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginDeleteResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.fallback_origin.with_streaming_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = await response.parse() - assert_matches_type(FallbackOriginDeleteResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginDeleteResponse], fallback_origin, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_hostnames.fallback_origin.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: fallback_origin = await async_client.custom_hostnames.fallback_origin.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(FallbackOriginGetResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginGetResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.fallback_origin.with_raw_response.get( @@ -267,9 +239,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = await response.parse() - assert_matches_type(FallbackOriginGetResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginGetResponse], fallback_origin, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.fallback_origin.with_streaming_response.get( @@ -279,11 +250,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_origin = await response.parse() - assert_matches_type(FallbackOriginGetResponse, fallback_origin, path=["response"]) + assert_matches_type(Optional[FallbackOriginGetResponse], fallback_origin, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/d1/test_database.py b/tests/api_resources/d1/test_database.py index e651a529153..30697981791 100644 --- a/tests/api_resources/d1/test_database.py +++ b/tests/api_resources/d1/test_database.py @@ -9,12 +9,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types.d1 import ( + D1, + DatabaseListResponse, + DatabaseQueryResponse, + DatabaseCreateResponse, + DatabaseDeleteResponse, +) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.d1.d1 import D1 -from cloudflare.types.d1.database_list_response import DatabaseListResponse -from cloudflare.types.d1.database_query_response import DatabaseQueryResponse -from cloudflare.types.d1.database_create_response import DatabaseCreateResponse -from cloudflare.types.d1.database_delete_response import DatabaseDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,6 @@ class TestDatabase: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: database = client.d1.database.create( @@ -31,7 +32,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(DatabaseCreateResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.create( @@ -44,7 +44,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: database = response.parse() assert_matches_type(DatabaseCreateResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.create( @@ -59,7 +58,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -68,7 +66,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="my-database", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: database = client.d1.database.list( @@ -76,7 +73,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: database = client.d1.database.list( @@ -87,7 +83,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.list( @@ -99,7 +94,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: database = response.parse() assert_matches_type(SyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.list( @@ -113,7 +107,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -121,7 +114,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: database = client.d1.database.delete( @@ -130,7 +122,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(DatabaseDeleteResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.delete( @@ -143,7 +134,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: database = response.parse() assert_matches_type(DatabaseDeleteResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.delete( @@ -158,7 +148,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -173,7 +162,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: database = client.d1.database.get( @@ -182,7 +170,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(D1, database, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.get( @@ -195,7 +182,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: database = response.parse() assert_matches_type(D1, database, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.get( @@ -210,7 +196,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -225,7 +210,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_query(self, client: Cloudflare) -> None: database = client.d1.database.query( @@ -235,7 +219,6 @@ def test_method_query(self, client: Cloudflare) -> None: ) assert_matches_type(DatabaseQueryResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_query_with_all_params(self, client: Cloudflare) -> None: database = client.d1.database.query( @@ -246,7 +229,6 @@ def test_method_query_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(DatabaseQueryResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_query(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.query( @@ -260,7 +242,6 @@ def test_raw_response_query(self, client: Cloudflare) -> None: database = response.parse() assert_matches_type(DatabaseQueryResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_query(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.query( @@ -276,7 +257,6 @@ def test_streaming_response_query(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_query(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -297,7 +277,6 @@ def test_path_params_query(self, client: Cloudflare) -> None: class TestAsyncDatabase: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.create( @@ -306,7 +285,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatabaseCreateResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.create( @@ -319,7 +297,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: database = await response.parse() assert_matches_type(DatabaseCreateResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.create( @@ -334,7 +311,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -343,7 +319,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="my-database", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.list( @@ -351,7 +326,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.list( @@ -362,7 +336,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.list( @@ -374,7 +347,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: database = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.list( @@ -388,7 +360,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -396,7 +367,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.delete( @@ -405,7 +375,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatabaseDeleteResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.delete( @@ -418,7 +387,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: database = await response.parse() assert_matches_type(DatabaseDeleteResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.delete( @@ -433,7 +401,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -448,7 +415,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.get( @@ -457,7 +423,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(D1, database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.get( @@ -470,7 +435,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: database = await response.parse() assert_matches_type(D1, database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.get( @@ -485,7 +449,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -500,7 +463,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_query(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.query( @@ -510,7 +472,6 @@ async def test_method_query(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatabaseQueryResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.query( @@ -521,7 +482,6 @@ async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(DatabaseQueryResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.query( @@ -535,7 +495,6 @@ async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: database = await response.parse() assert_matches_type(DatabaseQueryResponse, database, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.query( @@ -551,7 +510,6 @@ async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/dcv_delegation/test_uuid.py b/tests/api_resources/dcv_delegation/test_uuid.py index b579d630a43..a1d65863aa7 100644 --- a/tests/api_resources/dcv_delegation/test_uuid.py +++ b/tests/api_resources/dcv_delegation/test_uuid.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.dcv_delegation.dcv_delegation_uuid import DCVDelegationUUID +from cloudflare.types.dcv_delegation import DCVDelegationUUID base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,15 +17,13 @@ class TestUUID: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: uuid = client.dcv_delegation.uuid.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) + assert_matches_type(Optional[DCVDelegationUUID], uuid, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dcv_delegation.uuid.with_raw_response.get( @@ -35,9 +33,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = response.parse() - assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) + assert_matches_type(Optional[DCVDelegationUUID], uuid, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dcv_delegation.uuid.with_streaming_response.get( @@ -47,11 +44,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = response.parse() - assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) + assert_matches_type(Optional[DCVDelegationUUID], uuid, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,15 +59,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncUUID: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: uuid = await async_client.dcv_delegation.uuid.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) + assert_matches_type(Optional[DCVDelegationUUID], uuid, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dcv_delegation.uuid.with_raw_response.get( @@ -81,9 +75,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = await response.parse() - assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) + assert_matches_type(Optional[DCVDelegationUUID], uuid, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dcv_delegation.uuid.with_streaming_response.get( @@ -93,11 +86,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = await response.parse() - assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) + assert_matches_type(Optional[DCVDelegationUUID], uuid, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/diagnostics/test_traceroutes.py b/tests/api_resources/diagnostics/test_traceroutes.py index 016476eebe5..930de49727f 100644 --- a/tests/api_resources/diagnostics/test_traceroutes.py +++ b/tests/api_resources/diagnostics/test_traceroutes.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.diagnostics.traceroute_create_response import TracerouteCreateResponse +from cloudflare.types.diagnostics import TracerouteCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestTraceroutes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: traceroute = client.diagnostics.traceroutes.create( @@ -26,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TracerouteCreateResponse], traceroute, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: traceroute = client.diagnostics.traceroutes.create( @@ -43,7 +41,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TracerouteCreateResponse], traceroute, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.diagnostics.traceroutes.with_raw_response.create( @@ -56,7 +53,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: traceroute = response.parse() assert_matches_type(Optional[TracerouteCreateResponse], traceroute, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.diagnostics.traceroutes.with_streaming_response.create( @@ -71,7 +67,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -84,7 +79,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTraceroutes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: traceroute = await async_client.diagnostics.traceroutes.create( @@ -93,7 +87,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TracerouteCreateResponse], traceroute, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: traceroute = await async_client.diagnostics.traceroutes.create( @@ -110,7 +103,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[TracerouteCreateResponse], traceroute, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.diagnostics.traceroutes.with_raw_response.create( @@ -123,7 +115,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: traceroute = await response.parse() assert_matches_type(Optional[TracerouteCreateResponse], traceroute, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.diagnostics.traceroutes.with_streaming_response.create( @@ -138,7 +129,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/dns/analytics/reports/test_bytimes.py b/tests/api_resources/dns/analytics/reports/test_bytimes.py index 5959ed99263..73408198645 100644 --- a/tests/api_resources/dns/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns/analytics/reports/test_bytimes.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.analytics.reports.by_time import ByTime +from cloudflare.types.dns.analytics.reports import ByTime base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestBytimes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bytime = client.dns.analytics.reports.bytimes.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bytime = client.dns.analytics.reports.bytimes.get( @@ -42,7 +40,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.analytics.reports.bytimes.with_raw_response.get( @@ -54,7 +51,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: bytime = response.parse() assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.analytics.reports.bytimes.with_streaming_response.get( @@ -68,7 +64,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -80,7 +75,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBytimes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.dns.analytics.reports.bytimes.get( @@ -88,7 +82,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.dns.analytics.reports.bytimes.get( @@ -104,7 +97,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.analytics.reports.bytimes.with_raw_response.get( @@ -116,7 +108,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: bytime = await response.parse() assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.analytics.reports.bytimes.with_streaming_response.get( @@ -130,7 +121,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/dns/analytics/test_reports.py b/tests/api_resources/dns/analytics/test_reports.py index bdf0584439e..89dae97959c 100644 --- a/tests/api_resources/dns/analytics/test_reports.py +++ b/tests/api_resources/dns/analytics/test_reports.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.analytics.report import Report +from cloudflare.types.dns.analytics import Report base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestReports: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: report = client.dns.analytics.reports.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: report = client.dns.analytics.reports.get( @@ -41,7 +39,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.analytics.reports.with_raw_response.get( @@ -53,7 +50,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: report = response.parse() assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.analytics.reports.with_streaming_response.get( @@ -67,7 +63,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -79,7 +74,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReports: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: report = await async_client.dns.analytics.reports.get( @@ -87,7 +81,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: report = await async_client.dns.analytics.reports.get( @@ -102,7 +95,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.analytics.reports.with_raw_response.get( @@ -114,7 +106,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: report = await response.parse() assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.analytics.reports.with_streaming_response.get( @@ -128,7 +119,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py b/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py index afa2d3787af..0aa48692e20 100644 --- a/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.analytics.reports.by_time import ByTime +from cloudflare.types.dns.analytics.reports import ByTime base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestBytimes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bytime = client.dns.firewall.analytics.reports.bytimes.get( @@ -27,7 +26,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bytime = client.dns.firewall.analytics.reports.bytimes.get( @@ -44,7 +42,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( @@ -57,7 +54,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: bytime = response.parse() assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.firewall.analytics.reports.bytimes.with_streaming_response.get( @@ -72,7 +68,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -91,7 +86,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBytimes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.dns.firewall.analytics.reports.bytimes.get( @@ -100,7 +94,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.dns.firewall.analytics.reports.bytimes.get( @@ -117,7 +110,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( @@ -130,7 +122,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: bytime = await response.parse() assert_matches_type(Optional[ByTime], bytime, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.analytics.reports.bytimes.with_streaming_response.get( @@ -145,7 +136,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/dns/firewall/analytics/test_reports.py b/tests/api_resources/dns/firewall/analytics/test_reports.py index 3229cd5a8ac..985ac0d448f 100644 --- a/tests/api_resources/dns/firewall/analytics/test_reports.py +++ b/tests/api_resources/dns/firewall/analytics/test_reports.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.analytics.report import Report +from cloudflare.types.dns.analytics import Report base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestReports: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: report = client.dns.firewall.analytics.reports.get( @@ -27,7 +26,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: report = client.dns.firewall.analytics.reports.get( @@ -43,7 +41,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.firewall.analytics.reports.with_raw_response.get( @@ -56,7 +53,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: report = response.parse() assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.firewall.analytics.reports.with_streaming_response.get( @@ -71,7 +67,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -90,7 +85,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReports: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: report = await async_client.dns.firewall.analytics.reports.get( @@ -99,7 +93,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: report = await async_client.dns.firewall.analytics.reports.get( @@ -115,7 +108,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.analytics.reports.with_raw_response.get( @@ -128,7 +120,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: report = await response.parse() assert_matches_type(Optional[Report], report, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.analytics.reports.with_streaming_response.get( @@ -143,7 +134,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/dns/test_firewall.py b/tests/api_resources/dns/test_firewall.py index e6b536e9e09..5d5d6f8646c 100644 --- a/tests/api_resources/dns/test_firewall.py +++ b/tests/api_resources/dns/test_firewall.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types.dns import ( + FirewallDeleteResponse, +) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.dns.firewall.firewall import Firewall -from cloudflare.types.dns.firewall_delete_response import FirewallDeleteResponse +from cloudflare.types.dns.firewall import Firewall base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestFirewall: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: firewall = client.dns.firewall.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: firewall = client.dns.firewall.create( @@ -50,7 +50,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.create( @@ -64,7 +63,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: firewall = response.parse() assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.create( @@ -80,7 +78,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -90,7 +87,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: firewall = client.dns.firewall.list( @@ -98,7 +94,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Firewall], firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: firewall = client.dns.firewall.list( @@ -108,7 +103,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Firewall], firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.list( @@ -120,7 +114,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: firewall = response.parse() assert_matches_type(SyncV4PagePaginationArray[Firewall], firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.list( @@ -134,7 +127,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -142,23 +134,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: firewall = client.dns.firewall.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -166,13 +154,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: firewall = response.parse() assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -182,24 +168,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.dns.firewall.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: firewall = client.dns.firewall.edit( @@ -215,7 +197,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: firewall = client.dns.firewall.edit( @@ -238,7 +219,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.edit( @@ -258,7 +238,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: firewall = response.parse() assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.edit( @@ -280,7 +259,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -309,7 +287,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: firewall = client.dns.firewall.get( @@ -318,7 +295,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.get( @@ -331,7 +307,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: firewall = response.parse() assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.get( @@ -346,7 +321,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -365,7 +339,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFirewall: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.create( @@ -375,7 +348,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.create( @@ -396,7 +368,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.create( @@ -410,7 +381,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: firewall = await response.parse() assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.create( @@ -426,7 +396,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -436,7 +405,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.list( @@ -444,7 +412,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[Firewall], firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.list( @@ -454,7 +421,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Firewall], firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.list( @@ -466,7 +432,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: firewall = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Firewall], firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.list( @@ -480,7 +445,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -488,23 +452,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -512,13 +472,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: firewall = await response.parse() assert_matches_type(FirewallDeleteResponse, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -528,24 +486,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.dns.firewall.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.edit( @@ -561,7 +515,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.edit( @@ -584,7 +537,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.edit( @@ -604,7 +556,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: firewall = await response.parse() assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.edit( @@ -626,7 +577,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -655,7 +605,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.get( @@ -664,7 +613,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.get( @@ -677,7 +625,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: firewall = await response.parse() assert_matches_type(Firewall, firewall, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.get( @@ -692,7 +639,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index 6999945188d..afb7b9304be 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -9,11 +9,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types.dns import ( + Record, + RecordScanResponse, + RecordDeleteResponse, + RecordImportResponse, +) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.dns.record import Record -from cloudflare.types.dns.record_scan_response import RecordScanResponse -from cloudflare.types.dns.record_delete_response import RecordDeleteResponse -from cloudflare.types.dns.record_import_response import RecordImportResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,7 @@ class TestRecords: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -32,7 +34,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -47,7 +49,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -62,7 +64,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -79,7 +81,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -90,7 +92,7 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: type="A", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -101,7 +103,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -116,7 +118,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -131,7 +133,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -148,7 +150,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -159,7 +161,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: type="AAAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -170,7 +172,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -188,7 +190,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -203,7 +205,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -220,7 +222,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -231,7 +233,7 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: type="CAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -242,7 +244,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -261,7 +263,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -276,7 +278,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -293,7 +295,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -304,7 +306,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: type="CERT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -315,7 +317,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -330,7 +332,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -345,7 +347,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -362,7 +364,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -373,7 +375,7 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: type="CNAME", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -384,7 +386,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -403,7 +405,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -418,7 +420,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -435,7 +437,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -446,7 +448,7 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: type="DNSKEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -457,7 +459,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -476,7 +478,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -491,7 +493,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -508,7 +510,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -519,7 +521,7 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: type="DS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -530,7 +532,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -548,7 +550,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -563,7 +565,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -580,7 +582,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -591,7 +593,7 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: type="HTTPS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -602,7 +604,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -629,7 +631,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -644,7 +646,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -661,7 +663,7 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -672,7 +674,7 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: type="LOC", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -684,7 +686,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -699,7 +701,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -715,7 +717,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -733,7 +735,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -745,7 +747,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: type="MX", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -756,7 +758,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -777,7 +779,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -792,7 +794,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -809,7 +811,7 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -820,7 +822,7 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: type="NAPTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -831,7 +833,7 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -845,7 +847,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -860,7 +862,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -877,7 +879,7 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -888,7 +890,7 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: type="NS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -899,7 +901,7 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -913,7 +915,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -928,7 +930,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -945,7 +947,7 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -956,7 +958,7 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: type="PTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -967,7 +969,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -986,7 +988,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -1001,7 +1003,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -1018,7 +1020,7 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1029,7 +1031,7 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: type="SMIMEA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1040,7 +1042,7 @@ def test_method_create_overload_15(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1062,7 +1064,7 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -1077,7 +1079,7 @@ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -1094,7 +1096,7 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1105,7 +1107,7 @@ def test_path_params_create_overload_15(self, client: Cloudflare) -> None: type="SRV", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1116,7 +1118,7 @@ def test_method_create_overload_16(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1134,7 +1136,7 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -1149,7 +1151,7 @@ def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -1166,7 +1168,7 @@ def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1177,7 +1179,7 @@ def test_path_params_create_overload_16(self, client: Cloudflare) -> None: type="SSHFP", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1188,7 +1190,7 @@ def test_method_create_overload_17(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1206,7 +1208,7 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -1221,7 +1223,7 @@ def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -1238,7 +1240,7 @@ def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1249,7 +1251,7 @@ def test_path_params_create_overload_17(self, client: Cloudflare) -> None: type="SVCB", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1260,7 +1262,7 @@ def test_method_create_overload_18(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1279,7 +1281,7 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -1294,7 +1296,7 @@ def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -1311,7 +1313,7 @@ def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1322,7 +1324,7 @@ def test_path_params_create_overload_18(self, client: Cloudflare) -> None: type="TLSA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1333,7 +1335,7 @@ def test_method_create_overload_19(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1347,7 +1349,7 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -1362,7 +1364,7 @@ def test_raw_response_create_overload_19(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -1379,7 +1381,7 @@ def test_streaming_response_create_overload_19(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1390,7 +1392,7 @@ def test_path_params_create_overload_19(self, client: Cloudflare) -> None: type="TXT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.create( @@ -1402,13 +1404,13 @@ def test_method_create_overload_20(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "content": "http://example.com/example.html", + "target": "http://example.com/example.html", "weight": 20, }, name="example.com", @@ -1420,7 +1422,7 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( @@ -1436,7 +1438,7 @@ def test_raw_response_create_overload_20(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( @@ -1454,7 +1456,7 @@ def test_streaming_response_create_overload_20(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1466,7 +1468,7 @@ def test_path_params_create_overload_20(self, client: Cloudflare) -> None: type="URI", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1478,7 +1480,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1494,7 +1496,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -1510,7 +1512,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -1528,7 +1530,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1549,7 +1551,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: type="A", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1561,7 +1563,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1577,7 +1579,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -1593,7 +1595,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -1611,7 +1613,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1632,7 +1634,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: type="AAAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1644,7 +1646,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1663,7 +1665,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -1679,7 +1681,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -1697,7 +1699,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1718,7 +1720,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: type="CAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1730,7 +1732,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1750,7 +1752,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -1766,7 +1768,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -1784,7 +1786,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1805,7 +1807,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: type="CERT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1817,7 +1819,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1833,7 +1835,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -1849,7 +1851,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -1867,7 +1869,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1888,7 +1890,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: type="CNAME", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1900,7 +1902,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1920,7 +1922,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -1936,7 +1938,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -1954,7 +1956,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1975,7 +1977,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: type="DNSKEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -1987,7 +1989,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2007,7 +2009,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2023,7 +2025,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2041,7 +2043,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2062,7 +2064,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: type="DS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2074,7 +2076,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2093,7 +2095,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2109,7 +2111,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2127,7 +2129,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2148,7 +2150,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: type="HTTPS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2160,7 +2162,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2188,7 +2190,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2204,7 +2206,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2222,7 +2224,7 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2243,7 +2245,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: type="LOC", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2256,7 +2258,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2272,7 +2274,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2289,7 +2291,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2308,7 +2310,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2331,7 +2333,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: type="MX", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2343,7 +2345,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2365,7 +2367,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2381,7 +2383,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2399,7 +2401,7 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2420,7 +2422,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: type="NAPTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2432,7 +2434,7 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2447,7 +2449,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2463,7 +2465,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2481,7 +2483,7 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2502,7 +2504,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: type="NS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2514,7 +2516,7 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2529,7 +2531,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2545,7 +2547,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2563,7 +2565,7 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2584,7 +2586,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: type="PTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2596,7 +2598,7 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2616,7 +2618,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2632,7 +2634,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2650,7 +2652,7 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2671,7 +2673,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: type="SMIMEA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2683,7 +2685,7 @@ def test_method_update_overload_15(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2706,7 +2708,7 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2722,7 +2724,7 @@ def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2740,7 +2742,7 @@ def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2761,7 +2763,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: type="SRV", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2773,7 +2775,7 @@ def test_method_update_overload_16(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2792,7 +2794,7 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2808,7 +2810,7 @@ def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2826,7 +2828,7 @@ def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2847,7 +2849,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: type="SSHFP", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2859,7 +2861,7 @@ def test_method_update_overload_17(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2878,7 +2880,7 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2894,7 +2896,7 @@ def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2912,7 +2914,7 @@ def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2933,7 +2935,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: type="SVCB", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2945,7 +2947,7 @@ def test_method_update_overload_18(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -2965,7 +2967,7 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -2981,7 +2983,7 @@ def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -2999,7 +3001,7 @@ def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3020,7 +3022,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: type="TLSA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -3032,7 +3034,7 @@ def test_method_update_overload_19(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -3047,7 +3049,7 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -3063,7 +3065,7 @@ def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -3081,7 +3083,7 @@ def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3102,7 +3104,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: type="TXT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( @@ -3115,14 +3117,14 @@ def test_method_update_overload_20(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "content": "http://example.com/example.html", + "target": "http://example.com/example.html", "weight": 20, }, name="example.com", @@ -3134,7 +3136,7 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( @@ -3151,7 +3153,7 @@ def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( @@ -3170,7 +3172,7 @@ def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3193,7 +3195,6 @@ def test_path_params_update_overload_20(self, client: Cloudflare) -> None: type="URI", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: record = client.dns.records.list( @@ -3201,7 +3202,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: record = client.dns.records.list( @@ -3236,7 +3236,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.list( @@ -3248,7 +3247,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(SyncV4PagePaginationArray[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.list( @@ -3262,7 +3260,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3270,23 +3267,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: record = client.dns.records.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[RecordDeleteResponse], record, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -3294,13 +3287,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[RecordDeleteResponse], record, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3310,24 +3301,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3339,7 +3327,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3355,7 +3343,7 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -3371,7 +3359,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -3389,7 +3377,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3410,7 +3398,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: type="A", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3422,7 +3410,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3438,7 +3426,7 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -3454,7 +3442,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -3472,7 +3460,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3493,7 +3481,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: type="AAAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3505,7 +3493,7 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3524,7 +3512,7 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -3540,7 +3528,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -3558,7 +3546,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3579,7 +3567,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: type="CAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3591,7 +3579,7 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3611,7 +3599,7 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -3627,7 +3615,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -3645,7 +3633,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3666,7 +3654,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: type="CERT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3678,7 +3666,7 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3694,7 +3682,7 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -3710,7 +3698,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -3728,7 +3716,7 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3749,7 +3737,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: type="CNAME", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3761,7 +3749,7 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3781,7 +3769,7 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -3797,7 +3785,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -3815,7 +3803,7 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3836,7 +3824,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: type="DNSKEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3848,7 +3836,7 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3868,7 +3856,7 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -3884,7 +3872,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -3902,7 +3890,7 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3923,7 +3911,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: type="DS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3935,7 +3923,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -3954,7 +3942,7 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -3970,7 +3958,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -3988,7 +3976,7 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4009,7 +3997,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: type="HTTPS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4021,7 +4009,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4049,7 +4037,7 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4065,7 +4053,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4083,7 +4071,7 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4104,7 +4092,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: type="LOC", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4117,7 +4105,7 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4133,7 +4121,7 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4150,7 +4138,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4169,7 +4157,7 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4192,7 +4180,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: type="MX", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4204,7 +4192,7 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4226,7 +4214,7 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4242,7 +4230,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4260,7 +4248,7 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4281,7 +4269,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: type="NAPTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4293,7 +4281,7 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4308,7 +4296,7 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4324,7 +4312,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4342,7 +4330,7 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4363,7 +4351,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: type="NS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4375,7 +4363,7 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4390,7 +4378,7 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4406,7 +4394,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4424,7 +4412,7 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4445,7 +4433,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: type="PTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4457,7 +4445,7 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4477,7 +4465,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4493,7 +4481,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4511,7 +4499,7 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4532,7 +4520,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: type="SMIMEA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4544,7 +4532,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4567,7 +4555,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4583,7 +4571,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4601,7 +4589,7 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4622,7 +4610,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: type="SRV", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4634,7 +4622,7 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4653,7 +4641,7 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4669,7 +4657,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4687,7 +4675,7 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4708,7 +4696,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: type="SSHFP", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4720,7 +4708,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4739,7 +4727,7 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4755,7 +4743,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4773,7 +4761,7 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4794,7 +4782,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: type="SVCB", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4806,7 +4794,7 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4826,7 +4814,7 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4842,7 +4830,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4860,7 +4848,7 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4881,7 +4869,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: type="TLSA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4893,7 +4881,7 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4908,7 +4896,7 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -4924,7 +4912,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -4942,7 +4930,7 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4963,7 +4951,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: type="TXT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( @@ -4976,14 +4964,14 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "content": "http://example.com/example.html", + "target": "http://example.com/example.html", "weight": 20, }, name="example.com", @@ -4995,7 +4983,7 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( @@ -5012,7 +5000,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( @@ -5031,7 +5019,7 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5054,7 +5042,6 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: type="URI", ) - @pytest.mark.skip() @parametrize def test_method_export(self, client: Cloudflare) -> None: record = client.dns.records.export( @@ -5062,7 +5049,6 @@ def test_method_export(self, client: Cloudflare) -> None: ) assert_matches_type(str, record, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_export(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.export( @@ -5074,7 +5060,6 @@ def test_raw_response_export(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(str, record, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_export(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.export( @@ -5088,7 +5073,6 @@ def test_streaming_response_export(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_export(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5096,7 +5080,6 @@ def test_path_params_export(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: record = client.dns.records.get( @@ -5105,7 +5088,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.get( @@ -5118,7 +5100,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.get( @@ -5133,7 +5114,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5148,7 +5128,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_import(self, client: Cloudflare) -> None: record = client.dns.records.import_( @@ -5157,7 +5137,7 @@ def test_method_import(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RecordImportResponse], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_import_with_all_params(self, client: Cloudflare) -> None: record = client.dns.records.import_( @@ -5167,7 +5147,7 @@ def test_method_import_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RecordImportResponse], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_import(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.import_( @@ -5180,7 +5160,7 @@ def test_raw_response_import(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[RecordImportResponse], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_import(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.import_( @@ -5195,7 +5175,7 @@ def test_streaming_response_import(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_import(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5204,7 +5184,6 @@ def test_path_params_import(self, client: Cloudflare) -> None: file="www.example.com. 300 IN A 127.0.0.1", ) - @pytest.mark.skip() @parametrize def test_method_scan(self, client: Cloudflare) -> None: record = client.dns.records.scan( @@ -5213,7 +5192,6 @@ def test_method_scan(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RecordScanResponse], record, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_scan(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.scan( @@ -5226,7 +5204,6 @@ def test_raw_response_scan(self, client: Cloudflare) -> None: record = response.parse() assert_matches_type(Optional[RecordScanResponse], record, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_scan(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.scan( @@ -5241,7 +5218,6 @@ def test_streaming_response_scan(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_scan(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5254,7 +5230,7 @@ def test_path_params_scan(self, client: Cloudflare) -> None: class TestAsyncRecords: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5265,7 +5241,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5280,7 +5256,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5295,7 +5271,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5312,7 +5288,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5323,7 +5299,7 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare type="A", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5334,7 +5310,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5349,7 +5325,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5364,7 +5340,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5381,7 +5357,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5392,7 +5368,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare type="AAAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5403,7 +5379,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5421,7 +5397,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5436,7 +5412,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5453,7 +5429,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5464,7 +5440,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare type="CAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5475,7 +5451,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5494,7 +5470,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5509,7 +5485,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5526,7 +5502,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5537,7 +5513,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare type="CERT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5548,7 +5524,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5563,7 +5539,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5578,7 +5554,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5595,7 +5571,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5606,7 +5582,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare type="CNAME", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5617,7 +5593,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5636,7 +5612,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5651,7 +5627,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5668,7 +5644,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5679,7 +5655,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare type="DNSKEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5690,7 +5666,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5709,7 +5685,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5724,7 +5700,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5741,7 +5717,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5752,7 +5728,7 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare type="DS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5763,7 +5739,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5781,7 +5757,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5796,7 +5772,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5813,7 +5789,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5824,7 +5800,7 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare type="HTTPS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5835,7 +5811,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5862,7 +5838,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5877,7 +5853,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5894,7 +5870,7 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5905,7 +5881,7 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare type="LOC", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5917,7 +5893,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5932,7 +5908,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -5948,7 +5924,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -5966,7 +5942,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5978,7 +5954,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar type="MX", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -5989,7 +5965,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6010,7 +5986,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6025,7 +6001,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6042,7 +6018,7 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6053,7 +6029,7 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar type="NAPTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6064,7 +6040,7 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6078,7 +6054,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6093,7 +6069,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6110,7 +6086,7 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6121,7 +6097,7 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar type="NS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6132,7 +6108,7 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6146,7 +6122,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6161,7 +6137,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6178,7 +6154,7 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6189,7 +6165,7 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar type="PTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6200,7 +6176,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6219,7 +6195,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6234,7 +6210,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6251,7 +6227,7 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6262,7 +6238,7 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar type="SMIMEA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6273,7 +6249,7 @@ async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6295,7 +6271,7 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6310,7 +6286,7 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6327,7 +6303,7 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6338,7 +6314,7 @@ async def test_path_params_create_overload_15(self, async_client: AsyncCloudflar type="SRV", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6349,7 +6325,7 @@ async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6367,7 +6343,7 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6382,7 +6358,7 @@ async def test_raw_response_create_overload_16(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6399,7 +6375,7 @@ async def test_streaming_response_create_overload_16(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_16(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6410,7 +6386,7 @@ async def test_path_params_create_overload_16(self, async_client: AsyncCloudflar type="SSHFP", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6421,7 +6397,7 @@ async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6439,7 +6415,7 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6454,7 +6430,7 @@ async def test_raw_response_create_overload_17(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6471,7 +6447,7 @@ async def test_streaming_response_create_overload_17(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_17(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6482,7 +6458,7 @@ async def test_path_params_create_overload_17(self, async_client: AsyncCloudflar type="SVCB", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6493,7 +6469,7 @@ async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6512,7 +6488,7 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6527,7 +6503,7 @@ async def test_raw_response_create_overload_18(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6544,7 +6520,7 @@ async def test_streaming_response_create_overload_18(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_18(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6555,7 +6531,7 @@ async def test_path_params_create_overload_18(self, async_client: AsyncCloudflar type="TLSA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6566,7 +6542,7 @@ async def test_method_create_overload_19(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6580,7 +6556,7 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6595,7 +6571,7 @@ async def test_raw_response_create_overload_19(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6612,7 +6588,7 @@ async def test_streaming_response_create_overload_19(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_19(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6623,7 +6599,7 @@ async def test_path_params_create_overload_19(self, async_client: AsyncCloudflar type="TXT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( @@ -6635,13 +6611,13 @@ async def test_method_create_overload_20(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "content": "http://example.com/example.html", + "target": "http://example.com/example.html", "weight": 20, }, name="example.com", @@ -6653,7 +6629,7 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( @@ -6669,7 +6645,7 @@ async def test_raw_response_create_overload_20(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( @@ -6687,7 +6663,7 @@ async def test_streaming_response_create_overload_20(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_20(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6699,7 +6675,7 @@ async def test_path_params_create_overload_20(self, async_client: AsyncCloudflar type="URI", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -6711,7 +6687,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -6727,7 +6703,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -6743,7 +6719,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -6761,7 +6737,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6782,7 +6758,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare type="A", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -6794,7 +6770,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -6810,7 +6786,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -6826,7 +6802,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -6844,7 +6820,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6865,7 +6841,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare type="AAAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -6877,7 +6853,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -6896,7 +6872,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -6912,7 +6888,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -6930,7 +6906,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6951,7 +6927,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare type="CAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -6963,7 +6939,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -6983,7 +6959,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -6999,7 +6975,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7017,7 +6993,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7038,7 +7014,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare type="CERT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7050,7 +7026,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7066,7 +7042,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7082,7 +7058,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7100,7 +7076,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7121,7 +7097,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare type="CNAME", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7133,7 +7109,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7153,7 +7129,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7169,7 +7145,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7187,7 +7163,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7208,7 +7184,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare type="DNSKEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7220,7 +7196,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7240,7 +7216,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7256,7 +7232,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7274,7 +7250,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7295,7 +7271,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare type="DS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7307,7 +7283,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7326,7 +7302,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7342,7 +7318,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7360,7 +7336,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7381,7 +7357,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare type="HTTPS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7393,7 +7369,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7421,7 +7397,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7437,7 +7413,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7455,7 +7431,7 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7476,7 +7452,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare type="LOC", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7489,7 +7465,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7505,7 +7481,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7522,7 +7498,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7541,7 +7517,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7564,7 +7540,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar type="MX", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7576,7 +7552,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7598,7 +7574,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7614,7 +7590,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7632,7 +7608,7 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7653,7 +7629,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar type="NAPTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7665,7 +7641,7 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7680,7 +7656,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7696,7 +7672,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7714,7 +7690,7 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7735,7 +7711,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar type="NS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7747,7 +7723,7 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7762,7 +7738,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7778,7 +7754,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7796,7 +7772,7 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7817,7 +7793,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar type="PTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7829,7 +7805,7 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7849,7 +7825,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7865,7 +7841,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7883,7 +7859,7 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7904,7 +7880,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar type="SMIMEA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7916,7 +7892,7 @@ async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -7939,7 +7915,7 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -7955,7 +7931,7 @@ async def test_raw_response_update_overload_15(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -7973,7 +7949,7 @@ async def test_streaming_response_update_overload_15(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -7994,7 +7970,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar type="SRV", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -8006,7 +7982,7 @@ async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -8025,7 +8001,7 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -8041,7 +8017,7 @@ async def test_raw_response_update_overload_16(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -8059,7 +8035,7 @@ async def test_streaming_response_update_overload_16(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_16(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8080,7 +8056,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar type="SSHFP", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -8092,7 +8068,7 @@ async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -8111,7 +8087,7 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -8127,7 +8103,7 @@ async def test_raw_response_update_overload_17(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -8145,7 +8121,7 @@ async def test_streaming_response_update_overload_17(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_17(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8166,7 +8142,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar type="SVCB", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -8178,7 +8154,7 @@ async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -8198,7 +8174,7 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -8214,7 +8190,7 @@ async def test_raw_response_update_overload_18(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -8232,7 +8208,7 @@ async def test_streaming_response_update_overload_18(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_18(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8253,7 +8229,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar type="TLSA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -8265,7 +8241,7 @@ async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -8280,7 +8256,7 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -8296,7 +8272,7 @@ async def test_raw_response_update_overload_19(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -8314,7 +8290,7 @@ async def test_streaming_response_update_overload_19(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_19(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8335,7 +8311,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar type="TXT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( @@ -8348,14 +8324,14 @@ async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "content": "http://example.com/example.html", + "target": "http://example.com/example.html", "weight": 20, }, name="example.com", @@ -8367,7 +8343,7 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( @@ -8384,7 +8360,7 @@ async def test_raw_response_update_overload_20(self, async_client: AsyncCloudfla record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( @@ -8403,7 +8379,7 @@ async def test_streaming_response_update_overload_20(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_20(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8426,7 +8402,6 @@ async def test_path_params_update_overload_20(self, async_client: AsyncCloudflar type="URI", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.list( @@ -8434,7 +8409,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.list( @@ -8469,7 +8443,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.list( @@ -8481,7 +8454,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: record = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.list( @@ -8495,7 +8467,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8503,23 +8474,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[RecordDeleteResponse], record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -8527,13 +8494,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: record = await response.parse() assert_matches_type(Optional[RecordDeleteResponse], record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -8543,24 +8508,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8572,7 +8534,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8588,7 +8550,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -8604,7 +8566,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -8622,7 +8584,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8643,7 +8605,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) type="A", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8655,7 +8617,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8671,7 +8633,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -8687,7 +8649,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -8705,7 +8667,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8726,7 +8688,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) type="AAAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8738,7 +8700,7 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8757,7 +8719,7 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -8773,7 +8735,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -8791,7 +8753,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8812,7 +8774,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) type="CAA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8824,7 +8786,7 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8844,7 +8806,7 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -8860,7 +8822,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -8878,7 +8840,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8899,7 +8861,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) type="CERT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8911,7 +8873,7 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8927,7 +8889,7 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -8943,7 +8905,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -8961,7 +8923,7 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -8982,7 +8944,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) type="CNAME", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -8994,7 +8956,7 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9014,7 +8976,7 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9030,7 +8992,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9048,7 +9010,7 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9069,7 +9031,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) type="DNSKEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9081,7 +9043,7 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9101,7 +9063,7 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9117,7 +9079,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9135,7 +9097,7 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9156,7 +9118,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) type="DS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9168,7 +9130,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9187,7 +9149,7 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9203,7 +9165,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9221,7 +9183,7 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9242,7 +9204,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) type="HTTPS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9254,7 +9216,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9282,7 +9244,7 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9298,7 +9260,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9316,7 +9278,7 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9337,7 +9299,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) type="LOC", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9350,7 +9312,7 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9366,7 +9328,7 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9383,7 +9345,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9402,7 +9364,7 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9425,7 +9387,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) type="MX", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9437,7 +9399,7 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9459,7 +9421,7 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9475,7 +9437,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9493,7 +9455,7 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9514,7 +9476,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) type="NAPTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9526,7 +9488,7 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9541,7 +9503,7 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9557,7 +9519,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9575,7 +9537,7 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9596,7 +9558,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) type="NS", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9608,7 +9570,7 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9623,7 +9585,7 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9639,7 +9601,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9657,7 +9619,7 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9678,7 +9640,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) type="PTR", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9690,7 +9652,7 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9710,7 +9672,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9726,7 +9688,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9744,7 +9706,7 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9765,7 +9727,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) type="SMIMEA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9777,7 +9739,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9800,7 +9762,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9816,7 +9778,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9834,7 +9796,7 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9855,7 +9817,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) type="SRV", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9867,7 +9829,7 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9886,7 +9848,7 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9902,7 +9864,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -9920,7 +9882,7 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -9941,7 +9903,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) type="SSHFP", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9953,7 +9915,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -9972,7 +9934,7 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -9988,7 +9950,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -10006,7 +9968,7 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -10027,7 +9989,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) type="SVCB", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -10039,7 +10001,7 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -10059,7 +10021,7 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -10075,7 +10037,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -10093,7 +10055,7 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -10114,7 +10076,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) type="TLSA", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -10126,7 +10088,7 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -10141,7 +10103,7 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -10157,7 +10119,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -10175,7 +10137,7 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -10196,7 +10158,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) type="TXT", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( @@ -10209,14 +10171,14 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "content": "http://example.com/example.html", + "target": "http://example.com/example.html", "weight": 20, }, name="example.com", @@ -10228,7 +10190,7 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( @@ -10245,7 +10207,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( @@ -10264,7 +10226,7 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -10287,7 +10249,6 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) type="URI", ) - @pytest.mark.skip() @parametrize async def test_method_export(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.export( @@ -10295,7 +10256,6 @@ async def test_method_export(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_export(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.export( @@ -10307,7 +10267,6 @@ async def test_raw_response_export(self, async_client: AsyncCloudflare) -> None: record = await response.parse() assert_matches_type(str, record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_export(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.export( @@ -10321,7 +10280,6 @@ async def test_streaming_response_export(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_export(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -10329,7 +10287,6 @@ async def test_path_params_export(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.get( @@ -10338,7 +10295,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.get( @@ -10351,7 +10307,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: record = await response.parse() assert_matches_type(Optional[Record], record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.get( @@ -10366,7 +10321,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -10381,7 +10335,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_import(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.import_( @@ -10390,7 +10344,7 @@ async def test_method_import(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RecordImportResponse], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_import_with_all_params(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.import_( @@ -10400,7 +10354,7 @@ async def test_method_import_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[RecordImportResponse], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_import(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.import_( @@ -10413,7 +10367,7 @@ async def test_raw_response_import(self, async_client: AsyncCloudflare) -> None: record = await response.parse() assert_matches_type(Optional[RecordImportResponse], record, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_import(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.import_( @@ -10428,7 +10382,7 @@ async def test_streaming_response_import(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_import(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -10437,7 +10391,6 @@ async def test_path_params_import(self, async_client: AsyncCloudflare) -> None: file="www.example.com. 300 IN A 127.0.0.1", ) - @pytest.mark.skip() @parametrize async def test_method_scan(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.scan( @@ -10446,7 +10399,6 @@ async def test_method_scan(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RecordScanResponse], record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_scan(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.scan( @@ -10459,7 +10411,6 @@ async def test_raw_response_scan(self, async_client: AsyncCloudflare) -> None: record = await response.parse() assert_matches_type(Optional[RecordScanResponse], record, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_scan(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.scan( @@ -10474,7 +10425,6 @@ async def test_streaming_response_scan(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_scan(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/durable_objects/namespaces/test_objects.py b/tests/api_resources/durable_objects/namespaces/test_objects.py index 61c1048c00e..02340cc04b1 100644 --- a/tests/api_resources/durable_objects/namespaces/test_objects.py +++ b/tests/api_resources/durable_objects/namespaces/test_objects.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncCursorLimitPagination, AsyncCursorLimitPagination -from cloudflare.types.durable_objects.namespaces.durable_object import DurableObject +from cloudflare.types.durable_objects.namespaces import DurableObject base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,27 +18,24 @@ class TestObjects: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: - object = client.durable_objects.namespaces.objects.list( + object_ = client.durable_objects.namespaces.objects.list( "5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"]) + assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: - object = client.durable_objects.namespaces.objects.list( + object_ = client.durable_objects.namespaces.objects.list( "5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", limit=10, ) - assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"]) + assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.durable_objects.namespaces.objects.with_raw_response.list( @@ -48,10 +45,9 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - object = response.parse() - assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"]) + object_ = response.parse() + assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.durable_objects.namespaces.objects.with_streaming_response.list( @@ -61,12 +57,11 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - object = response.parse() - assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"]) + object_ = response.parse() + assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -85,27 +80,24 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncObjects: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: - object = await async_client.durable_objects.namespaces.objects.list( + object_ = await async_client.durable_objects.namespaces.objects.list( "5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"]) + assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: - object = await async_client.durable_objects.namespaces.objects.list( + object_ = await async_client.durable_objects.namespaces.objects.list( "5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", limit=10, ) - assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"]) + assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.durable_objects.namespaces.objects.with_raw_response.list( @@ -115,10 +107,9 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - object = await response.parse() - assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"]) + object_ = await response.parse() + assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.durable_objects.namespaces.objects.with_streaming_response.list( @@ -128,12 +119,11 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - object = await response.parse() - assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"]) + object_ = await response.parse() + assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/durable_objects/test_namespaces.py b/tests/api_resources/durable_objects/test_namespaces.py index f983ae2a822..db836e379cd 100644 --- a/tests/api_resources/durable_objects/test_namespaces.py +++ b/tests/api_resources/durable_objects/test_namespaces.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.durable_objects.namespace import Namespace +from cloudflare.types.durable_objects import Namespace base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestNamespaces: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: namespace = client.durable_objects.namespaces.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.durable_objects.namespaces.with_raw_response.list( @@ -38,7 +36,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: namespace = response.parse() assert_matches_type(SyncSinglePage[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.durable_objects.namespaces.with_streaming_response.list( @@ -52,7 +49,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +60,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncNamespaces: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.durable_objects.namespaces.list( @@ -72,7 +67,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.durable_objects.namespaces.with_raw_response.list( @@ -84,7 +78,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: namespace = await response.parse() assert_matches_type(AsyncSinglePage[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.durable_objects.namespaces.with_streaming_response.list( @@ -98,7 +91,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/email_routing/rules/test_catch_alls.py b/tests/api_resources/email_routing/rules/test_catch_alls.py index 94505eb592c..bae9a887033 100644 --- a/tests/api_resources/email_routing/rules/test_catch_alls.py +++ b/tests/api_resources/email_routing/rules/test_catch_alls.py @@ -3,14 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.email_routing.rules.catch_all_get_response import CatchAllGetResponse -from cloudflare.types.email_routing.rules.catch_all_update_response import CatchAllUpdateResponse +from cloudflare.types.email_routing.rules import CatchAllGetResponse, CatchAllUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestCatchAlls: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: catch_all = client.email_routing.rules.catch_alls.update( @@ -26,9 +24,8 @@ def test_method_update(self, client: Cloudflare) -> None: actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: catch_all = client.email_routing.rules.catch_alls.update( @@ -63,9 +60,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: enabled=True, name="Send to user@example.net rule.", ) - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.email_routing.rules.catch_alls.with_raw_response.update( @@ -77,9 +73,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = response.parse() - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.email_routing.rules.catch_alls.with_streaming_response.update( @@ -91,11 +86,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = response.parse() - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -105,15 +99,13 @@ def test_path_params_update(self, client: Cloudflare) -> None: matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: catch_all = client.email_routing.rules.catch_alls.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllGetResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.email_routing.rules.catch_alls.with_raw_response.get( @@ -123,9 +115,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = response.parse() - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllGetResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.email_routing.rules.catch_alls.with_streaming_response.get( @@ -135,11 +126,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = response.parse() - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllGetResponse], catch_all, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -151,7 +141,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCatchAlls: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: catch_all = await async_client.email_routing.rules.catch_alls.update( @@ -159,9 +148,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: catch_all = await async_client.email_routing.rules.catch_alls.update( @@ -196,9 +184,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare enabled=True, name="Send to user@example.net rule.", ) - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.catch_alls.with_raw_response.update( @@ -210,9 +197,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = await response.parse() - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.catch_alls.with_streaming_response.update( @@ -224,11 +210,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = await response.parse() - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllUpdateResponse], catch_all, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -238,15 +223,13 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: catch_all = await async_client.email_routing.rules.catch_alls.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllGetResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.catch_alls.with_raw_response.get( @@ -256,9 +239,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = await response.parse() - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllGetResponse], catch_all, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.catch_alls.with_streaming_response.get( @@ -268,11 +250,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = await response.parse() - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(Optional[CatchAllGetResponse], catch_all, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/email_routing/test_addresses.py b/tests/api_resources/email_routing/test_addresses.py index e362ccaa7f2..092f927fc8a 100644 --- a/tests/api_resources/email_routing/test_addresses.py +++ b/tests/api_resources/email_routing/test_addresses.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.email_routing.address import Address +from cloudflare.types.email_routing import Address base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,16 +18,14 @@ class TestAddresses: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: address = client.email_routing.addresses.create( "023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.create( @@ -38,9 +36,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.create( @@ -51,11 +48,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -64,7 +60,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: email="user@example.com", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: address = client.email_routing.addresses.list( @@ -72,7 +67,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: address = client.email_routing.addresses.list( @@ -84,7 +78,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.list( @@ -96,7 +89,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: address = response.parse() assert_matches_type(SyncV4PagePaginationArray[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.list( @@ -110,7 +102,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -118,16 +109,14 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: address = client.email_routing.addresses.delete( "ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.delete( @@ -138,9 +127,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.delete( @@ -151,11 +139,10 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -172,16 +159,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: address = client.email_routing.addresses.get( "ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.get( @@ -192,9 +177,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.get( @@ -205,11 +189,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -230,16 +213,14 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAddresses: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.create( "023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.create( @@ -250,9 +231,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = await response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.create( @@ -263,11 +243,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = await response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -276,7 +255,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: email="user@example.com", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.list( @@ -284,7 +262,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.list( @@ -296,7 +273,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.list( @@ -308,7 +284,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: address = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.list( @@ -322,7 +297,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -330,16 +304,14 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.delete( "ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.delete( @@ -350,9 +322,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = await response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.delete( @@ -363,11 +334,10 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = await response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -384,16 +354,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.get( "ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.get( @@ -404,9 +372,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = await response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.get( @@ -417,11 +384,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" address = await response.parse() - assert_matches_type(Address, address, path=["response"]) + assert_matches_type(Optional[Address], address, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/email_routing/test_dns.py b/tests/api_resources/email_routing/test_dns.py index 0a5b5b2d451..0cee3728995 100644 --- a/tests/api_resources/email_routing/test_dns.py +++ b/tests/api_resources/email_routing/test_dns.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.email_routing.dns_get_response import DNSGetResponse +from cloudflare.types.email_routing import DNSGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestDNS: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: dns = client.email_routing.dns.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DNSGetResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.email_routing.dns.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: dns = response.parse() assert_matches_type(Optional[DNSGetResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.email_routing.dns.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDNS: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dns = await async_client.email_routing.dns.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DNSGetResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.dns.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: dns = await response.parse() assert_matches_type(Optional[DNSGetResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.dns.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/email_routing/test_rules.py b/tests/api_resources/email_routing/test_rules.py index 4e8e84f075a..0c130d6cce5 100644 --- a/tests/api_resources/email_routing/test_rules.py +++ b/tests/api_resources/email_routing/test_rules.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.email_routing.email_routing_rule import EmailRoutingRule +from cloudflare.types.email_routing import EmailRoutingRule base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.email_routing.rules.create( @@ -67,9 +66,8 @@ def test_method_create(self, client: Cloudflare) -> None: }, ], ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.email_routing.rules.create( @@ -121,9 +119,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="Send to user@example.net rule.", priority=0, ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.create( @@ -176,9 +173,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.create( @@ -231,11 +227,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -286,7 +281,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.email_routing.rules.update( @@ -336,9 +330,8 @@ def test_method_update(self, client: Cloudflare) -> None: }, ], ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.email_routing.rules.update( @@ -391,9 +384,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: name="Send to user@example.net rule.", priority=0, ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.update( @@ -447,9 +439,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.update( @@ -503,11 +494,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -608,7 +598,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.email_routing.rules.list( @@ -616,7 +605,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: rule = client.email_routing.rules.list( @@ -627,7 +615,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.list( @@ -639,7 +626,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.list( @@ -653,7 +639,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -661,16 +646,14 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.email_routing.rules.delete( "a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.delete( @@ -681,9 +664,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.delete( @@ -694,11 +676,10 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -713,16 +694,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.email_routing.rules.get( "a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.get( @@ -733,9 +712,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.get( @@ -746,11 +724,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -769,7 +746,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.create( @@ -818,9 +794,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: }, ], ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.create( @@ -872,9 +847,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="Send to user@example.net rule.", priority=0, ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.create( @@ -927,9 +901,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.create( @@ -982,11 +955,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -1037,7 +1009,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.update( @@ -1087,9 +1058,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: }, ], ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.update( @@ -1142,9 +1112,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare name="Send to user@example.net rule.", priority=0, ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.update( @@ -1198,9 +1167,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.update( @@ -1254,11 +1222,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -1359,7 +1326,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.list( @@ -1367,7 +1333,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.list( @@ -1378,7 +1343,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.list( @@ -1390,7 +1354,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.list( @@ -1404,7 +1367,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -1412,16 +1374,14 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.delete( "a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.delete( @@ -1432,9 +1392,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.delete( @@ -1445,11 +1404,10 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -1464,16 +1422,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.get( "a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.get( @@ -1484,9 +1440,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.get( @@ -1497,11 +1452,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(EmailRoutingRule, rule, path=["response"]) + assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/event_notifications/r2/configuration/test_queues.py b/tests/api_resources/event_notifications/r2/configuration/test_queues.py index 1f9bd041955..a0fd0bc166d 100644 --- a/tests/api_resources/event_notifications/r2/configuration/test_queues.py +++ b/tests/api_resources/event_notifications/r2/configuration/test_queues.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.event_notifications.r2.configuration.queue_delete_response import QueueDeleteResponse -from cloudflare.types.event_notifications.r2.configuration.queue_update_response import QueueUpdateResponse +from cloudflare.types.event_notifications.r2.configuration import ( + QueueDeleteResponse, + QueueUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestQueues: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: queue = client.event_notifications.r2.configuration.queues.update( @@ -28,7 +29,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(QueueUpdateResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: queue = client.event_notifications.r2.configuration.queues.update( @@ -55,7 +55,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(QueueUpdateResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.event_notifications.r2.configuration.queues.with_raw_response.update( @@ -69,7 +68,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: queue = response.parse() assert_matches_type(QueueUpdateResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.event_notifications.r2.configuration.queues.with_streaming_response.update( @@ -85,7 +83,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -109,7 +106,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: queue = client.event_notifications.r2.configuration.queues.delete( @@ -119,7 +115,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(QueueDeleteResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.event_notifications.r2.configuration.queues.with_raw_response.delete( @@ -133,7 +128,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: queue = response.parse() assert_matches_type(QueueDeleteResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.event_notifications.r2.configuration.queues.with_streaming_response.delete( @@ -149,7 +143,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -177,7 +170,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncQueues: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: queue = await async_client.event_notifications.r2.configuration.queues.update( @@ -187,7 +179,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(QueueUpdateResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: queue = await async_client.event_notifications.r2.configuration.queues.update( @@ -214,7 +205,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(QueueUpdateResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.event_notifications.r2.configuration.queues.with_raw_response.update( @@ -228,7 +218,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: queue = await response.parse() assert_matches_type(QueueUpdateResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.event_notifications.r2.configuration.queues.with_streaming_response.update( @@ -244,7 +233,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -268,7 +256,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: queue = await async_client.event_notifications.r2.configuration.queues.delete( @@ -278,7 +265,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(QueueDeleteResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.event_notifications.r2.configuration.queues.with_raw_response.delete( @@ -292,7 +278,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: queue = await response.parse() assert_matches_type(QueueDeleteResponse, queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.event_notifications.r2.configuration.queues.with_streaming_response.delete( @@ -308,7 +293,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/event_notifications/r2/test_configuration.py b/tests/api_resources/event_notifications/r2/test_configuration.py index 0ce207dd3c6..0b4dd17ff6f 100644 --- a/tests/api_resources/event_notifications/r2/test_configuration.py +++ b/tests/api_resources/event_notifications/r2/test_configuration.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.event_notifications.r2.configuration_get_response import ConfigurationGetResponse +from cloudflare.types.event_notifications.r2 import ConfigurationGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestConfiguration: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: configuration = client.event_notifications.r2.configuration.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.event_notifications.r2.configuration.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: configuration = response.parse() assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.event_notifications.r2.configuration.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfiguration: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.event_notifications.r2.configuration.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.event_notifications.r2.configuration.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: configuration = await response.parse() assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.event_notifications.r2.configuration.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/firewall/test_access_rules.py b/tests/api_resources/firewall/test_access_rules.py index ae4f4f43e6a..cbd750fda04 100644 --- a/tests/api_resources/firewall/test_access_rules.py +++ b/tests/api_resources/firewall/test_access_rules.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.firewall.access_rule_get_response import AccessRuleGetResponse -from cloudflare.types.firewall.access_rule_edit_response import AccessRuleEditResponse -from cloudflare.types.firewall.access_rule_create_response import AccessRuleCreateResponse -from cloudflare.types.firewall.access_rule_delete_response import AccessRuleDeleteResponse +from cloudflare.types.firewall import ( + AccessRuleGetResponse, + AccessRuleEditResponse, + AccessRuleCreateResponse, + AccessRuleDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,18 +23,17 @@ class TestAccessRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.create( configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.create( @@ -42,19 +43,17 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, mode="challenge", account_id="string", - zone_id="string", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -62,14 +61,13 @@ def test_raw_response_create(self, client: Cloudflare) -> None: access_rule = response.parse() assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.create( configuration={}, mode="challenge", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -79,7 +77,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -87,7 +85,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -95,24 +92,21 @@ def test_path_params_create(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncV4PagePaginationArray[object], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.list( account_id="string", - zone_id="string", direction="desc", egs_pagination={ "json": { @@ -133,12 +127,11 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[object], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -146,12 +139,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: access_rule = response.parse() assert_matches_type(SyncV4PagePaginationArray[object], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,51 +153,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.firewall.access_rules.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.delete( {}, - body={}, account_id="string", - zone_id="string", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.delete( {}, - body={}, account_id="string", - zone_id="string", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.delete( {}, - body={}, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -213,14 +197,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: access_rule = response.parse() assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.delete( {}, - body={}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -230,26 +212,22 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.firewall.access_rules.with_raw_response.delete( {}, - body={}, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.delete( {}, - body={}, account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.edit( @@ -257,11 +235,10 @@ def test_method_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.edit( @@ -272,12 +249,11 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: }, mode="challenge", account_id="string", - zone_id="string", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.edit( @@ -285,7 +261,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -293,7 +268,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: access_rule = response.parse() assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.edit( @@ -301,7 +276,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -311,7 +285,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -320,7 +294,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -329,36 +302,32 @@ def test_path_params_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.get( {}, account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.get( {}, account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.get( {}, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -366,13 +335,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: access_rule = response.parse() assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.get( {}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -382,39 +350,36 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.firewall.access_rules.with_raw_response.get( {}, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.get( {}, account_id="string", - zone_id="", ) class TestAsyncAccessRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.create( configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.create( @@ -424,19 +389,17 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, mode="challenge", account_id="string", - zone_id="string", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -444,14 +407,13 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: access_rule = await response.parse() assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.create( configuration={}, mode="challenge", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -461,7 +423,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -469,7 +431,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -477,24 +438,21 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncV4PagePaginationArray[object], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.list( account_id="string", - zone_id="string", direction="desc", egs_pagination={ "json": { @@ -515,12 +473,11 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[object], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -528,12 +485,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: access_rule = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[object], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -543,51 +499,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.delete( {}, - body={}, account_id="string", - zone_id="string", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.delete( {}, - body={}, account_id="string", - zone_id="string", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.delete( {}, - body={}, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -595,14 +543,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: access_rule = await response.parse() assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.delete( {}, - body={}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -612,26 +558,22 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.delete( {}, - body={}, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.delete( {}, - body={}, account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.edit( @@ -639,11 +581,10 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.edit( @@ -654,12 +595,11 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) }, mode="challenge", account_id="string", - zone_id="string", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.edit( @@ -667,7 +607,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -675,7 +614,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: access_rule = await response.parse() assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.edit( @@ -683,7 +622,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N configuration={}, mode="challenge", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -693,7 +631,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -702,7 +640,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -711,36 +648,32 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.get( {}, account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.get( {}, account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.get( {}, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -748,13 +681,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: access_rule = await response.parse() assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.get( {}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -764,19 +696,17 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.get( {}, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.get( {}, account_id="string", - zone_id="", ) diff --git a/tests/api_resources/firewall/test_lockdowns.py b/tests/api_resources/firewall/test_lockdowns.py index 0afdb920d28..45a8768e630 100644 --- a/tests/api_resources/firewall/test_lockdowns.py +++ b/tests/api_resources/firewall/test_lockdowns.py @@ -11,8 +11,10 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.firewall.lockdown import Lockdown -from cloudflare.types.firewall.lockdown_delete_response import LockdownDeleteResponse +from cloudflare.types.firewall import ( + Lockdown, + LockdownDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,7 @@ class TestLockdowns: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.create( @@ -29,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.create( @@ -42,7 +44,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: lockdown = response.parse() assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.create( @@ -57,7 +59,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -66,7 +68,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.update( @@ -76,7 +78,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.update( @@ -90,7 +92,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: lockdown = response.parse() assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.update( @@ -106,7 +108,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -123,7 +125,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.list( @@ -131,7 +132,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.list( @@ -150,7 +150,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.list( @@ -162,7 +161,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: lockdown = response.parse() assert_matches_type(SyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.list( @@ -176,7 +174,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -184,23 +181,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[LockdownDeleteResponse], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -208,13 +201,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: lockdown = response.parse() assert_matches_type(Optional[LockdownDeleteResponse], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -224,24 +215,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.lockdowns.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.get( @@ -250,7 +237,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.get( @@ -263,7 +249,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: lockdown = response.parse() assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.get( @@ -278,7 +263,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -297,7 +281,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLockdowns: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.create( @@ -306,7 +290,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.create( @@ -319,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: lockdown = await response.parse() assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.create( @@ -334,7 +318,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -343,7 +327,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.update( @@ -353,7 +337,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.update( @@ -367,7 +351,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: lockdown = await response.parse() assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.update( @@ -383,7 +367,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -400,7 +384,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.list( @@ -408,7 +391,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.list( @@ -427,7 +409,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.list( @@ -439,7 +420,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: lockdown = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.list( @@ -453,7 +433,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -461,23 +440,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[LockdownDeleteResponse], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -485,13 +460,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: lockdown = await response.parse() assert_matches_type(Optional[LockdownDeleteResponse], lockdown, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -501,24 +474,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.lockdowns.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.get( @@ -527,7 +496,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.get( @@ -540,7 +508,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: lockdown = await response.parse() assert_matches_type(Lockdown, lockdown, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.get( @@ -555,7 +522,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/firewall/test_rules.py b/tests/api_resources/firewall/test_rules.py index 7bd380f77e1..7ae57fa47e3 100644 --- a/tests/api_resources/firewall/test_rules.py +++ b/tests/api_resources/firewall/test_rules.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.firewall.firewall_rule import FirewallRule -from cloudflare.types.firewall.rule_edit_response import RuleEditResponse -from cloudflare.types.firewall.rule_create_response import RuleCreateResponse +from cloudflare.types.firewall import ( + FirewallRule, + RuleEditResponse, + RuleCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,7 @@ class TestRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.firewall.rules.create( @@ -29,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.rules.with_raw_response.create( @@ -42,7 +44,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.rules.with_streaming_response.create( @@ -57,7 +59,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -66,7 +68,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.firewall.rules.update( @@ -76,7 +78,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.rules.with_raw_response.update( @@ -90,7 +92,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.rules.with_streaming_response.update( @@ -106,7 +108,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -123,7 +125,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.firewall.rules.list( @@ -131,7 +132,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: rule = client.firewall.rules.list( @@ -145,7 +145,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.rules.with_raw_response.list( @@ -157,7 +156,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(SyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.rules.with_streaming_response.list( @@ -171,7 +169,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -179,7 +176,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.firewall.rules.delete( @@ -188,17 +184,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() - @parametrize - def test_method_delete_with_all_params(self, client: Cloudflare) -> None: - rule = client.firewall.rules.delete( - "372e67954025e0ba6aaa6d586b9e0b60", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - delete_filter_if_unused=True, - ) - assert_matches_type(FirewallRule, rule, path=["response"]) - - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.rules.with_raw_response.delete( @@ -211,7 +196,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.rules.with_streaming_response.delete( @@ -226,7 +210,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -241,7 +224,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.firewall.rules.edit( @@ -251,7 +234,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.rules.with_raw_response.edit( @@ -265,7 +248,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.rules.with_streaming_response.edit( @@ -281,7 +264,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -298,7 +281,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.firewall.rules.get( @@ -307,7 +289,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: rule = client.firewall.rules.get( @@ -317,7 +298,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.rules.with_raw_response.get( @@ -330,7 +310,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.rules.with_streaming_response.get( @@ -345,7 +324,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_id` but received ''"): @@ -365,7 +343,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.rules.create( @@ -374,7 +352,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.rules.with_raw_response.create( @@ -387,7 +365,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.rules.with_streaming_response.create( @@ -402,7 +380,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -411,7 +389,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.rules.update( @@ -421,7 +399,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.rules.with_raw_response.update( @@ -435,7 +413,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.rules.with_streaming_response.update( @@ -451,7 +429,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -468,7 +446,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.rules.list( @@ -476,7 +453,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.rules.list( @@ -490,7 +466,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.rules.with_raw_response.list( @@ -502,7 +477,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.rules.with_streaming_response.list( @@ -516,7 +490,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -524,7 +497,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.rules.delete( @@ -533,17 +505,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() - @parametrize - async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: - rule = await async_client.firewall.rules.delete( - "372e67954025e0ba6aaa6d586b9e0b60", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - delete_filter_if_unused=True, - ) - assert_matches_type(FirewallRule, rule, path=["response"]) - - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.rules.with_raw_response.delete( @@ -556,7 +517,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.rules.with_streaming_response.delete( @@ -571,7 +531,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -586,7 +545,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.rules.edit( @@ -596,7 +555,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.rules.with_raw_response.edit( @@ -610,7 +569,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.rules.with_streaming_response.edit( @@ -626,7 +585,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -643,7 +602,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.rules.get( @@ -652,7 +610,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.rules.get( @@ -662,7 +619,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.rules.with_raw_response.get( @@ -675,7 +631,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(FirewallRule, rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.rules.with_streaming_response.get( @@ -690,7 +645,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_id` but received ''"): diff --git a/tests/api_resources/firewall/test_ua_rules.py b/tests/api_resources/firewall/test_ua_rules.py index 4b9c99603c2..2397df21b87 100644 --- a/tests/api_resources/firewall/test_ua_rules.py +++ b/tests/api_resources/firewall/test_ua_rules.py @@ -10,11 +10,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.firewall.ua_rule_get_response import UARuleGetResponse -from cloudflare.types.firewall.ua_rule_list_response import UARuleListResponse -from cloudflare.types.firewall.ua_rule_create_response import UARuleCreateResponse -from cloudflare.types.firewall.ua_rule_delete_response import UARuleDeleteResponse -from cloudflare.types.firewall.ua_rule_update_response import UARuleUpdateResponse +from cloudflare.types.firewall import ( + UARuleGetResponse, + UARuleListResponse, + UARuleCreateResponse, + UARuleDeleteResponse, + UARuleUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,7 @@ class TestUARules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.create( @@ -31,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.create( @@ -44,7 +46,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ua_rule = response.parse() assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.create( @@ -59,7 +61,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -68,7 +70,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.update( @@ -78,7 +80,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.update( @@ -92,7 +94,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: ua_rule = response.parse() assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.update( @@ -108,7 +110,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -125,7 +127,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.list( @@ -133,7 +134,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.list( @@ -146,7 +146,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.list( @@ -158,7 +157,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: ua_rule = response.parse() assert_matches_type(SyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.list( @@ -172,7 +170,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -180,23 +177,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(UARuleDeleteResponse, ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -204,13 +197,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: ua_rule = response.parse() assert_matches_type(UARuleDeleteResponse, ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -220,24 +211,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.ua_rules.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.get( @@ -246,7 +233,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(UARuleGetResponse, ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.get( @@ -259,7 +245,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ua_rule = response.parse() assert_matches_type(UARuleGetResponse, ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.get( @@ -274,7 +259,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -293,7 +277,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncUARules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.create( @@ -302,7 +286,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.create( @@ -315,7 +299,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ua_rule = await response.parse() assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.create( @@ -330,7 +314,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -339,7 +323,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.update( @@ -349,7 +333,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.update( @@ -363,7 +347,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: ua_rule = await response.parse() assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.update( @@ -379,7 +363,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -396,7 +380,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.list( @@ -404,7 +387,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.list( @@ -417,7 +399,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.list( @@ -429,7 +410,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: ua_rule = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.list( @@ -443,7 +423,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -451,23 +430,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(UARuleDeleteResponse, ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -475,13 +450,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: ua_rule = await response.parse() assert_matches_type(UARuleDeleteResponse, ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -491,24 +464,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.ua_rules.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.get( @@ -517,7 +486,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(UARuleGetResponse, ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.get( @@ -530,7 +498,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ua_rule = await response.parse() assert_matches_type(UARuleGetResponse, ua_rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.get( @@ -545,7 +512,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/firewall/waf/packages/test_groups.py b/tests/api_resources/firewall/waf/packages/test_groups.py index 6297b160c03..b07aff7ed9d 100644 --- a/tests/api_resources/firewall/waf/packages/test_groups.py +++ b/tests/api_resources/firewall/waf/packages/test_groups.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.firewall.waf.packages.group import Group -from cloudflare.types.firewall.waf.packages.group_get_response import GroupGetResponse -from cloudflare.types.firewall.waf.packages.group_edit_response import GroupEditResponse +from cloudflare.types.firewall.waf.packages import ( + Group, + GroupGetResponse, + GroupEditResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.list( @@ -29,7 +30,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Group], group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.list( @@ -46,7 +46,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Group], group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.groups.with_raw_response.list( @@ -59,7 +58,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: group = response.parse() assert_matches_type(SyncV4PagePaginationArray[Group], group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.packages.groups.with_streaming_response.list( @@ -74,7 +72,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -89,7 +86,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.edit( @@ -99,7 +95,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(GroupEditResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.edit( @@ -110,7 +105,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(GroupEditResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.groups.with_raw_response.edit( @@ -124,7 +118,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: group = response.parse() assert_matches_type(GroupEditResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.waf.packages.groups.with_streaming_response.edit( @@ -140,7 +133,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -164,7 +156,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.get( @@ -174,7 +165,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(GroupGetResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.groups.with_raw_response.get( @@ -188,7 +178,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: group = response.parse() assert_matches_type(GroupGetResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.packages.groups.with_streaming_response.get( @@ -204,7 +193,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -232,7 +220,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.list( @@ -241,7 +228,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[Group], group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.list( @@ -258,7 +244,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Group], group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.groups.with_raw_response.list( @@ -271,7 +256,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: group = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Group], group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.groups.with_streaming_response.list( @@ -286,7 +270,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -301,7 +284,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.edit( @@ -311,7 +293,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(GroupEditResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.edit( @@ -322,7 +303,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(GroupEditResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.groups.with_raw_response.edit( @@ -336,7 +316,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: group = await response.parse() assert_matches_type(GroupEditResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.groups.with_streaming_response.edit( @@ -352,7 +331,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -376,7 +354,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.get( @@ -386,7 +363,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(GroupGetResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.groups.with_raw_response.get( @@ -400,7 +376,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: group = await response.parse() assert_matches_type(GroupGetResponse, group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.groups.with_streaming_response.get( @@ -416,7 +391,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/firewall/waf/packages/test_rules.py b/tests/api_resources/firewall/waf/packages/test_rules.py index 710c1f57117..5936030bd50 100644 --- a/tests/api_resources/firewall/waf/packages/test_rules.py +++ b/tests/api_resources/firewall/waf/packages/test_rules.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.firewall.waf.packages.rule_get_response import RuleGetResponse -from cloudflare.types.firewall.waf.packages.rule_edit_response import RuleEditResponse -from cloudflare.types.firewall.waf.packages.rule_list_response import RuleListResponse +from cloudflare.types.firewall.waf.packages import ( + RuleGetResponse, + RuleEditResponse, + RuleListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.list( @@ -29,7 +30,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.list( @@ -47,7 +47,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.rules.with_raw_response.list( @@ -60,7 +59,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.packages.rules.with_streaming_response.list( @@ -75,7 +73,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -90,7 +87,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.edit( @@ -100,7 +96,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.edit( @@ -111,7 +106,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.rules.with_raw_response.edit( @@ -125,7 +119,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.waf.packages.rules.with_streaming_response.edit( @@ -141,7 +134,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -165,7 +157,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.get( @@ -175,7 +166,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(RuleGetResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.rules.with_raw_response.get( @@ -189,7 +179,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleGetResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.packages.rules.with_streaming_response.get( @@ -205,7 +194,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -233,7 +221,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.list( @@ -242,7 +229,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.list( @@ -260,7 +246,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.rules.with_raw_response.list( @@ -273,7 +258,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.rules.with_streaming_response.list( @@ -288,7 +272,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -303,7 +286,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.edit( @@ -313,7 +295,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.edit( @@ -324,7 +305,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.rules.with_raw_response.edit( @@ -338,7 +318,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.rules.with_streaming_response.edit( @@ -354,7 +333,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -378,7 +356,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.get( @@ -388,7 +365,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RuleGetResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.rules.with_raw_response.get( @@ -402,7 +378,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(RuleGetResponse, rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.rules.with_streaming_response.get( @@ -418,7 +393,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/firewall/waf/test_overrides.py b/tests/api_resources/firewall/waf/test_overrides.py index d522f91966e..8a11a0e684f 100644 --- a/tests/api_resources/firewall/waf/test_overrides.py +++ b/tests/api_resources/firewall/waf/test_overrides.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.firewall.waf.override import Override -from cloudflare.types.firewall.waf.override_delete_response import OverrideDeleteResponse +from cloudflare.types.firewall.waf import ( + Override, + OverrideDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,7 @@ class TestOverrides: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.create( @@ -28,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.create( @@ -41,7 +43,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: override = response.parse() assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.create( @@ -56,7 +58,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -65,7 +67,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.update( @@ -75,7 +77,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.update( @@ -89,7 +91,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: override = response.parse() assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.update( @@ -105,7 +107,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -122,7 +124,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.list( @@ -130,7 +131,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Override], override, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.list( @@ -140,7 +140,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Override], override, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.list( @@ -152,7 +151,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: override = response.parse() assert_matches_type(SyncV4PagePaginationArray[Override], override, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.list( @@ -166,7 +164,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -174,23 +171,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.delete( "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[OverrideDeleteResponse], override, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.delete( "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -198,13 +191,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: override = response.parse() assert_matches_type(Optional[OverrideDeleteResponse], override, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.delete( "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -214,24 +205,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.delete( "de677e5818985db1285d0e80225f06e5", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.waf.overrides.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.get( @@ -240,7 +227,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.get( @@ -253,7 +239,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: override = response.parse() assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.get( @@ -268,7 +253,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -287,7 +271,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOverrides: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.create( @@ -296,7 +280,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.create( @@ -309,7 +293,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: override = await response.parse() assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.create( @@ -324,7 +308,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -333,7 +317,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.update( @@ -343,7 +327,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.update( @@ -357,7 +341,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: override = await response.parse() assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.update( @@ -373,7 +357,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -390,7 +374,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.list( @@ -398,7 +381,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[Override], override, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.list( @@ -408,7 +390,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Override], override, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.list( @@ -420,7 +401,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: override = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Override], override, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.list( @@ -434,7 +414,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -442,23 +421,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.delete( "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[OverrideDeleteResponse], override, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.delete( "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -466,13 +441,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: override = await response.parse() assert_matches_type(Optional[OverrideDeleteResponse], override, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.delete( "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -482,24 +455,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.delete( "de677e5818985db1285d0e80225f06e5", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.get( @@ -508,7 +477,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.get( @@ -521,7 +489,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: override = await response.parse() assert_matches_type(Override, override, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.get( @@ -536,7 +503,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/firewall/waf/test_packages.py b/tests/api_resources/firewall/waf/test_packages.py index 360c75560ee..9ce8631baf8 100644 --- a/tests/api_resources/firewall/waf/test_packages.py +++ b/tests/api_resources/firewall/waf/test_packages.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.firewall.waf.package_get_response import PackageGetResponse -from cloudflare.types.firewall.waf.package_list_response import PackageListResponse +from cloudflare.types.firewall.waf import PackageGetResponse, PackageListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,7 @@ class TestPackages: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: package = client.firewall.waf.packages.list( @@ -27,7 +26,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: package = client.firewall.waf.packages.list( @@ -41,7 +40,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.with_raw_response.list( @@ -53,7 +52,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: package = response.parse() assert_matches_type(SyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.packages.with_streaming_response.list( @@ -67,7 +66,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -75,7 +74,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: package = client.firewall.waf.packages.get( @@ -84,7 +82,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(PackageGetResponse, package, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.with_raw_response.get( @@ -97,7 +94,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: package = response.parse() assert_matches_type(PackageGetResponse, package, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.packages.with_streaming_response.get( @@ -112,7 +108,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -131,7 +126,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPackages: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: package = await async_client.firewall.waf.packages.list( @@ -139,7 +134,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: package = await async_client.firewall.waf.packages.list( @@ -153,7 +148,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.with_raw_response.list( @@ -165,7 +160,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: package = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.with_streaming_response.list( @@ -179,7 +174,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -187,7 +182,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: package = await async_client.firewall.waf.packages.get( @@ -196,7 +190,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PackageGetResponse, package, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.with_raw_response.get( @@ -209,7 +202,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: package = await response.parse() assert_matches_type(PackageGetResponse, package, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.with_streaming_response.get( @@ -224,7 +216,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/healthchecks/test_previews.py b/tests/api_resources/healthchecks/test_previews.py index 83cc4499eb4..8e270873849 100644 --- a/tests/api_resources/healthchecks/test_previews.py +++ b/tests/api_resources/healthchecks/test_previews.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.healthchecks.healthcheck import Healthcheck -from cloudflare.types.healthchecks.preview_delete_response import PreviewDeleteResponse +from cloudflare.types.healthchecks import ( + Healthcheck, + PreviewDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestPreviews: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: preview = client.healthchecks.previews.create( @@ -28,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: preview = client.healthchecks.previews.create( @@ -64,7 +64,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.healthchecks.previews.with_raw_response.create( @@ -78,7 +77,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: preview = response.parse() assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.healthchecks.previews.with_streaming_response.create( @@ -94,7 +92,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -104,23 +101,19 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="server-1", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: preview = client.healthchecks.previews.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(PreviewDeleteResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.healthchecks.previews.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -128,13 +121,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: preview = response.parse() assert_matches_type(PreviewDeleteResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.healthchecks.previews.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -144,24 +135,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.previews.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.previews.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: preview = client.healthchecks.previews.get( @@ -170,7 +157,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.healthchecks.previews.with_raw_response.get( @@ -183,7 +169,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: preview = response.parse() assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.healthchecks.previews.with_streaming_response.get( @@ -198,7 +183,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -217,7 +201,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPreviews: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: preview = await async_client.healthchecks.previews.create( @@ -227,7 +210,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: preview = await async_client.healthchecks.previews.create( @@ -263,7 +245,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.previews.with_raw_response.create( @@ -277,7 +258,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: preview = await response.parse() assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.previews.with_streaming_response.create( @@ -293,7 +273,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -303,23 +282,19 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="server-1", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: preview = await async_client.healthchecks.previews.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(PreviewDeleteResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.previews.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -327,13 +302,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: preview = await response.parse() assert_matches_type(PreviewDeleteResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.previews.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -343,24 +316,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: preview = await async_client.healthchecks.previews.get( @@ -369,7 +338,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.previews.with_raw_response.get( @@ -382,7 +350,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: preview = await response.parse() assert_matches_type(Healthcheck, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.previews.with_streaming_response.get( @@ -397,7 +364,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/hostnames/settings/test_tls.py b/tests/api_resources/hostnames/settings/test_tls.py index abe5159537a..7a3a570b024 100644 --- a/tests/api_resources/hostnames/settings/test_tls.py +++ b/tests/api_resources/hostnames/settings/test_tls.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.hostnames.settings.setting import Setting -from cloudflare.types.hostnames.settings.tls_get_response import TLSGetResponse -from cloudflare.types.hostnames.settings.tls_delete_response import TLSDeleteResponse +from cloudflare.types.hostnames.settings import ( + Setting, + TLSGetResponse, + TLSDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestTLS: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: tls = client.hostnames.settings.tls.update( @@ -28,9 +29,8 @@ def test_method_update(self, client: Cloudflare) -> None: setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], ) - assert_matches_type(Setting, tls, path=["response"]) + assert_matches_type(Optional[Setting], tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.hostnames.settings.tls.with_raw_response.update( @@ -43,9 +43,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(Setting, tls, path=["response"]) + assert_matches_type(Optional[Setting], tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.hostnames.settings.tls.with_streaming_response.update( @@ -58,11 +57,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(Setting, tls, path=["response"]) + assert_matches_type(Optional[Setting], tls, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -81,7 +79,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: tls = client.hostnames.settings.tls.delete( @@ -89,9 +86,8 @@ def test_method_delete(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(Optional[TLSDeleteResponse], tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.hostnames.settings.tls.with_raw_response.delete( @@ -103,9 +99,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(Optional[TLSDeleteResponse], tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.hostnames.settings.tls.with_streaming_response.delete( @@ -117,11 +112,10 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(Optional[TLSDeleteResponse], tls, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -138,7 +132,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: setting_id="ciphers", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tls = client.hostnames.settings.tls.get( @@ -147,7 +140,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TLSGetResponse], tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.hostnames.settings.tls.with_raw_response.get( @@ -160,7 +152,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tls = response.parse() assert_matches_type(Optional[TLSGetResponse], tls, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.hostnames.settings.tls.with_streaming_response.get( @@ -175,7 +166,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -188,7 +178,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTLS: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tls = await async_client.hostnames.settings.tls.update( @@ -197,9 +186,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], ) - assert_matches_type(Setting, tls, path=["response"]) + assert_matches_type(Optional[Setting], tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.hostnames.settings.tls.with_raw_response.update( @@ -212,9 +200,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(Setting, tls, path=["response"]) + assert_matches_type(Optional[Setting], tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.hostnames.settings.tls.with_streaming_response.update( @@ -227,11 +214,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(Setting, tls, path=["response"]) + assert_matches_type(Optional[Setting], tls, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -250,7 +236,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tls = await async_client.hostnames.settings.tls.delete( @@ -258,9 +243,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(Optional[TLSDeleteResponse], tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.hostnames.settings.tls.with_raw_response.delete( @@ -272,9 +256,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(Optional[TLSDeleteResponse], tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.hostnames.settings.tls.with_streaming_response.delete( @@ -286,11 +269,10 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(Optional[TLSDeleteResponse], tls, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -307,7 +289,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: setting_id="ciphers", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls = await async_client.hostnames.settings.tls.get( @@ -316,7 +297,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TLSGetResponse], tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.hostnames.settings.tls.with_raw_response.get( @@ -329,7 +309,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tls = await response.parse() assert_matches_type(Optional[TLSGetResponse], tls, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.hostnames.settings.tls.with_streaming_response.get( @@ -344,7 +323,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index 66cfb2bf678..b0f78ba131d 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.hyperdrive.hyperdrive import Hyperdrive -from cloudflare.types.hyperdrive.config_delete_response import ConfigDeleteResponse +from cloudflare.types.hyperdrive import ( + Hyperdrive, + ConfigDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,7 @@ class TestConfigs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.create( @@ -28,14 +30,14 @@ def test_method_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.create( @@ -44,7 +46,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -56,7 +58,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.create( @@ -65,7 +67,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -76,7 +78,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.create( @@ -85,7 +87,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -98,7 +100,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -108,13 +110,13 @@ def test_path_params_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.update( @@ -124,14 +126,14 @@ def test_method_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.update( @@ -141,7 +143,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -153,7 +155,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.update( @@ -163,7 +165,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -174,7 +176,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.update( @@ -184,7 +186,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -197,7 +199,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -208,7 +210,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -222,13 +224,12 @@ def test_path_params_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.list( @@ -236,7 +237,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.list( @@ -248,7 +248,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(SyncSinglePage[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.list( @@ -262,7 +261,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -270,7 +268,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.delete( @@ -279,7 +276,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(ConfigDeleteResponse, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.delete( @@ -292,7 +288,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(ConfigDeleteResponse, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.delete( @@ -307,7 +302,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -322,7 +316,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.edit( @@ -331,7 +325,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.edit( @@ -346,14 +340,14 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.edit( @@ -366,7 +360,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.edit( @@ -381,7 +375,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -396,7 +390,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.get( @@ -405,7 +398,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.get( @@ -418,7 +410,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.get( @@ -433,7 +424,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -452,7 +442,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.create( @@ -461,14 +451,14 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.create( @@ -477,7 +467,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -489,7 +479,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.create( @@ -498,7 +488,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -509,7 +499,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.create( @@ -518,7 +508,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -531,7 +521,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -541,13 +531,13 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.update( @@ -557,14 +547,14 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.update( @@ -574,7 +564,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -586,7 +576,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.update( @@ -596,7 +586,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -607,7 +597,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.update( @@ -617,7 +607,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -630,7 +620,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -641,7 +631,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -655,13 +645,12 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.list( @@ -669,7 +658,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.list( @@ -681,7 +669,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(AsyncSinglePage[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.list( @@ -695,7 +682,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -703,7 +689,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.delete( @@ -712,7 +697,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ConfigDeleteResponse, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.delete( @@ -725,7 +709,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(ConfigDeleteResponse, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.delete( @@ -740,7 +723,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -755,7 +737,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.edit( @@ -764,7 +746,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.edit( @@ -779,14 +761,14 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.edit( @@ -799,7 +781,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.edit( @@ -814,7 +796,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -829,7 +811,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.get( @@ -838,7 +819,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.get( @@ -851,7 +831,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Optional[Hyperdrive], config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.get( @@ -866,7 +845,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py index fc6ab9d69f0..5662df98dcc 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePagination, AsyncV4PagePagination -from cloudflare.types.images.image import Image -from cloudflare.types.images.v1_list_response import V1ListResponse -from cloudflare.types.images.v1_delete_response import V1DeleteResponse +from cloudflare.types.images import ( + Image, + V1ListResponse, + V1DeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,7 @@ class TestV1: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: v1 = client.images.v1.create( @@ -28,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.create( @@ -40,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.create( @@ -52,7 +54,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: v1 = response.parse() assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.create( @@ -66,7 +68,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -74,7 +76,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: v1 = client.images.v1.list( @@ -82,7 +83,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[V1ListResponse], v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.list( @@ -92,7 +92,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[V1ListResponse], v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.list( @@ -104,7 +103,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: v1 = response.parse() assert_matches_type(SyncV4PagePagination[V1ListResponse], v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.list( @@ -118,7 +116,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -126,23 +123,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: v1 = client.images.v1.delete( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(V1DeleteResponse, v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.delete( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -150,13 +143,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: v1 = response.parse() assert_matches_type(V1DeleteResponse, v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.delete( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -166,24 +157,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.with_raw_response.delete( "string", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): client.images.v1.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: v1 = client.images.v1.edit( @@ -192,7 +179,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.edit( @@ -203,7 +189,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.edit( @@ -216,7 +201,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: v1 = response.parse() assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.edit( @@ -231,7 +215,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -246,7 +229,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: v1 = client.images.v1.get( @@ -255,7 +237,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.get( @@ -268,7 +249,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: v1 = response.parse() assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.get( @@ -283,7 +263,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -302,7 +281,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncV1: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.create( @@ -310,7 +289,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.create( @@ -322,7 +301,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.create( @@ -334,7 +313,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: v1 = await response.parse() assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.create( @@ -348,7 +327,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -356,7 +335,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.list( @@ -364,7 +342,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePagination[V1ListResponse], v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.list( @@ -374,7 +351,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePagination[V1ListResponse], v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.list( @@ -386,7 +362,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: v1 = await response.parse() assert_matches_type(AsyncV4PagePagination[V1ListResponse], v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.list( @@ -400,7 +375,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -408,23 +382,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.delete( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(V1DeleteResponse, v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.delete( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -432,13 +402,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: v1 = await response.parse() assert_matches_type(V1DeleteResponse, v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.delete( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -448,24 +416,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.with_raw_response.delete( "string", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): await async_client.images.v1.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.edit( @@ -474,7 +438,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.edit( @@ -485,7 +448,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.edit( @@ -498,7 +460,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: v1 = await response.parse() assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.edit( @@ -513,7 +474,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -528,7 +488,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.get( @@ -537,7 +496,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.get( @@ -550,7 +508,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: v1 = await response.parse() assert_matches_type(Image, v1, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.get( @@ -565,7 +522,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/images/test_v2.py b/tests/api_resources/images/test_v2.py index cad004cfc42..52527ae66ae 100644 --- a/tests/api_resources/images/test_v2.py +++ b/tests/api_resources/images/test_v2.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.images.v2_list_response import V2ListResponse +from cloudflare.types.images import V2ListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestV2: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: v2 = client.images.v2.list( @@ -25,7 +24,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(V2ListResponse, v2, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: v2 = client.images.v2.list( @@ -36,7 +34,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(V2ListResponse, v2, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.images.v2.with_raw_response.list( @@ -48,7 +45,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: v2 = response.parse() assert_matches_type(V2ListResponse, v2, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.images.v2.with_streaming_response.list( @@ -62,7 +58,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -74,7 +69,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncV2: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: v2 = await async_client.images.v2.list( @@ -82,7 +76,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(V2ListResponse, v2, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: v2 = await async_client.images.v2.list( @@ -93,7 +86,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(V2ListResponse, v2, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v2.with_raw_response.list( @@ -105,7 +97,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: v2 = await response.parse() assert_matches_type(V2ListResponse, v2, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v2.with_streaming_response.list( @@ -119,7 +110,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/images/v1/test_blobs.py b/tests/api_resources/images/v1/test_blobs.py index 51341b70d65..e9573fc5000 100644 --- a/tests/api_resources/images/v1/test_blobs.py +++ b/tests/api_resources/images/v1/test_blobs.py @@ -23,7 +23,6 @@ class TestBlobs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -39,7 +38,6 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: assert cast(Any, blob.is_closed) is True assert isinstance(blob, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -57,7 +55,6 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N assert blob.json() == {"foo": "bar"} assert isinstance(blob, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -77,7 +74,6 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter assert cast(Any, blob.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_path_params_get(self, client: Cloudflare) -> None: @@ -97,7 +93,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBlobs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -113,7 +108,6 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR assert cast(Any, blob.is_closed) is True assert isinstance(blob, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -131,7 +125,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: assert await blob.json() == {"foo": "bar"} assert isinstance(blob, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -151,7 +144,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx assert cast(Any, blob.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/v1/test_keys.py b/tests/api_resources/images/v1/test_keys.py index 24ec699ed7c..570044e7b4f 100644 --- a/tests/api_resources/images/v1/test_keys.py +++ b/tests/api_resources/images/v1/test_keys.py @@ -9,9 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.images.v1.key_list_response import KeyListResponse -from cloudflare.types.images.v1.key_delete_response import KeyDeleteResponse -from cloudflare.types.images.v1.key_update_response import KeyUpdateResponse +from cloudflare.types.images.v1 import KeyListResponse, KeyDeleteResponse, KeyUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +17,6 @@ class TestKeys: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: key = client.images.v1.keys.update( @@ -28,7 +25,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(KeyUpdateResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.images.v1.keys.with_raw_response.update( @@ -41,7 +37,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(KeyUpdateResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.images.v1.keys.with_streaming_response.update( @@ -56,7 +51,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -71,7 +65,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: key = client.images.v1.keys.list( @@ -79,7 +72,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(KeyListResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.images.v1.keys.with_raw_response.list( @@ -91,7 +83,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(KeyListResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.images.v1.keys.with_streaming_response.list( @@ -105,7 +96,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -113,7 +103,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: key = client.images.v1.keys.delete( @@ -122,7 +111,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.images.v1.keys.with_raw_response.delete( @@ -135,7 +123,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(KeyDeleteResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.images.v1.keys.with_streaming_response.delete( @@ -150,7 +137,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -169,7 +155,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncKeys: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: key = await async_client.images.v1.keys.update( @@ -178,7 +163,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(KeyUpdateResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.keys.with_raw_response.update( @@ -191,7 +175,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(KeyUpdateResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.keys.with_streaming_response.update( @@ -206,7 +189,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -221,7 +203,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: key = await async_client.images.v1.keys.list( @@ -229,7 +210,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(KeyListResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.keys.with_raw_response.list( @@ -241,7 +221,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(KeyListResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.keys.with_streaming_response.list( @@ -255,7 +234,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -263,7 +241,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: key = await async_client.images.v1.keys.delete( @@ -272,7 +249,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.keys.with_raw_response.delete( @@ -285,7 +261,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(KeyDeleteResponse, key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.keys.with_streaming_response.delete( @@ -300,7 +275,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/images/v1/test_stats.py b/tests/api_resources/images/v1/test_stats.py index bc63e4b3200..ba44e332bc2 100644 --- a/tests/api_resources/images/v1/test_stats.py +++ b/tests/api_resources/images/v1/test_stats.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.images.v1.stat import Stat +from cloudflare.types.images.v1 import Stat base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestStats: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: stat = client.images.v1.stats.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Stat, stat, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.images.v1.stats.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: stat = response.parse() assert_matches_type(Stat, stat, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.images.v1.stats.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStats: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: stat = await async_client.images.v1.stats.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Stat, stat, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.stats.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: stat = await response.parse() assert_matches_type(Stat, stat, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.stats.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/images/v1/test_variants.py b/tests/api_resources/images/v1/test_variants.py index f0b82621cf7..d5cb41d40f0 100644 --- a/tests/api_resources/images/v1/test_variants.py +++ b/tests/api_resources/images/v1/test_variants.py @@ -9,11 +9,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.images.v1.variant import Variant -from cloudflare.types.images.v1.variant_get_response import VariantGetResponse -from cloudflare.types.images.v1.variant_edit_response import VariantEditResponse -from cloudflare.types.images.v1.variant_create_response import VariantCreateResponse -from cloudflare.types.images.v1.variant_delete_response import VariantDeleteResponse +from cloudflare.types.images.v1 import ( + Variant, + VariantGetResponse, + VariantEditResponse, + VariantCreateResponse, + VariantDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestVariants: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: variant = client.images.v1.variants.create( @@ -36,7 +37,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(VariantCreateResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: variant = client.images.v1.variants.create( @@ -52,7 +52,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(VariantCreateResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.create( @@ -71,7 +70,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: variant = response.parse() assert_matches_type(VariantCreateResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.create( @@ -92,7 +90,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -107,7 +104,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: variant = client.images.v1.variants.list( @@ -115,7 +111,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Variant, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.list( @@ -127,7 +122,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: variant = response.parse() assert_matches_type(Variant, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.list( @@ -141,7 +135,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -149,23 +142,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: variant = client.images.v1.variants.delete( "hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(VariantDeleteResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.delete( "hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -173,13 +162,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: variant = response.parse() assert_matches_type(VariantDeleteResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.delete( "hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -189,24 +176,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.variants.with_raw_response.delete( "hero", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): client.images.v1.variants.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: variant = client.images.v1.variants.edit( @@ -221,7 +204,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: variant = client.images.v1.variants.edit( @@ -237,7 +219,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.edit( @@ -256,7 +237,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: variant = response.parse() assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.edit( @@ -277,7 +257,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -304,7 +283,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: variant = client.images.v1.variants.get( @@ -313,7 +291,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(VariantGetResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.get( @@ -326,7 +303,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: variant = response.parse() assert_matches_type(VariantGetResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.get( @@ -341,7 +317,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -360,7 +335,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVariants: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.create( @@ -375,7 +349,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(VariantCreateResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.create( @@ -391,7 +364,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(VariantCreateResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.create( @@ -410,7 +382,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: variant = await response.parse() assert_matches_type(VariantCreateResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.create( @@ -431,7 +402,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -446,7 +416,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.list( @@ -454,7 +423,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Variant, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.list( @@ -466,7 +434,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: variant = await response.parse() assert_matches_type(Variant, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.list( @@ -480,7 +447,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -488,23 +454,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.delete( "hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(VariantDeleteResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.delete( "hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -512,13 +474,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: variant = await response.parse() assert_matches_type(VariantDeleteResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.delete( "hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -528,24 +488,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.variants.with_raw_response.delete( "hero", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): await async_client.images.v1.variants.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.edit( @@ -560,7 +516,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.edit( @@ -576,7 +531,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.edit( @@ -595,7 +549,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: variant = await response.parse() assert_matches_type(VariantEditResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.edit( @@ -616,7 +569,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -643,7 +595,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.get( @@ -652,7 +603,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(VariantGetResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.get( @@ -665,7 +615,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: variant = await response.parse() assert_matches_type(VariantGetResponse, variant, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.get( @@ -680,7 +629,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/images/v2/test_direct_uploads.py b/tests/api_resources/images/v2/test_direct_uploads.py index 43d7ea9735b..88a6299905f 100644 --- a/tests/api_resources/images/v2/test_direct_uploads.py +++ b/tests/api_resources/images/v2/test_direct_uploads.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.images.v2.direct_upload_create_response import DirectUploadCreateResponse +from cloudflare.types.images.v2 import DirectUploadCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,7 @@ class TestDirectUploads: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: direct_upload = client.images.v2.direct_uploads.create( @@ -26,7 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(DirectUploadCreateResponse, direct_upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: direct_upload = client.images.v2.direct_uploads.create( @@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(DirectUploadCreateResponse, direct_upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.images.v2.direct_uploads.with_raw_response.create( @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: direct_upload = response.parse() assert_matches_type(DirectUploadCreateResponse, direct_upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.images.v2.direct_uploads.with_streaming_response.create( @@ -64,7 +64,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -76,7 +76,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncDirectUploads: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: direct_upload = await async_client.images.v2.direct_uploads.create( @@ -84,7 +84,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DirectUploadCreateResponse, direct_upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: direct_upload = await async_client.images.v2.direct_uploads.create( @@ -96,7 +96,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(DirectUploadCreateResponse, direct_upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v2.direct_uploads.with_raw_response.create( @@ -108,7 +108,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: direct_upload = await response.parse() assert_matches_type(DirectUploadCreateResponse, direct_upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v2.direct_uploads.with_streaming_response.create( @@ -122,7 +122,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/asn/test_subnets.py b/tests/api_resources/intel/asn/test_subnets.py index 569fbd0a4fe..b231532262f 100644 --- a/tests/api_resources/intel/asn/test_subnets.py +++ b/tests/api_resources/intel/asn/test_subnets.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.asn.subnet_get_response import SubnetGetResponse +from cloudflare.types.intel.asn import SubnetGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSubnets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: subnet = client.intel.asn.subnets.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(SubnetGetResponse, subnet, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.asn.subnets.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: subnet = response.parse() assert_matches_type(SubnetGetResponse, subnet, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.asn.subnets.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -67,7 +63,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubnets: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: subnet = await async_client.intel.asn.subnets.get( @@ -76,7 +71,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SubnetGetResponse, subnet, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.asn.subnets.with_raw_response.get( @@ -89,7 +83,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: subnet = await response.parse() assert_matches_type(SubnetGetResponse, subnet, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.asn.subnets.with_streaming_response.get( @@ -104,7 +97,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/attack_surface_report/test_issue_types.py b/tests/api_resources/intel/attack_surface_report/test_issue_types.py index 8bc0538f087..904b3db245f 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issue_types.py +++ b/tests/api_resources/intel/attack_surface_report/test_issue_types.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.attack_surface_report.issue_type_get_response import IssueTypeGetResponse +from cloudflare.types.intel.attack_surface_report import IssueTypeGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestIssueTypes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: issue_type = client.intel.attack_surface_report.issue_types.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.attack_surface_report.issue_types.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: issue_type = response.parse() assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.attack_surface_report.issue_types.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIssueTypes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: issue_type = await async_client.intel.attack_surface_report.issue_types.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.attack_surface_report.issue_types.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: issue_type = await response.parse() assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.attack_surface_report.issue_types.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/attack_surface_report/test_issues.py b/tests/api_resources/intel/attack_surface_report/test_issues.py index 52094c38239..7f46dae5dca 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issues.py +++ b/tests/api_resources/intel/attack_surface_report/test_issues.py @@ -10,11 +10,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePagination, AsyncV4PagePagination -from cloudflare.types.intel.attack_surface_report.issue_list_response import IssueListResponse -from cloudflare.types.intel.attack_surface_report.issue_type_response import IssueTypeResponse -from cloudflare.types.intel.attack_surface_report.issue_class_response import IssueClassResponse -from cloudflare.types.intel.attack_surface_report.issue_dismiss_response import IssueDismissResponse -from cloudflare.types.intel.attack_surface_report.issue_severity_response import IssueSeverityResponse +from cloudflare.types.intel.attack_surface_report import ( + IssueListResponse, + IssueTypeResponse, + IssueClassResponse, + IssueDismissResponse, + IssueSeverityResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,6 @@ class TestIssues: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.list( @@ -30,7 +31,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[IssueListResponse], issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.list( @@ -51,7 +51,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[IssueListResponse], issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.intel.attack_surface_report.issues.with_raw_response.list( @@ -63,7 +62,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: issue = response.parse() assert_matches_type(SyncV4PagePagination[IssueListResponse], issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.intel.attack_surface_report.issues.with_streaming_response.list( @@ -77,7 +75,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -85,7 +82,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_class(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.class_( @@ -93,7 +89,6 @@ def test_method_class(self, client: Cloudflare) -> None: ) assert_matches_type(IssueClassResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_class_with_all_params(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.class_( @@ -112,7 +107,6 @@ def test_method_class_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(IssueClassResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_class(self, client: Cloudflare) -> None: response = client.intel.attack_surface_report.issues.with_raw_response.class_( @@ -124,7 +118,6 @@ def test_raw_response_class(self, client: Cloudflare) -> None: issue = response.parse() assert_matches_type(IssueClassResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_class(self, client: Cloudflare) -> None: with client.intel.attack_surface_report.issues.with_streaming_response.class_( @@ -138,7 +131,6 @@ def test_streaming_response_class(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_class(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -146,7 +138,6 @@ def test_path_params_class(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_dismiss(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.dismiss( @@ -155,7 +146,6 @@ def test_method_dismiss(self, client: Cloudflare) -> None: ) assert_matches_type(IssueDismissResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.dismiss( @@ -165,7 +155,6 @@ def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(IssueDismissResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dismiss(self, client: Cloudflare) -> None: response = client.intel.attack_surface_report.issues.with_raw_response.dismiss( @@ -178,7 +167,6 @@ def test_raw_response_dismiss(self, client: Cloudflare) -> None: issue = response.parse() assert_matches_type(IssueDismissResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dismiss(self, client: Cloudflare) -> None: with client.intel.attack_surface_report.issues.with_streaming_response.dismiss( @@ -193,7 +181,6 @@ def test_streaming_response_dismiss(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_dismiss(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -208,7 +195,6 @@ def test_path_params_dismiss(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_severity(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.severity( @@ -216,7 +202,6 @@ def test_method_severity(self, client: Cloudflare) -> None: ) assert_matches_type(IssueSeverityResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_severity_with_all_params(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.severity( @@ -235,7 +220,6 @@ def test_method_severity_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(IssueSeverityResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_severity(self, client: Cloudflare) -> None: response = client.intel.attack_surface_report.issues.with_raw_response.severity( @@ -247,7 +231,6 @@ def test_raw_response_severity(self, client: Cloudflare) -> None: issue = response.parse() assert_matches_type(IssueSeverityResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_severity(self, client: Cloudflare) -> None: with client.intel.attack_surface_report.issues.with_streaming_response.severity( @@ -261,7 +244,6 @@ def test_streaming_response_severity(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_severity(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -269,7 +251,6 @@ def test_path_params_severity(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_type(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.type( @@ -277,7 +258,6 @@ def test_method_type(self, client: Cloudflare) -> None: ) assert_matches_type(IssueTypeResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_type_with_all_params(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.type( @@ -296,7 +276,6 @@ def test_method_type_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(IssueTypeResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_type(self, client: Cloudflare) -> None: response = client.intel.attack_surface_report.issues.with_raw_response.type( @@ -308,7 +287,6 @@ def test_raw_response_type(self, client: Cloudflare) -> None: issue = response.parse() assert_matches_type(IssueTypeResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_type(self, client: Cloudflare) -> None: with client.intel.attack_surface_report.issues.with_streaming_response.type( @@ -322,7 +300,6 @@ def test_streaming_response_type(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_type(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -334,7 +311,6 @@ def test_path_params_type(self, client: Cloudflare) -> None: class TestAsyncIssues: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.list( @@ -342,7 +318,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePagination[IssueListResponse], issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.list( @@ -363,7 +338,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePagination[IssueListResponse], issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.attack_surface_report.issues.with_raw_response.list( @@ -375,7 +349,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: issue = await response.parse() assert_matches_type(AsyncV4PagePagination[IssueListResponse], issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.attack_surface_report.issues.with_streaming_response.list( @@ -389,7 +362,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -397,7 +369,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_class(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.class_( @@ -405,7 +376,6 @@ async def test_method_class(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IssueClassResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_class_with_all_params(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.class_( @@ -424,7 +394,6 @@ async def test_method_class_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(IssueClassResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_class(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.attack_surface_report.issues.with_raw_response.class_( @@ -436,7 +405,6 @@ async def test_raw_response_class(self, async_client: AsyncCloudflare) -> None: issue = await response.parse() assert_matches_type(IssueClassResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_class(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.attack_surface_report.issues.with_streaming_response.class_( @@ -450,7 +418,6 @@ async def test_streaming_response_class(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_class(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -458,7 +425,6 @@ async def test_path_params_class(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.dismiss( @@ -467,7 +433,6 @@ async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IssueDismissResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.dismiss( @@ -477,7 +442,6 @@ async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(IssueDismissResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.attack_surface_report.issues.with_raw_response.dismiss( @@ -490,7 +454,6 @@ async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None issue = await response.parse() assert_matches_type(IssueDismissResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.attack_surface_report.issues.with_streaming_response.dismiss( @@ -505,7 +468,6 @@ async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_dismiss(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -520,7 +482,6 @@ async def test_path_params_dismiss(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_severity(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.severity( @@ -528,7 +489,6 @@ async def test_method_severity(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IssueSeverityResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_severity_with_all_params(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.severity( @@ -547,7 +507,6 @@ async def test_method_severity_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(IssueSeverityResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_severity(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.attack_surface_report.issues.with_raw_response.severity( @@ -559,7 +518,6 @@ async def test_raw_response_severity(self, async_client: AsyncCloudflare) -> Non issue = await response.parse() assert_matches_type(IssueSeverityResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_severity(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.attack_surface_report.issues.with_streaming_response.severity( @@ -573,7 +531,6 @@ async def test_streaming_response_severity(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_severity(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -581,7 +538,6 @@ async def test_path_params_severity(self, async_client: AsyncCloudflare) -> None account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_type(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.type( @@ -589,7 +545,6 @@ async def test_method_type(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IssueTypeResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_type_with_all_params(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.type( @@ -608,7 +563,6 @@ async def test_method_type_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(IssueTypeResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_type(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.attack_surface_report.issues.with_raw_response.type( @@ -620,7 +574,6 @@ async def test_raw_response_type(self, async_client: AsyncCloudflare) -> None: issue = await response.parse() assert_matches_type(IssueTypeResponse, issue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_type(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.attack_surface_report.issues.with_streaming_response.type( @@ -634,7 +587,6 @@ async def test_streaming_response_type(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_type(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/domains/test_bulks.py b/tests/api_resources/intel/domains/test_bulks.py index 219c656996e..0a1c1828bc7 100644 --- a/tests/api_resources/intel/domains/test_bulks.py +++ b/tests/api_resources/intel/domains/test_bulks.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.domains.bulk_get_response import BulkGetResponse +from cloudflare.types.intel.domains import BulkGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestBulks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bulk = client.intel.domains.bulks.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BulkGetResponse], bulk, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bulk = client.intel.domains.bulks.get( @@ -34,7 +32,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BulkGetResponse], bulk, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.domains.bulks.with_raw_response.get( @@ -46,7 +43,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: bulk = response.parse() assert_matches_type(Optional[BulkGetResponse], bulk, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.domains.bulks.with_streaming_response.get( @@ -60,7 +56,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -72,7 +67,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBulks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bulk = await async_client.intel.domains.bulks.get( @@ -80,7 +74,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BulkGetResponse], bulk, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bulk = await async_client.intel.domains.bulks.get( @@ -89,7 +82,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[BulkGetResponse], bulk, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.domains.bulks.with_raw_response.get( @@ -101,7 +93,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: bulk = await response.parse() assert_matches_type(Optional[BulkGetResponse], bulk, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.domains.bulks.with_streaming_response.get( @@ -115,7 +106,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/indicator_feeds/test_permissions.py b/tests/api_resources/intel/indicator_feeds/test_permissions.py index dc86ad524b0..3b06e3c0d14 100644 --- a/tests/api_resources/intel/indicator_feeds/test_permissions.py +++ b/tests/api_resources/intel/indicator_feeds/test_permissions.py @@ -3,15 +3,17 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.indicator_feeds.permission_list_response import PermissionListResponse -from cloudflare.types.intel.indicator_feeds.permission_create_response import PermissionCreateResponse -from cloudflare.types.intel.indicator_feeds.permission_delete_response import PermissionDeleteResponse +from cloudflare.types.intel.indicator_feeds import ( + PermissionListResponse, + PermissionCreateResponse, + PermissionDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,15 +21,13 @@ class TestPermissions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: permission = client.intel.indicator_feeds.permissions.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionCreateResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: permission = client.intel.indicator_feeds.permissions.create( @@ -35,9 +35,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_tag="823f45f16fd2f7e21e1e054aga4d2859", feed_id=1, ) - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionCreateResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.permissions.with_raw_response.create( @@ -47,9 +46,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionCreateResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.permissions.with_streaming_response.create( @@ -59,11 +57,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionCreateResponse], permission, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -71,15 +68,13 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: permission = client.intel.indicator_feeds.permissions.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionListResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionListResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.permissions.with_raw_response.list( @@ -89,9 +84,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionListResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionListResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.permissions.with_streaming_response.list( @@ -101,11 +95,10 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionListResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionListResponse], permission, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -113,15 +106,13 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: permission = client.intel.indicator_feeds.permissions.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionDeleteResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: permission = client.intel.indicator_feeds.permissions.delete( @@ -129,9 +120,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: account_tag="823f45f16fd2f7e21e1e054aga4d2859", feed_id=1, ) - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionDeleteResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.permissions.with_raw_response.delete( @@ -141,9 +131,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionDeleteResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.permissions.with_streaming_response.delete( @@ -153,11 +142,10 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionDeleteResponse], permission, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -169,15 +157,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncPermissions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: permission = await async_client.intel.indicator_feeds.permissions.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionCreateResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: permission = await async_client.intel.indicator_feeds.permissions.create( @@ -185,9 +171,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_tag="823f45f16fd2f7e21e1e054aga4d2859", feed_id=1, ) - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionCreateResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.permissions.with_raw_response.create( @@ -197,9 +182,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionCreateResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.permissions.with_streaming_response.create( @@ -209,11 +193,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionCreateResponse], permission, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -221,15 +204,13 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: permission = await async_client.intel.indicator_feeds.permissions.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionListResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionListResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.permissions.with_raw_response.list( @@ -239,9 +220,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionListResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionListResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.permissions.with_streaming_response.list( @@ -251,11 +231,10 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionListResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionListResponse], permission, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -263,15 +242,13 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: permission = await async_client.intel.indicator_feeds.permissions.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionDeleteResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: permission = await async_client.intel.indicator_feeds.permissions.delete( @@ -279,9 +256,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare account_tag="823f45f16fd2f7e21e1e054aga4d2859", feed_id=1, ) - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionDeleteResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.permissions.with_raw_response.delete( @@ -291,9 +267,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionDeleteResponse], permission, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.permissions.with_streaming_response.delete( @@ -303,11 +278,10 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(Optional[PermissionDeleteResponse], permission, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/indicator_feeds/test_snapshots.py b/tests/api_resources/intel/indicator_feeds/test_snapshots.py new file mode 100644 index 00000000000..0db382b0f3f --- /dev/null +++ b/tests/api_resources/intel/indicator_feeds/test_snapshots.py @@ -0,0 +1,134 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, Optional, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.types.intel.indicator_feeds import SnapshotUpdateResponse + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestSnapshots: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + snapshot = client.intel.indicator_feeds.snapshots.update( + 12, + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_method_update_with_all_params(self, client: Cloudflare) -> None: + snapshot = client.intel.indicator_feeds.snapshots.update( + 12, + account_id="023e105f4ecef8ad9ca31a8372d0c353", + source="@/Users/me/test.stix2", + ) + assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.intel.indicator_feeds.snapshots.with_raw_response.update( + 12, + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + snapshot = response.parse() + assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.intel.indicator_feeds.snapshots.with_streaming_response.update( + 12, + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + snapshot = response.parse() + assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_path_params_update(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.intel.indicator_feeds.snapshots.with_raw_response.update( + 12, + account_id="", + ) + + +class TestAsyncSnapshots: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + snapshot = await async_client.intel.indicator_feeds.snapshots.update( + 12, + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: + snapshot = await async_client.intel.indicator_feeds.snapshots.update( + 12, + account_id="023e105f4ecef8ad9ca31a8372d0c353", + source="@/Users/me/test.stix2", + ) + assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.intel.indicator_feeds.snapshots.with_raw_response.update( + 12, + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + snapshot = await response.parse() + assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.intel.indicator_feeds.snapshots.with_streaming_response.update( + 12, + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + snapshot = await response.parse() + assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.intel.indicator_feeds.snapshots.with_raw_response.update( + 12, + account_id="", + ) diff --git a/tests/api_resources/intel/test_asn.py b/tests/api_resources/intel/test_asn.py index e6422689e81..5ef9475861f 100644 --- a/tests/api_resources/intel/test_asn.py +++ b/tests/api_resources/intel/test_asn.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.shared.asn import ASN +from cloudflare.types.shared import ASN base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,16 +17,14 @@ class TestASN: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: asn = client.intel.asn.get( 0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ASN, asn, path=["response"]) + assert_matches_type(Optional[ASN], asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.asn.with_raw_response.get( @@ -37,9 +35,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" asn = response.parse() - assert_matches_type(ASN, asn, path=["response"]) + assert_matches_type(Optional[ASN], asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.asn.with_streaming_response.get( @@ -50,11 +47,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" asn = response.parse() - assert_matches_type(ASN, asn, path=["response"]) + assert_matches_type(Optional[ASN], asn, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -67,16 +63,14 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncASN: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: asn = await async_client.intel.asn.get( 0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ASN, asn, path=["response"]) + assert_matches_type(Optional[ASN], asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.asn.with_raw_response.get( @@ -87,9 +81,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" asn = await response.parse() - assert_matches_type(ASN, asn, path=["response"]) + assert_matches_type(Optional[ASN], asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.asn.with_streaming_response.get( @@ -100,11 +93,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" asn = await response.parse() - assert_matches_type(ASN, asn, path=["response"]) + assert_matches_type(Optional[ASN], asn, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/test_dns.py b/tests/api_resources/intel/test_dns.py index 16030078128..4e95dc2891a 100644 --- a/tests/api_resources/intel/test_dns.py +++ b/tests/api_resources/intel/test_dns.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_date from cloudflare.pagination import SyncV4PagePagination, AsyncV4PagePagination -from cloudflare.types.intel.dns_list_response import DNSListResponse +from cloudflare.types.intel import DNSListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +19,6 @@ class TestDNS: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: dns = client.intel.dns.list( @@ -27,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[DNSListResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: dns = client.intel.dns.list( @@ -42,7 +40,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[DNSListResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.intel.dns.with_raw_response.list( @@ -54,7 +51,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: dns = response.parse() assert_matches_type(SyncV4PagePagination[DNSListResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.intel.dns.with_streaming_response.list( @@ -68,7 +64,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -80,7 +75,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncDNS: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: dns = await async_client.intel.dns.list( @@ -88,7 +82,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePagination[DNSListResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: dns = await async_client.intel.dns.list( @@ -103,7 +96,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePagination[DNSListResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.dns.with_raw_response.list( @@ -115,7 +107,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: dns = await response.parse() assert_matches_type(AsyncV4PagePagination[DNSListResponse], dns, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.dns.with_streaming_response.list( @@ -129,7 +120,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/test_domain_history.py b/tests/api_resources/intel/test_domain_history.py index f3393ae4f65..75926dc919d 100644 --- a/tests/api_resources/intel/test_domain_history.py +++ b/tests/api_resources/intel/test_domain_history.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.domain_history_get_response import DomainHistoryGetResponse +from cloudflare.types.intel import DomainHistoryGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestDomainHistory: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: domain_history = client.intel.domain_history.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DomainHistoryGetResponse], domain_history, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: domain_history = client.intel.domain_history.get( @@ -34,7 +32,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DomainHistoryGetResponse], domain_history, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.domain_history.with_raw_response.get( @@ -46,7 +43,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: domain_history = response.parse() assert_matches_type(Optional[DomainHistoryGetResponse], domain_history, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.domain_history.with_streaming_response.get( @@ -60,7 +56,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -72,7 +67,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomainHistory: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain_history = await async_client.intel.domain_history.get( @@ -80,7 +74,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DomainHistoryGetResponse], domain_history, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: domain_history = await async_client.intel.domain_history.get( @@ -89,7 +82,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[DomainHistoryGetResponse], domain_history, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.domain_history.with_raw_response.get( @@ -101,7 +93,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: domain_history = await response.parse() assert_matches_type(Optional[DomainHistoryGetResponse], domain_history, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.domain_history.with_streaming_response.get( @@ -115,7 +106,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/test_domains.py b/tests/api_resources/intel/test_domains.py index 181c005a139..7241e5d4ad2 100644 --- a/tests/api_resources/intel/test_domains.py +++ b/tests/api_resources/intel/test_domains.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.domain import Domain +from cloudflare.types.intel import Domain base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,24 +17,21 @@ class TestDomains: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Domain, domain, path=["response"]) + assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: domain = client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="string", ) - assert_matches_type(Domain, domain, path=["response"]) + assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.domains.with_raw_response.get( @@ -44,9 +41,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(Domain, domain, path=["response"]) + assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.domains.with_streaming_response.get( @@ -56,11 +52,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(Domain, domain, path=["response"]) + assert_matches_type(Optional[Domain], domain, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -72,24 +67,21 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Domain, domain, path=["response"]) + assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="string", ) - assert_matches_type(Domain, domain, path=["response"]) + assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.domains.with_raw_response.get( @@ -99,9 +91,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(Domain, domain, path=["response"]) + assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.domains.with_streaming_response.get( @@ -111,11 +102,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(Domain, domain, path=["response"]) + assert_matches_type(Optional[Domain], domain, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/test_indicator_feeds.py b/tests/api_resources/intel/test_indicator_feeds.py index 11ae20c41d6..e0c1a3dea7a 100644 --- a/tests/api_resources/intel/test_indicator_feeds.py +++ b/tests/api_resources/intel/test_indicator_feeds.py @@ -3,17 +3,19 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.intel.indicator_feed_get_response import IndicatorFeedGetResponse -from cloudflare.types.intel.indicator_feed_list_response import IndicatorFeedListResponse -from cloudflare.types.intel.indicator_feed_create_response import IndicatorFeedCreateResponse -from cloudflare.types.intel.indicator_feed_update_response import IndicatorFeedUpdateResponse +from cloudflare.types.intel import ( + IndicatorFeedGetResponse, + IndicatorFeedListResponse, + IndicatorFeedCreateResponse, + IndicatorFeedUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,15 +23,13 @@ class TestIndicatorFeeds: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedCreateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.create( @@ -37,9 +37,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: description="example feed description", name="example_feed_1", ) - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedCreateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.create( @@ -49,9 +48,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedCreateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.create( @@ -61,11 +59,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedCreateResponse], indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,26 +70,25 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.update( 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.update( 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", - source="@/Users/me/test.stix2", + feed_description="This is an example description", + is_attributable=True, + is_public=True, ) - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.update( @@ -103,9 +99,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.update( @@ -116,11 +111,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -129,7 +123,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.list( @@ -137,7 +130,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.list( @@ -149,7 +141,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: indicator_feed = response.parse() assert_matches_type(SyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.list( @@ -163,7 +154,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -171,7 +161,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_data(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.data( @@ -180,7 +169,6 @@ def test_method_data(self, client: Cloudflare) -> None: ) assert_matches_type(str, indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_data(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.data( @@ -193,7 +181,6 @@ def test_raw_response_data(self, client: Cloudflare) -> None: indicator_feed = response.parse() assert_matches_type(str, indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_data(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.data( @@ -208,7 +195,6 @@ def test_streaming_response_data(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_data(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -217,16 +203,14 @@ def test_path_params_data(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.get( 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.get( @@ -237,9 +221,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.get( @@ -250,11 +233,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -267,15 +249,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIndicatorFeeds: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedCreateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.create( @@ -283,9 +263,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare description="example feed description", name="example_feed_1", ) - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedCreateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.create( @@ -295,9 +274,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedCreateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.create( @@ -307,11 +285,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedCreateResponse], indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -319,26 +296,25 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.update( 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.update( 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", - source="@/Users/me/test.stix2", + feed_description="This is an example description", + is_attributable=True, + is_public=True, ) - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.update( @@ -349,9 +325,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.update( @@ -362,11 +337,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -375,7 +349,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.list( @@ -383,7 +356,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.list( @@ -395,7 +367,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: indicator_feed = await response.parse() assert_matches_type(AsyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.list( @@ -409,7 +380,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -417,7 +387,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_data(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.data( @@ -426,7 +395,6 @@ async def test_method_data(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_data(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.data( @@ -439,7 +407,6 @@ async def test_raw_response_data(self, async_client: AsyncCloudflare) -> None: indicator_feed = await response.parse() assert_matches_type(str, indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_data(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.data( @@ -454,7 +421,6 @@ async def test_streaming_response_data(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_data(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -463,16 +429,14 @@ async def test_path_params_data(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.get( 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.get( @@ -483,9 +447,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.get( @@ -496,11 +459,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/test_ip_lists.py b/tests/api_resources/intel/test_ip_lists.py index a65b25a285a..afb47b13e8c 100644 --- a/tests/api_resources/intel/test_ip_lists.py +++ b/tests/api_resources/intel/test_ip_lists.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.ip_list_get_response import IPListGetResponse +from cloudflare.types.intel import IPListGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestIPLists: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ip_list = client.intel.ip_lists.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IPListGetResponse], ip_list, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.ip_lists.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ip_list = response.parse() assert_matches_type(Optional[IPListGetResponse], ip_list, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.ip_lists.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPLists: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip_list = await async_client.intel.ip_lists.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IPListGetResponse], ip_list, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.ip_lists.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ip_list = await response.parse() assert_matches_type(Optional[IPListGetResponse], ip_list, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.ip_lists.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/test_ips.py b/tests/api_resources/intel/test_ips.py index 4abc4a1db52..56721abdf3a 100644 --- a/tests/api_resources/intel/test_ips.py +++ b/tests/api_resources/intel/test_ips.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.ip_get_response import IPGetResponse +from cloudflare.types.intel import IPGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestIPs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ip = client.intel.ips.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip = client.intel.ips.get( @@ -35,7 +33,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.ips.with_raw_response.get( @@ -47,7 +44,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ip = response.parse() assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.ips.with_streaming_response.get( @@ -61,7 +57,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +68,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip = await async_client.intel.ips.get( @@ -81,7 +75,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip = await async_client.intel.ips.get( @@ -91,7 +84,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.ips.with_raw_response.get( @@ -103,7 +95,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ip = await response.parse() assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.ips.with_streaming_response.get( @@ -117,7 +108,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/test_miscategorizations.py b/tests/api_resources/intel/test_miscategorizations.py index 8e769f28565..9f3f59fae1d 100644 --- a/tests/api_resources/intel/test_miscategorizations.py +++ b/tests/api_resources/intel/test_miscategorizations.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.miscategorization_create_response import MiscategorizationCreateResponse +from cloudflare.types.intel import MiscategorizationCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,15 +17,13 @@ class TestMiscategorizations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: miscategorization = client.intel.miscategorizations.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MiscategorizationCreateResponse, miscategorization, path=["response"]) + assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: miscategorization = client.intel.miscategorizations.create( @@ -38,9 +36,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: security_removes=[83], url="string", ) - assert_matches_type(MiscategorizationCreateResponse, miscategorization, path=["response"]) + assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.intel.miscategorizations.with_raw_response.create( @@ -50,9 +47,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" miscategorization = response.parse() - assert_matches_type(MiscategorizationCreateResponse, miscategorization, path=["response"]) + assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.intel.miscategorizations.with_streaming_response.create( @@ -62,11 +58,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" miscategorization = response.parse() - assert_matches_type(MiscategorizationCreateResponse, miscategorization, path=["response"]) + assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -78,15 +73,13 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncMiscategorizations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: miscategorization = await async_client.intel.miscategorizations.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MiscategorizationCreateResponse, miscategorization, path=["response"]) + assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: miscategorization = await async_client.intel.miscategorizations.create( @@ -99,9 +92,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare security_removes=[83], url="string", ) - assert_matches_type(MiscategorizationCreateResponse, miscategorization, path=["response"]) + assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.miscategorizations.with_raw_response.create( @@ -111,9 +103,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" miscategorization = await response.parse() - assert_matches_type(MiscategorizationCreateResponse, miscategorization, path=["response"]) + assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.miscategorizations.with_streaming_response.create( @@ -123,11 +114,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" miscategorization = await response.parse() - assert_matches_type(MiscategorizationCreateResponse, miscategorization, path=["response"]) + assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/test_sinkholes.py b/tests/api_resources/intel/test_sinkholes.py index e9086908383..5e9b3dda069 100644 --- a/tests/api_resources/intel/test_sinkholes.py +++ b/tests/api_resources/intel/test_sinkholes.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.intel.sinkhole import Sinkhole +from cloudflare.types.intel import Sinkhole base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestSinkholes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: sinkhole = client.intel.sinkholes.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Sinkhole], sinkhole, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.intel.sinkholes.with_raw_response.list( @@ -38,7 +36,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: sinkhole = response.parse() assert_matches_type(SyncSinglePage[Sinkhole], sinkhole, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.intel.sinkholes.with_streaming_response.list( @@ -52,7 +49,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +60,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSinkholes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: sinkhole = await async_client.intel.sinkholes.list( @@ -72,7 +67,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Sinkhole], sinkhole, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.sinkholes.with_raw_response.list( @@ -84,7 +78,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: sinkhole = await response.parse() assert_matches_type(AsyncSinglePage[Sinkhole], sinkhole, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.sinkholes.with_streaming_response.list( @@ -98,7 +91,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/intel/test_whois.py b/tests/api_resources/intel/test_whois.py index 00343224cdb..c8f0f4035df 100644 --- a/tests/api_resources/intel/test_whois.py +++ b/tests/api_resources/intel/test_whois.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel.whois import Whois +from cloudflare.types.intel import WhoisGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,24 +17,21 @@ class TestWhois: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: whois = client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Whois, whois, path=["response"]) + assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: whois = client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="string", ) - assert_matches_type(Whois, whois, path=["response"]) + assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.whois.with_raw_response.get( @@ -44,9 +41,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" whois = response.parse() - assert_matches_type(Whois, whois, path=["response"]) + assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.whois.with_streaming_response.get( @@ -56,11 +52,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" whois = response.parse() - assert_matches_type(Whois, whois, path=["response"]) + assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -72,24 +67,21 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWhois: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: whois = await async_client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Whois, whois, path=["response"]) + assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: whois = await async_client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="string", ) - assert_matches_type(Whois, whois, path=["response"]) + assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.whois.with_raw_response.get( @@ -99,9 +91,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" whois = await response.parse() - assert_matches_type(Whois, whois, path=["response"]) + assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.whois.with_streaming_response.get( @@ -111,11 +102,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" whois = await response.parse() - assert_matches_type(Whois, whois, path=["response"]) + assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/kv/namespaces/test_bulk.py b/tests/api_resources/kv/namespaces/test_bulk.py index 9732acf1d42..c941e118037 100644 --- a/tests/api_resources/kv/namespaces/test_bulk.py +++ b/tests/api_resources/kv/namespaces/test_bulk.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.kv.namespaces.bulk_delete_response import BulkDeleteResponse -from cloudflare.types.kv.namespaces.bulk_update_response import BulkUpdateResponse +from cloudflare.types.kv.namespaces import BulkDeleteResponse, BulkUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestBulk: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: bulk = client.kv.namespaces.bulk.update( @@ -28,7 +26,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(BulkUpdateResponse, bulk, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.bulk.with_raw_response.update( @@ -42,7 +39,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: bulk = response.parse() assert_matches_type(BulkUpdateResponse, bulk, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.kv.namespaces.bulk.with_streaming_response.update( @@ -58,7 +54,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -75,23 +70,19 @@ def test_path_params_update(self, client: Cloudflare) -> None: body=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: bulk = client.kv.namespaces.bulk.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=["My-Key", "My-Key", "My-Key"], ) assert_matches_type(BulkDeleteResponse, bulk, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.kv.namespaces.bulk.with_raw_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=["My-Key", "My-Key", "My-Key"], ) assert response.is_closed is True @@ -99,13 +90,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: bulk = response.parse() assert_matches_type(BulkDeleteResponse, bulk, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.kv.namespaces.bulk.with_streaming_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=["My-Key", "My-Key", "My-Key"], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -115,28 +104,24 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.bulk.with_raw_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="", - body=["My-Key", "My-Key", "My-Key"], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.bulk.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=["My-Key", "My-Key", "My-Key"], ) class TestAsyncBulk: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: bulk = await async_client.kv.namespaces.bulk.update( @@ -146,7 +131,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(BulkUpdateResponse, bulk, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.bulk.with_raw_response.update( @@ -160,7 +144,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: bulk = await response.parse() assert_matches_type(BulkUpdateResponse, bulk, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.bulk.with_streaming_response.update( @@ -176,7 +159,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -193,23 +175,19 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: bulk = await async_client.kv.namespaces.bulk.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=["My-Key", "My-Key", "My-Key"], ) assert_matches_type(BulkDeleteResponse, bulk, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.bulk.with_raw_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=["My-Key", "My-Key", "My-Key"], ) assert response.is_closed is True @@ -217,13 +195,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: bulk = await response.parse() assert_matches_type(BulkDeleteResponse, bulk, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.bulk.with_streaming_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=["My-Key", "My-Key", "My-Key"], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -233,19 +209,16 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.bulk.with_raw_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="", - body=["My-Key", "My-Key", "My-Key"], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.bulk.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=["My-Key", "My-Key", "My-Key"], ) diff --git a/tests/api_resources/kv/namespaces/test_keys.py b/tests/api_resources/kv/namespaces/test_keys.py index e7fcfee6fb5..26c09a1f9b5 100644 --- a/tests/api_resources/kv/namespaces/test_keys.py +++ b/tests/api_resources/kv/namespaces/test_keys.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncCursorLimitPagination, AsyncCursorLimitPagination -from cloudflare.types.kv.namespaces.key import Key +from cloudflare.types.kv.namespaces import Key base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestKeys: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: key = client.kv.namespaces.keys.list( @@ -27,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncCursorLimitPagination[Key], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: key = client.kv.namespaces.keys.list( @@ -39,7 +37,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncCursorLimitPagination[Key], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.kv.namespaces.keys.with_raw_response.list( @@ -52,7 +49,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(SyncCursorLimitPagination[Key], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.kv.namespaces.keys.with_streaming_response.list( @@ -67,7 +63,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -86,7 +81,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncKeys: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: key = await async_client.kv.namespaces.keys.list( @@ -95,7 +89,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncCursorLimitPagination[Key], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: key = await async_client.kv.namespaces.keys.list( @@ -107,7 +100,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncCursorLimitPagination[Key], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.keys.with_raw_response.list( @@ -120,7 +112,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(AsyncCursorLimitPagination[Key], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.keys.with_streaming_response.list( @@ -135,7 +126,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/kv/namespaces/test_metadata.py b/tests/api_resources/kv/namespaces/test_metadata.py index f7fbd01bdd5..e7f40bbb7bd 100644 --- a/tests/api_resources/kv/namespaces/test_metadata.py +++ b/tests/api_resources/kv/namespaces/test_metadata.py @@ -16,7 +16,6 @@ class TestMetadata: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: metadata = client.kv.namespaces.metadata.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(object, metadata, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.kv.namespaces.metadata.with_raw_response.get( @@ -40,7 +38,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: metadata = response.parse() assert_matches_type(object, metadata, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.kv.namespaces.metadata.with_streaming_response.get( @@ -56,7 +53,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -84,7 +80,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMetadata: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: metadata = await async_client.kv.namespaces.metadata.get( @@ -94,7 +89,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(object, metadata, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.metadata.with_raw_response.get( @@ -108,7 +102,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: metadata = await response.parse() assert_matches_type(object, metadata, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.metadata.with_streaming_response.get( @@ -124,7 +117,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/kv/namespaces/test_values.py b/tests/api_resources/kv/namespaces/test_values.py index d6800fec3f8..af7e9da5b3b 100644 --- a/tests/api_resources/kv/namespaces/test_values.py +++ b/tests/api_resources/kv/namespaces/test_values.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.kv.namespaces.value_delete_response import ValueDeleteResponse -from cloudflare.types.kv.namespaces.value_update_response import ValueUpdateResponse +from cloudflare.types.kv.namespaces import ( + ValueDeleteResponse, + ValueUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,7 @@ class TestValues: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: value = client.kv.namespaces.values.update( @@ -30,7 +32,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(ValueUpdateResponse, value, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.values.with_raw_response.update( @@ -46,7 +48,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: value = response.parse() assert_matches_type(ValueUpdateResponse, value, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.kv.namespaces.values.with_streaming_response.update( @@ -64,7 +66,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -94,25 +96,21 @@ def test_path_params_update(self, client: Cloudflare) -> None: value="Some Value", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: value = client.kv.namespaces.values.delete( "My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) assert_matches_type(ValueDeleteResponse, value, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.kv.namespaces.values.with_raw_response.delete( "My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) assert response.is_closed is True @@ -120,14 +118,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: value = response.parse() assert_matches_type(ValueDeleteResponse, value, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.kv.namespaces.values.with_streaming_response.delete( "My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -137,7 +133,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -145,7 +140,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): @@ -153,7 +147,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): @@ -161,10 +154,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: value = client.kv.namespaces.values.get( @@ -174,7 +165,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(str, value, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.kv.namespaces.values.with_raw_response.get( @@ -188,7 +178,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: value = response.parse() assert_matches_type(str, value, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.kv.namespaces.values.with_streaming_response.get( @@ -204,7 +193,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -232,7 +220,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncValues: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: value = await async_client.kv.namespaces.values.update( @@ -244,7 +232,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ValueUpdateResponse, value, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.values.with_raw_response.update( @@ -260,7 +248,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: value = await response.parse() assert_matches_type(ValueUpdateResponse, value, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.values.with_streaming_response.update( @@ -278,7 +266,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -308,25 +296,21 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: value="Some Value", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: value = await async_client.kv.namespaces.values.delete( "My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) assert_matches_type(ValueDeleteResponse, value, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.values.with_raw_response.delete( "My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) assert response.is_closed is True @@ -334,14 +318,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: value = await response.parse() assert_matches_type(ValueDeleteResponse, value, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.values.with_streaming_response.delete( "My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -351,7 +333,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -359,7 +340,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): @@ -367,7 +347,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): @@ -375,10 +354,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: value = await async_client.kv.namespaces.values.get( @@ -388,7 +365,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, value, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.values.with_raw_response.get( @@ -402,7 +378,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: value = await response.parse() assert_matches_type(str, value, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.values.with_streaming_response.get( @@ -418,7 +393,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/kv/test_namespaces.py b/tests/api_resources/kv/test_namespaces.py index 8ef7b4acd76..aca5a2593f2 100644 --- a/tests/api_resources/kv/test_namespaces.py +++ b/tests/api_resources/kv/test_namespaces.py @@ -9,10 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types.kv import ( + Namespace, + NamespaceDeleteResponse, + NamespaceUpdateResponse, +) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.kv.namespace import Namespace -from cloudflare.types.kv.namespace_delete_response import NamespaceDeleteResponse -from cloudflare.types.kv.namespace_update_response import NamespaceUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestNamespaces: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Namespace, namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.create( @@ -42,7 +42,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: namespace = response.parse() assert_matches_type(Namespace, namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.create( @@ -57,7 +56,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -66,7 +64,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: title="My Own Namespace", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.update( @@ -76,7 +73,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(NamespaceUpdateResponse, namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.update( @@ -90,7 +86,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: namespace = response.parse() assert_matches_type(NamespaceUpdateResponse, namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.update( @@ -106,7 +101,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -123,7 +117,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: title="My Own Namespace", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.list( @@ -131,7 +124,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.list( @@ -143,7 +135,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.list( @@ -155,7 +146,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: namespace = response.parse() assert_matches_type(SyncV4PagePaginationArray[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.list( @@ -169,7 +159,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -177,23 +166,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(NamespaceDeleteResponse, namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -201,13 +186,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: namespace = response.parse() assert_matches_type(NamespaceDeleteResponse, namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,28 +200,24 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.with_raw_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) class TestAsyncNamespaces: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.create( @@ -247,7 +226,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Namespace, namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.create( @@ -260,7 +238,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: namespace = await response.parse() assert_matches_type(Namespace, namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.with_streaming_response.create( @@ -275,7 +252,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -284,7 +260,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: title="My Own Namespace", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.update( @@ -294,7 +269,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(NamespaceUpdateResponse, namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.update( @@ -308,7 +282,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: namespace = await response.parse() assert_matches_type(NamespaceUpdateResponse, namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.with_streaming_response.update( @@ -324,7 +297,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -341,7 +313,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: title="My Own Namespace", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.list( @@ -349,7 +320,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.list( @@ -361,7 +331,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.list( @@ -373,7 +342,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: namespace = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Namespace], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.with_streaming_response.list( @@ -387,7 +355,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -395,23 +362,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(NamespaceDeleteResponse, namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -419,13 +382,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: namespace = await response.parse() assert_matches_type(NamespaceDeleteResponse, namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.with_streaming_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -435,19 +396,16 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.with_raw_response.delete( "0f2ac74b498b48028cb68387c421e279", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) diff --git a/tests/api_resources/load_balancers/monitors/test_previews.py b/tests/api_resources/load_balancers/monitors/test_previews.py index 3a5e48aedad..71a61ec7d40 100644 --- a/tests/api_resources/load_balancers/monitors/test_previews.py +++ b/tests/api_resources/load_balancers/monitors/test_previews.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.load_balancers.monitors.preview_create_response import PreviewCreateResponse +from cloudflare.types.load_balancers.monitors import PreviewCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestPreviews: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: preview = client.load_balancers.monitors.previews.create( @@ -27,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(PreviewCreateResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: preview = client.load_balancers.monitors.previews.create( @@ -55,7 +53,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PreviewCreateResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.previews.with_raw_response.create( @@ -69,7 +66,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: preview = response.parse() assert_matches_type(PreviewCreateResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.monitors.previews.with_streaming_response.create( @@ -85,7 +81,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -106,7 +101,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncPreviews: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.monitors.previews.create( @@ -116,7 +110,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PreviewCreateResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.monitors.previews.create( @@ -144,7 +137,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(PreviewCreateResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.previews.with_raw_response.create( @@ -158,7 +150,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: preview = await response.parse() assert_matches_type(PreviewCreateResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.previews.with_streaming_response.create( @@ -174,7 +165,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/load_balancers/monitors/test_references.py b/tests/api_resources/load_balancers/monitors/test_references.py index ceeaa7015c9..a31063f687e 100644 --- a/tests/api_resources/load_balancers/monitors/test_references.py +++ b/tests/api_resources/load_balancers/monitors/test_references.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.load_balancers.monitors.reference_get_response import ReferenceGetResponse +from cloudflare.types.load_balancers.monitors import ReferenceGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestReferences: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: reference = client.load_balancers.monitors.references.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.references.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: reference = response.parse() assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.monitors.references.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReferences: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: reference = await async_client.load_balancers.monitors.references.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.references.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: reference = await response.parse() assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.references.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/load_balancers/pools/test_health.py b/tests/api_resources/load_balancers/pools/test_health.py index b10caa8c54c..6c9b62dcdea 100644 --- a/tests/api_resources/load_balancers/pools/test_health.py +++ b/tests/api_resources/load_balancers/pools/test_health.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.load_balancers.pools.health_get_response import HealthGetResponse -from cloudflare.types.load_balancers.pools.health_create_response import HealthCreateResponse +from cloudflare.types.load_balancers.pools import HealthGetResponse, HealthCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestHealth: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.create( @@ -28,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(HealthCreateResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.create( @@ -56,7 +53,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(HealthCreateResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.pools.health.with_raw_response.create( @@ -70,7 +66,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: health = response.parse() assert_matches_type(HealthCreateResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.pools.health.with_streaming_response.create( @@ -86,7 +81,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -103,7 +97,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: expected_codes="2xx", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.get( @@ -112,7 +105,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(HealthGetResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.pools.health.with_raw_response.get( @@ -125,7 +117,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: health = response.parse() assert_matches_type(HealthGetResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.pools.health.with_streaming_response.get( @@ -140,7 +131,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -159,7 +149,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHealth: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.create( @@ -169,7 +158,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(HealthCreateResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.create( @@ -197,7 +185,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(HealthCreateResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.health.with_raw_response.create( @@ -211,7 +198,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: health = await response.parse() assert_matches_type(HealthCreateResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.health.with_streaming_response.create( @@ -227,7 +213,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -244,7 +229,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: expected_codes="2xx", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.get( @@ -253,7 +237,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(HealthGetResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.health.with_raw_response.get( @@ -266,7 +249,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: health = await response.parse() assert_matches_type(HealthGetResponse, health, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.health.with_streaming_response.get( @@ -281,7 +263,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/load_balancers/pools/test_references.py b/tests/api_resources/load_balancers/pools/test_references.py index c45476633ba..409be7228ac 100644 --- a/tests/api_resources/load_balancers/pools/test_references.py +++ b/tests/api_resources/load_balancers/pools/test_references.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.load_balancers.pools.reference_get_response import ReferenceGetResponse +from cloudflare.types.load_balancers.pools import ReferenceGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestReferences: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: reference = client.load_balancers.pools.references.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.pools.references.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: reference = response.parse() assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.pools.references.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReferences: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: reference = await async_client.load_balancers.pools.references.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.references.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: reference = await response.parse() assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.references.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/load_balancers/test_monitors.py b/tests/api_resources/load_balancers/test_monitors.py index 946c94fbb58..aec60b132cd 100644 --- a/tests/api_resources/load_balancers/test_monitors.py +++ b/tests/api_resources/load_balancers/test_monitors.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.load_balancers.monitor import Monitor -from cloudflare.types.load_balancers.monitor_delete_response import MonitorDeleteResponse +from cloudflare.types.load_balancers import ( + Monitor, + MonitorDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestMonitors: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.create( @@ -28,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.create( @@ -55,7 +55,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.create( @@ -68,7 +67,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: monitor = response.parse() assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.create( @@ -83,7 +81,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -92,7 +89,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: expected_codes="2xx", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.update( @@ -102,7 +98,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.update( @@ -130,7 +125,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.update( @@ -144,7 +138,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: monitor = response.parse() assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.update( @@ -160,7 +153,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -177,7 +169,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: expected_codes="2xx", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.list( @@ -185,7 +176,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Monitor], monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.list( @@ -197,7 +187,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: monitor = response.parse() assert_matches_type(SyncSinglePage[Monitor], monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.list( @@ -211,7 +200,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -219,23 +207,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.delete( "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(MonitorDeleteResponse, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.delete( "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -243,13 +227,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: monitor = response.parse() assert_matches_type(MonitorDeleteResponse, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.delete( "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -259,24 +241,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.monitors.with_raw_response.delete( "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.edit( @@ -286,7 +264,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.edit( @@ -314,7 +291,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.edit( @@ -328,7 +304,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: monitor = response.parse() assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.edit( @@ -344,7 +319,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -361,7 +335,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: expected_codes="2xx", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.get( @@ -370,7 +343,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.get( @@ -383,7 +355,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: monitor = response.parse() assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.get( @@ -398,7 +369,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -417,7 +387,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMonitors: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.create( @@ -426,7 +395,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.create( @@ -453,7 +421,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.create( @@ -466,7 +433,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: monitor = await response.parse() assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.create( @@ -481,7 +447,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -490,7 +455,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: expected_codes="2xx", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.update( @@ -500,7 +464,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.update( @@ -528,7 +491,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.update( @@ -542,7 +504,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: monitor = await response.parse() assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.update( @@ -558,7 +519,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -575,7 +535,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: expected_codes="2xx", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.list( @@ -583,7 +542,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Monitor], monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.list( @@ -595,7 +553,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: monitor = await response.parse() assert_matches_type(AsyncSinglePage[Monitor], monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.list( @@ -609,7 +566,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -617,23 +573,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.delete( "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(MonitorDeleteResponse, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.delete( "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -641,13 +593,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: monitor = await response.parse() assert_matches_type(MonitorDeleteResponse, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.delete( "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -657,24 +607,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.delete( "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.edit( @@ -684,7 +630,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.edit( @@ -712,7 +657,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.edit( @@ -726,7 +670,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: monitor = await response.parse() assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.edit( @@ -742,7 +685,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -759,7 +701,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: expected_codes="2xx", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.get( @@ -768,7 +709,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.get( @@ -781,7 +721,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: monitor = await response.parse() assert_matches_type(Monitor, monitor, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.get( @@ -796,7 +735,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/load_balancers/test_pools.py b/tests/api_resources/load_balancers/test_pools.py index b0a3a6e5c88..e128a3f2287 100644 --- a/tests/api_resources/load_balancers/test_pools.py +++ b/tests/api_resources/load_balancers/test_pools.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.load_balancers.pool import Pool -from cloudflare.types.load_balancers.pool_delete_response import PoolDeleteResponse +from cloudflare.types.load_balancers import ( + Pool, + PoolDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestPools: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.create( @@ -88,7 +88,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.create( @@ -102,7 +101,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: pool = response.parse() assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.create( @@ -118,7 +116,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -128,7 +125,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: origins=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.update( @@ -139,7 +135,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.update( @@ -200,7 +195,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.update( @@ -215,7 +209,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: pool = response.parse() assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.update( @@ -232,7 +225,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -251,7 +243,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: origins=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.list( @@ -259,7 +250,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Pool], pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.list( @@ -268,7 +258,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Pool], pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.list( @@ -280,7 +269,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: pool = response.parse() assert_matches_type(SyncSinglePage[Pool], pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.list( @@ -294,7 +282,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -302,23 +289,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.delete( "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(PoolDeleteResponse, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.delete( "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -326,13 +309,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: pool = response.parse() assert_matches_type(PoolDeleteResponse, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.delete( "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -342,24 +323,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.pools.with_raw_response.delete( "17b5962d775c646f3f9725cbc7a53df4", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.edit( @@ -368,7 +345,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.edit( @@ -429,7 +405,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.edit( @@ -442,7 +417,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: pool = response.parse() assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.edit( @@ -457,7 +431,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -472,7 +445,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.get( @@ -481,7 +453,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.get( @@ -494,7 +465,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: pool = response.parse() assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.get( @@ -509,7 +479,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -528,7 +497,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPools: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.create( @@ -538,7 +506,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.create( @@ -597,7 +564,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.create( @@ -611,7 +577,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: pool = await response.parse() assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.create( @@ -627,7 +592,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -637,7 +601,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: origins=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.update( @@ -648,7 +611,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.update( @@ -709,7 +671,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.update( @@ -724,7 +685,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: pool = await response.parse() assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.update( @@ -741,7 +701,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -760,7 +719,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origins=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.list( @@ -768,7 +726,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Pool], pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.list( @@ -777,7 +734,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[Pool], pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.list( @@ -789,7 +745,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: pool = await response.parse() assert_matches_type(AsyncSinglePage[Pool], pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.list( @@ -803,7 +758,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -811,23 +765,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.delete( "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(PoolDeleteResponse, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.delete( "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -835,13 +785,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: pool = await response.parse() assert_matches_type(PoolDeleteResponse, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.delete( "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -851,24 +799,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.delete( "17b5962d775c646f3f9725cbc7a53df4", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.edit( @@ -877,7 +821,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.edit( @@ -938,7 +881,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.edit( @@ -951,7 +893,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: pool = await response.parse() assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.edit( @@ -966,7 +907,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -981,7 +921,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.get( @@ -990,7 +929,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.get( @@ -1003,7 +941,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: pool = await response.parse() assert_matches_type(Pool, pool, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.get( @@ -1018,7 +955,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/load_balancers/test_previews.py b/tests/api_resources/load_balancers/test_previews.py index 7be32ceecb9..62da37e0c52 100644 --- a/tests/api_resources/load_balancers/test_previews.py +++ b/tests/api_resources/load_balancers/test_previews.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.load_balancers.preview_get_response import PreviewGetResponse +from cloudflare.types.load_balancers import PreviewGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestPreviews: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: preview = client.load_balancers.previews.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(PreviewGetResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.previews.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: preview = response.parse() assert_matches_type(PreviewGetResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.previews.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPreviews: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.previews.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PreviewGetResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.previews.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: preview = await response.parse() assert_matches_type(PreviewGetResponse, preview, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.previews.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/load_balancers/test_regions.py b/tests/api_resources/load_balancers/test_regions.py index 55063ddc005..34d882330a0 100644 --- a/tests/api_resources/load_balancers/test_regions.py +++ b/tests/api_resources/load_balancers/test_regions.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.load_balancers.region_get_response import RegionGetResponse -from cloudflare.types.load_balancers.region_list_response import RegionListResponse +from cloudflare.types.load_balancers import RegionGetResponse, RegionListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestRegions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: region = client.load_balancers.regions.list( @@ -26,7 +24,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(RegionListResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: region = client.load_balancers.regions.list( @@ -37,7 +34,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RegionListResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.load_balancers.regions.with_raw_response.list( @@ -49,7 +45,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: region = response.parse() assert_matches_type(RegionListResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.load_balancers.regions.with_streaming_response.list( @@ -63,7 +58,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -71,7 +65,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: region = client.load_balancers.regions.get( @@ -80,7 +73,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(RegionGetResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.regions.with_raw_response.get( @@ -93,7 +85,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: region = response.parse() assert_matches_type(RegionGetResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.regions.with_streaming_response.get( @@ -108,7 +99,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -121,7 +111,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRegions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: region = await async_client.load_balancers.regions.list( @@ -129,7 +118,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RegionListResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: region = await async_client.load_balancers.regions.list( @@ -140,7 +128,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(RegionListResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.regions.with_raw_response.list( @@ -152,7 +139,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: region = await response.parse() assert_matches_type(RegionListResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.regions.with_streaming_response.list( @@ -166,7 +152,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -174,7 +159,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: region = await async_client.load_balancers.regions.get( @@ -183,7 +167,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RegionGetResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.regions.with_raw_response.get( @@ -196,7 +179,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: region = await response.parse() assert_matches_type(RegionGetResponse, region, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.regions.with_streaming_response.get( @@ -211,7 +193,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/load_balancers/test_searches.py b/tests/api_resources/load_balancers/test_searches.py index 6ab871c3021..26259459464 100644 --- a/tests/api_resources/load_balancers/test_searches.py +++ b/tests/api_resources/load_balancers/test_searches.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.load_balancers.search_get_response import SearchGetResponse +from cloudflare.types.load_balancers import SearchGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,7 @@ class TestSearches: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: search = client.load_balancers.searches.get( @@ -25,7 +25,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SearchGetResponse], search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: search = client.load_balancers.searches.get( @@ -39,7 +39,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SearchGetResponse], search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.searches.with_raw_response.get( @@ -51,7 +51,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: search = response.parse() assert_matches_type(Optional[SearchGetResponse], search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.searches.with_streaming_response.get( @@ -65,7 +65,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -77,7 +77,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSearches: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: search = await async_client.load_balancers.searches.get( @@ -85,7 +85,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SearchGetResponse], search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: search = await async_client.load_balancers.searches.get( @@ -99,7 +99,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[SearchGetResponse], search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.searches.with_raw_response.get( @@ -111,7 +111,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: search = await response.parse() assert_matches_type(Optional[SearchGetResponse], search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.searches.with_streaming_response.get( @@ -125,7 +125,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/logpush/datasets/test_fields.py b/tests/api_resources/logpush/datasets/test_fields.py index cd6ac1cc813..fb994642e7b 100644 --- a/tests/api_resources/logpush/datasets/test_fields.py +++ b/tests/api_resources/logpush/datasets/test_fields.py @@ -16,33 +16,30 @@ class TestFields: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: field = client.logpush.datasets.fields.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(object, field, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: field = client.logpush.datasets.fields.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(object, field, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.datasets.fields.with_raw_response.get( "http_requests", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -50,13 +47,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: field = response.parse() assert_matches_type(object, field, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.datasets.fields.with_streaming_response.get( "http_requests", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,61 +62,55 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.logpush.datasets.fields.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.datasets.fields.with_raw_response.get( "http_requests", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.datasets.fields.with_raw_response.get( "http_requests", account_id="string", - zone_id="", ) class TestAsyncFields: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: field = await async_client.logpush.datasets.fields.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(object, field, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: field = await async_client.logpush.datasets.fields.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(object, field, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.datasets.fields.with_raw_response.get( "http_requests", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -128,13 +118,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: field = await response.parse() assert_matches_type(object, field, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.datasets.fields.with_streaming_response.get( "http_requests", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -144,26 +133,23 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.logpush.datasets.fields.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.datasets.fields.with_raw_response.get( "http_requests", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.datasets.fields.with_raw_response.get( "http_requests", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/logpush/datasets/test_jobs.py b/tests/api_resources/logpush/datasets/test_jobs.py index e65ea0b6394..7176ea97c6f 100644 --- a/tests/api_resources/logpush/datasets/test_jobs.py +++ b/tests/api_resources/logpush/datasets/test_jobs.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logpush.datasets.job_get_response import JobGetResponse +from cloudflare.types.logpush.datasets import JobGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,33 +17,30 @@ class TestJobs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: job = client.logpush.datasets.jobs.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.datasets.jobs.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.datasets.jobs.with_raw_response.get( "http_requests", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -51,13 +48,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: job = response.parse() assert_matches_type(Optional[JobGetResponse], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.datasets.jobs.with_streaming_response.get( "http_requests", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,61 +63,55 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.logpush.datasets.jobs.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.datasets.jobs.with_raw_response.get( "http_requests", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.datasets.jobs.with_raw_response.get( "http_requests", account_id="string", - zone_id="", ) class TestAsyncJobs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.datasets.jobs.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.datasets.jobs.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.datasets.jobs.with_raw_response.get( "http_requests", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -129,13 +119,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: job = await response.parse() assert_matches_type(Optional[JobGetResponse], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.datasets.jobs.with_streaming_response.get( "http_requests", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,26 +134,23 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.logpush.datasets.jobs.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.datasets.jobs.with_raw_response.get( "http_requests", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.datasets.jobs.with_raw_response.get( "http_requests", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/logpush/test_edge.py b/tests/api_resources/logpush/test_edge.py index a26292567a3..850a8a4cb57 100644 --- a/tests/api_resources/logpush/test_edge.py +++ b/tests/api_resources/logpush/test_edge.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logpush.edge_get_response import EdgeGetResponse -from cloudflare.types.logpush.instant_logpush_job import InstantLogpushJob +from cloudflare.types.logpush import EdgeGetResponse, InstantLogpushJob base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestEdge: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: edge = client.logpush.edge.create( @@ -26,7 +24,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: edge = client.logpush.edge.create( @@ -37,7 +34,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logpush.edge.with_raw_response.create( @@ -49,7 +45,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: edge = response.parse() assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logpush.edge.with_streaming_response.create( @@ -63,7 +58,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -71,7 +65,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: edge = client.logpush.edge.get( @@ -79,7 +72,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.edge.with_raw_response.get( @@ -91,7 +83,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: edge = response.parse() assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.edge.with_streaming_response.get( @@ -105,7 +96,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -117,7 +107,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEdge: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: edge = await async_client.logpush.edge.create( @@ -125,7 +114,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: edge = await async_client.logpush.edge.create( @@ -136,7 +124,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.edge.with_raw_response.create( @@ -148,7 +135,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: edge = await response.parse() assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.edge.with_streaming_response.create( @@ -162,7 +148,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -170,7 +155,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: edge = await async_client.logpush.edge.get( @@ -178,7 +162,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.edge.with_raw_response.get( @@ -190,7 +173,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: edge = await response.parse() assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.edge.with_streaming_response.get( @@ -204,7 +186,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index 3d243709d0e..05950cab7b9 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.logpush.logpush_job import LogpushJob +from cloudflare.types.logpush import LogpushJob base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,27 +18,29 @@ class TestJobs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: job = client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", dataset="http_requests", enabled=False, frequency="high", + kind="edge", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", + max_upload_bytes=5000000, + max_upload_interval_seconds=30, + max_upload_records=1000, name="example.com", output_options={ "cve_2021_4428": True, @@ -58,13 +60,12 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -72,13 +73,12 @@ def test_raw_response_create(self, client: Cloudflare) -> None: job = response.parse() assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -88,44 +88,44 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: job = client.logpush.jobs.update( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.update( 1, account_id="string", - zone_id="string", destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", + kind="edge", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", + max_upload_bytes=5000000, + max_upload_interval_seconds=30, + max_upload_records=1000, output_options={ "cve_2021_4428": True, "batch_prefix": "string", @@ -144,13 +144,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.update( 1, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -158,13 +157,12 @@ def test_raw_response_update(self, client: Cloudflare) -> None: job = response.parse() assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.update( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -174,47 +172,42 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.jobs.with_raw_response.update( 1, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.update( 1, account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: job = client.logpush.jobs.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -222,12 +215,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: job = response.parse() assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -237,51 +229,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.jobs.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: job = client.logpush.jobs.delete( 1, - body={}, account_id="string", - zone_id="string", ) assert_matches_type(object, job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.delete( 1, - body={}, account_id="string", - zone_id="string", ) assert_matches_type(object, job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.delete( 1, - body={}, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -289,14 +273,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: job = response.parse() assert_matches_type(object, job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.delete( 1, - body={}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -306,52 +288,45 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.jobs.with_raw_response.delete( 1, - body={}, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.delete( 1, - body={}, account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: job = client.logpush.jobs.get( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.get( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.get( 1, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -359,13 +334,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: job = response.parse() assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.get( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -375,48 +349,48 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.jobs.with_raw_response.get( 1, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.get( 1, account_id="string", - zone_id="", ) class TestAsyncJobs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", dataset="http_requests", enabled=False, frequency="high", + kind="edge", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", + max_upload_bytes=5000000, + max_upload_interval_seconds=30, + max_upload_records=1000, name="example.com", output_options={ "cve_2021_4428": True, @@ -436,13 +410,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -450,13 +423,12 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: job = await response.parse() assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -466,44 +438,44 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.update( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.update( 1, account_id="string", - zone_id="string", destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", + kind="edge", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", + max_upload_bytes=5000000, + max_upload_interval_seconds=30, + max_upload_records=1000, output_options={ "cve_2021_4428": True, "batch_prefix": "string", @@ -522,13 +494,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.update( 1, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -536,13 +507,12 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: job = await response.parse() assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.update( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -552,47 +522,42 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.jobs.with_raw_response.update( 1, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.update( 1, account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -600,12 +565,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: job = await response.parse() assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -615,51 +579,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.jobs.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.delete( 1, - body={}, account_id="string", - zone_id="string", ) assert_matches_type(object, job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.delete( 1, - body={}, account_id="string", - zone_id="string", ) assert_matches_type(object, job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.delete( 1, - body={}, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -667,14 +623,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: job = await response.parse() assert_matches_type(object, job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.delete( 1, - body={}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -684,52 +638,45 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.jobs.with_raw_response.delete( 1, - body={}, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.delete( 1, - body={}, account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.get( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.get( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.get( 1, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -737,13 +684,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: job = await response.parse() assert_matches_type(Optional[LogpushJob], job, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.get( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -753,19 +699,17 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.jobs.with_raw_response.get( 1, account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.get( 1, account_id="string", - zone_id="", ) diff --git a/tests/api_resources/logpush/test_ownership.py b/tests/api_resources/logpush/test_ownership.py index 21ff01d1960..ce1f9a83fb3 100644 --- a/tests/api_resources/logpush/test_ownership.py +++ b/tests/api_resources/logpush/test_ownership.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logpush.ownership_validation import OwnershipValidation -from cloudflare.types.logpush.ownership_create_response import OwnershipCreateResponse +from cloudflare.types.logpush import ( + OwnershipValidation, + OwnershipCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,33 +20,30 @@ class TestOwnership: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -52,13 +51,12 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ownership = response.parse() assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logpush.ownership.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,53 +66,48 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_validate(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_validate_with_all_params(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_validate(self, client: Cloudflare) -> None: response = client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -122,14 +115,13 @@ def test_raw_response_validate(self, client: Cloudflare) -> None: ownership = response.parse() assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_validate(self, client: Cloudflare) -> None: with client.logpush.ownership.with_streaming_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,7 +131,7 @@ def test_streaming_response_validate(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_validate(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -147,7 +139,6 @@ def test_path_params_validate(self, client: Cloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,40 +146,36 @@ def test_path_params_validate(self, client: Cloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="", ) class TestAsyncOwnership: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -196,13 +183,12 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ownership = await response.parse() assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.ownership.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -212,53 +198,48 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_validate(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_validate_with_all_params(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -266,14 +247,13 @@ async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> Non ownership = await response.parse() assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_validate(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.ownership.with_streaming_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -283,7 +263,7 @@ async def test_streaming_response_validate(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -291,7 +271,6 @@ async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -299,5 +278,4 @@ async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/logpush/test_validate.py b/tests/api_resources/logpush/test_validate.py index 51aad1568b6..7b80c557e5d 100644 --- a/tests/api_resources/logpush/test_validate.py +++ b/tests/api_resources/logpush/test_validate.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logpush.validate_origin_response import ValidateOriginResponse -from cloudflare.types.logpush.validate_destination_response import ValidateDestinationResponse +from cloudflare.types.logpush import ( + ValidateOriginResponse, + ValidateDestinationResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,33 +20,30 @@ class TestValidate: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_destination(self, client: Cloudflare) -> None: validate = client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_destination_with_all_params(self, client: Cloudflare) -> None: validate = client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_destination(self, client: Cloudflare) -> None: response = client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -52,13 +51,12 @@ def test_raw_response_destination(self, client: Cloudflare) -> None: validate = response.parse() assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_destination(self, client: Cloudflare) -> None: with client.logpush.validate.with_streaming_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,50 +66,45 @@ def test_streaming_response_destination(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_destination(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_origin(self, client: Cloudflare) -> None: validate = client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_origin_with_all_params(self, client: Cloudflare) -> None: validate = client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_origin(self, client: Cloudflare) -> None: response = client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -119,13 +112,12 @@ def test_raw_response_origin(self, client: Cloudflare) -> None: validate = response.parse() assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_origin(self, client: Cloudflare) -> None: with client.logpush.validate.with_streaming_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -135,54 +127,49 @@ def test_streaming_response_origin(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_origin(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="", ) class TestAsyncValidate: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_destination(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_destination_with_all_params(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_destination(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -190,13 +177,12 @@ async def test_raw_response_destination(self, async_client: AsyncCloudflare) -> validate = await response.parse() assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_destination(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.validate.with_streaming_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -206,50 +192,45 @@ async def test_streaming_response_destination(self, async_client: AsyncCloudflar assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_destination(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -257,13 +238,12 @@ async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: validate = await response.parse() assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.validate.with_streaming_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -273,19 +253,17 @@ async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_origin(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/logs/control/cmb/test_config.py b/tests/api_resources/logs/control/cmb/test_config.py index 6849b57fe85..b7240366dcd 100644 --- a/tests/api_resources/logs/control/cmb/test_config.py +++ b/tests/api_resources/logs/control/cmb/test_config.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logs.control.cmb.cmb_config import CmbConfig +from cloudflare.types.logs.control.cmb import CmbConfig base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestConfig: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: config = client.logs.control.cmb.config.create( @@ -25,7 +24,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: config = client.logs.control.cmb.config.create( @@ -34,7 +32,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logs.control.cmb.config.with_raw_response.create( @@ -46,7 +43,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logs.control.cmb.config.with_streaming_response.create( @@ -60,7 +56,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -68,21 +63,17 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: config = client.logs.control.cmb.config.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(object, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.logs.control.cmb.config.with_raw_response.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -90,12 +81,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(object, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.logs.control.cmb.config.with_streaming_response.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -105,16 +94,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logs.control.cmb.config.with_raw_response.delete( account_id="", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: config = client.logs.control.cmb.config.get( @@ -122,7 +108,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logs.control.cmb.config.with_raw_response.get( @@ -134,7 +119,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logs.control.cmb.config.with_streaming_response.get( @@ -148,7 +132,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -160,7 +143,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfig: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: config = await async_client.logs.control.cmb.config.create( @@ -168,7 +150,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: config = await async_client.logs.control.cmb.config.create( @@ -177,7 +158,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.control.cmb.config.with_raw_response.create( @@ -189,7 +169,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.control.cmb.config.with_streaming_response.create( @@ -203,7 +182,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -211,21 +189,17 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: config = await async_client.logs.control.cmb.config.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(object, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.control.cmb.config.with_raw_response.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -233,12 +207,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(object, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.control.cmb.config.with_streaming_response.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -248,16 +220,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logs.control.cmb.config.with_raw_response.delete( account_id="", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: config = await async_client.logs.control.cmb.config.get( @@ -265,7 +234,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.control.cmb.config.with_raw_response.get( @@ -277,7 +245,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Optional[CmbConfig], config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.control.cmb.config.with_streaming_response.get( @@ -291,7 +258,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/logs/control/retention/test_flag.py b/tests/api_resources/logs/control/retention/test_flag.py index d1fe897bdbc..ace95eb0dd9 100644 --- a/tests/api_resources/logs/control/retention/test_flag.py +++ b/tests/api_resources/logs/control/retention/test_flag.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logs.control.retention.flag_get_response import FlagGetResponse -from cloudflare.types.logs.control.retention.flag_create_response import FlagCreateResponse +from cloudflare.types.logs.control.retention import FlagGetResponse, FlagCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestFlag: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: flag = client.logs.control.retention.flag.create( @@ -27,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(FlagCreateResponse, flag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logs.control.retention.flag.with_raw_response.create( @@ -40,7 +37,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: flag = response.parse() assert_matches_type(FlagCreateResponse, flag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logs.control.retention.flag.with_streaming_response.create( @@ -55,7 +51,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -64,7 +59,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: flag=True, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: flag = client.logs.control.retention.flag.get( @@ -72,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(FlagGetResponse, flag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logs.control.retention.flag.with_raw_response.get( @@ -84,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: flag = response.parse() assert_matches_type(FlagGetResponse, flag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logs.control.retention.flag.with_streaming_response.get( @@ -98,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -110,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFlag: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: flag = await async_client.logs.control.retention.flag.create( @@ -119,7 +109,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(FlagCreateResponse, flag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.control.retention.flag.with_raw_response.create( @@ -132,7 +121,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: flag = await response.parse() assert_matches_type(FlagCreateResponse, flag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.control.retention.flag.with_streaming_response.create( @@ -147,7 +135,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -156,7 +143,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: flag=True, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: flag = await async_client.logs.control.retention.flag.get( @@ -164,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(FlagGetResponse, flag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.control.retention.flag.with_raw_response.get( @@ -176,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: flag = await response.parse() assert_matches_type(FlagGetResponse, flag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.control.retention.flag.with_streaming_response.get( @@ -190,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/logs/received/test_fields.py b/tests/api_resources/logs/received/test_fields.py index db946844262..67fa637d050 100644 --- a/tests/api_resources/logs/received/test_fields.py +++ b/tests/api_resources/logs/received/test_fields.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logs.received.field_get_response import FieldGetResponse +from cloudflare.types.logs.received import FieldGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestFields: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: field = client.logs.received.fields.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(FieldGetResponse, field, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logs.received.fields.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: field = response.parse() assert_matches_type(FieldGetResponse, field, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logs.received.fields.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFields: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: field = await async_client.logs.received.fields.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(FieldGetResponse, field, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.received.fields.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: field = await response.parse() assert_matches_type(FieldGetResponse, field, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.received.fields.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/logs/test_rayid.py b/tests/api_resources/logs/test_rayid.py index a52b54fc51f..5268b84e977 100644 --- a/tests/api_resources/logs/test_rayid.py +++ b/tests/api_resources/logs/test_rayid.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logs.rayid_get_response import RayIDGetResponse +from cloudflare.types.logs import RayIDGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestRayID: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: rayid = client.logs.rayid.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(RayIDGetResponse, rayid, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: rayid = client.logs.rayid.get( @@ -37,7 +35,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RayIDGetResponse, rayid, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logs.rayid.with_raw_response.get( @@ -50,7 +47,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: rayid = response.parse() assert_matches_type(RayIDGetResponse, rayid, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logs.rayid.with_streaming_response.get( @@ -65,7 +61,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -84,7 +79,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRayID: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rayid = await async_client.logs.rayid.get( @@ -93,7 +87,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RayIDGetResponse, rayid, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: rayid = await async_client.logs.rayid.get( @@ -104,7 +97,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(RayIDGetResponse, rayid, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.rayid.with_raw_response.get( @@ -117,7 +109,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: rayid = await response.parse() assert_matches_type(RayIDGetResponse, rayid, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.rayid.with_streaming_response.get( @@ -132,7 +123,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/logs/test_received.py b/tests/api_resources/logs/test_received.py index e47ab7841cb..86effb42fe4 100644 --- a/tests/api_resources/logs/test_received.py +++ b/tests/api_resources/logs/test_received.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logs.received_get_response import ReceivedGetResponse +from cloudflare.types.logs import ReceivedGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestReceived: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: received = client.logs.received.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ReceivedGetResponse, received, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: received = client.logs.received.get( @@ -40,7 +38,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ReceivedGetResponse, received, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logs.received.with_raw_response.get( @@ -53,7 +50,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: received = response.parse() assert_matches_type(ReceivedGetResponse, received, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logs.received.with_streaming_response.get( @@ -68,7 +64,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -81,7 +76,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReceived: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: received = await async_client.logs.received.get( @@ -90,7 +84,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ReceivedGetResponse, received, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: received = await async_client.logs.received.get( @@ -104,7 +97,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(ReceivedGetResponse, received, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.received.with_raw_response.get( @@ -117,7 +109,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: received = await response.parse() assert_matches_type(ReceivedGetResponse, received, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.received.with_streaming_response.get( @@ -132,7 +123,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/magic_network_monitoring/configs/test_full.py b/tests/api_resources/magic_network_monitoring/configs/test_full.py index 19edd6942e9..fa2d1efd518 100644 --- a/tests/api_resources/magic_network_monitoring/configs/test_full.py +++ b/tests/api_resources/magic_network_monitoring/configs/test_full.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring.configuration import Configuration +from cloudflare.types.magic_network_monitoring import Configuration base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestFull: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: full = client.magic_network_monitoring.configs.full.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Configuration, full, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.configs.full.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: full = response.parse() assert_matches_type(Configuration, full, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_network_monitoring.configs.full.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFull: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: full = await async_client.magic_network_monitoring.configs.full.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Configuration, full, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.configs.full.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: full = await response.parse() assert_matches_type(Configuration, full, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.configs.full.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py index ecd103ef496..6f0e476a67e 100644 --- a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py +++ b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring.rules.advertisement import Advertisement +from cloudflare.types.magic_network_monitoring.rules import Advertisement base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAdvertisements: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: advertisement = client.magic_network_monitoring.rules.advertisements.edit( @@ -27,7 +26,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Advertisement], advertisement, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( @@ -41,7 +39,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: advertisement = response.parse() assert_matches_type(Optional[Advertisement], advertisement, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.advertisements.with_streaming_response.edit( @@ -57,7 +54,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -78,7 +74,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncAdvertisements: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: advertisement = await async_client.magic_network_monitoring.rules.advertisements.edit( @@ -88,7 +83,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Advertisement], advertisement, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( @@ -102,7 +96,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: advertisement = await response.parse() assert_matches_type(Optional[Advertisement], advertisement, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.advertisements.with_streaming_response.edit( @@ -118,7 +111,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_network_monitoring/test_configs.py b/tests/api_resources/magic_network_monitoring/test_configs.py index d1354b7f9cc..8a60e5320fa 100644 --- a/tests/api_resources/magic_network_monitoring/test_configs.py +++ b/tests/api_resources/magic_network_monitoring/test_configs.py @@ -9,7 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring.configuration import Configuration +from cloudflare.types.magic_network_monitoring import ( + Configuration, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +19,6 @@ class TestConfigs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.create( @@ -26,7 +27,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.configs.with_raw_response.create( @@ -39,7 +39,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_network_monitoring.configs.with_streaming_response.create( @@ -54,7 +53,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -63,7 +61,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.update( @@ -72,7 +69,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.configs.with_raw_response.update( @@ -85,7 +81,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_network_monitoring.configs.with_streaming_response.update( @@ -100,7 +95,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -109,21 +103,17 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.delete( account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.configs.with_raw_response.delete( account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) assert response.is_closed is True @@ -131,12 +121,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_network_monitoring.configs.with_streaming_response.delete( account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -146,16 +134,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_network_monitoring.configs.with_raw_response.delete( account_id="", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.edit( @@ -164,7 +149,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.configs.with_raw_response.edit( @@ -177,7 +161,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_network_monitoring.configs.with_streaming_response.edit( @@ -192,7 +175,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -201,7 +183,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.get( @@ -209,7 +190,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.configs.with_raw_response.get( @@ -221,7 +201,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: config = response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_network_monitoring.configs.with_streaming_response.get( @@ -235,7 +214,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -247,7 +225,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.create( @@ -256,7 +233,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.configs.with_raw_response.create( @@ -269,7 +245,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.configs.with_streaming_response.create( @@ -284,7 +259,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -293,7 +267,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.update( @@ -302,7 +275,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.configs.with_raw_response.update( @@ -315,7 +287,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.configs.with_streaming_response.update( @@ -330,7 +301,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -339,21 +309,17 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.delete( account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.configs.with_raw_response.delete( account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) assert response.is_closed is True @@ -361,12 +327,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.configs.with_streaming_response.delete( account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -376,16 +340,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_network_monitoring.configs.with_raw_response.delete( account_id="", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.edit( @@ -394,7 +355,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.configs.with_raw_response.edit( @@ -407,7 +367,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.configs.with_streaming_response.edit( @@ -422,7 +381,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -431,7 +389,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.get( @@ -439,7 +396,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.configs.with_raw_response.get( @@ -451,7 +407,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: config = await response.parse() assert_matches_type(Configuration, config, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.configs.with_streaming_response.get( @@ -465,7 +420,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py index fb02399bc0c..b813da89aca 100644 --- a/tests/api_resources/magic_network_monitoring/test_rules.py +++ b/tests/api_resources/magic_network_monitoring/test_rules.py @@ -10,7 +10,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.magic_network_monitoring.magic_network_monitoring_rule import MagicNetworkMonitoringRule +from cloudflare.types.magic_network_monitoring import ( + MagicNetworkMonitoringRule, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.create( @@ -27,7 +28,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.create( @@ -40,7 +40,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.create( @@ -55,7 +54,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +62,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.update( @@ -73,7 +70,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.update( @@ -86,7 +82,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.update( @@ -101,7 +96,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -110,7 +104,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.list( @@ -118,7 +111,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.list( @@ -130,7 +122,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.list( @@ -144,7 +135,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -152,23 +142,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.delete( "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.delete( "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) assert response.is_closed is True @@ -176,13 +162,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.delete( "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -192,24 +176,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.delete( "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.delete( "", account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.edit( @@ -219,7 +199,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.edit( @@ -233,7 +212,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.edit( @@ -249,7 +227,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -266,7 +243,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.get( @@ -275,7 +251,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.get( @@ -288,7 +263,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.get( @@ -303,7 +277,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -322,7 +295,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.create( @@ -331,7 +303,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.create( @@ -344,7 +315,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.create( @@ -359,7 +329,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -368,7 +337,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.update( @@ -377,7 +345,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.update( @@ -390,7 +357,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.update( @@ -405,7 +371,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -414,7 +379,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.list( @@ -422,7 +386,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.list( @@ -434,7 +397,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.list( @@ -448,7 +410,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -456,23 +417,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.delete( "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.delete( "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) assert response.is_closed is True @@ -480,13 +437,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.delete( "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -496,24 +451,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.delete( "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.delete( "", account_id="6f91088a406011ed95aed352566e8d4c", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.edit( @@ -523,7 +474,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.edit( @@ -537,7 +487,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.edit( @@ -553,7 +502,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -570,7 +518,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.get( @@ -579,7 +526,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.get( @@ -592,7 +538,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.get( @@ -607,7 +552,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_transit/sites/test_acls.py b/tests/api_resources/magic_transit/sites/test_acls.py index 3cc7bbdf247..107cdc54368 100644 --- a/tests/api_resources/magic_transit/sites/test_acls.py +++ b/tests/api_resources/magic_transit/sites/test_acls.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.magic_transit.sites.acl import ACL +from cloudflare.types.magic_transit.sites import ACL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestACLs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.create( @@ -30,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.create( @@ -55,7 +53,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.create( @@ -71,7 +68,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.create( @@ -89,7 +85,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -110,7 +105,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="PIN Pad - Cash Register", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.update( @@ -120,7 +114,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.update( @@ -146,7 +139,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.update( @@ -160,7 +152,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.update( @@ -176,7 +167,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -200,7 +190,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: site_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.list( @@ -209,7 +198,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.list( @@ -222,7 +210,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(SyncSinglePage[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.list( @@ -237,7 +224,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -252,25 +238,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -278,14 +260,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -295,7 +275,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -303,7 +282,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): @@ -311,7 +289,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): @@ -319,10 +296,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.get( @@ -332,7 +307,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.get( @@ -346,7 +320,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.get( @@ -362,7 +335,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -390,7 +362,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncACLs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.create( @@ -402,7 +373,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.create( @@ -427,7 +397,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.create( @@ -443,7 +412,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.create( @@ -461,7 +429,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -482,7 +449,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="PIN Pad - Cash Register", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.update( @@ -492,7 +458,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.update( @@ -518,7 +483,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.update( @@ -532,7 +496,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.update( @@ -548,7 +511,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -572,7 +534,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: site_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.list( @@ -581,7 +542,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.list( @@ -594,7 +554,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(AsyncSinglePage[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.list( @@ -609,7 +568,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -624,25 +582,21 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -650,14 +604,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -667,7 +619,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -675,7 +626,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): @@ -683,7 +633,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): @@ -691,10 +640,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.get( @@ -704,7 +651,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.get( @@ -718,7 +664,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(ACL, acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.get( @@ -734,7 +679,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_transit/sites/test_lans.py b/tests/api_resources/magic_transit/sites/test_lans.py index 9ab10d2780b..a6cbd9c9307 100644 --- a/tests/api_resources/magic_transit/sites/test_lans.py +++ b/tests/api_resources/magic_transit/sites/test_lans.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.magic_transit.sites.lan import LAN -from cloudflare.types.magic_transit.sites.lan_create_response import LANCreateResponse +from cloudflare.types.magic_transit.sites import ( + LAN, + LANCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestLANs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.create( @@ -30,7 +31,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(LANCreateResponse, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.create( @@ -76,7 +76,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LANCreateResponse, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.create( @@ -91,7 +90,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: lan = response.parse() assert_matches_type(LANCreateResponse, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.create( @@ -108,7 +106,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -127,7 +124,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: vlan_tag=0, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.update( @@ -137,7 +133,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.update( @@ -183,7 +178,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.update( @@ -197,7 +191,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: lan = response.parse() assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.update( @@ -213,7 +206,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -237,7 +229,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: site_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.list( @@ -246,7 +237,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[LAN], lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.list( @@ -259,7 +249,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: lan = response.parse() assert_matches_type(SyncSinglePage[LAN], lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.list( @@ -274,7 +263,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -289,25 +277,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -315,14 +299,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: lan = response.parse() assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -332,7 +314,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -340,7 +321,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): @@ -348,7 +328,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): @@ -356,10 +335,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.get( @@ -369,7 +346,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.get( @@ -383,7 +359,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: lan = response.parse() assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.get( @@ -399,7 +374,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -427,7 +401,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLANs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.create( @@ -438,7 +411,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(LANCreateResponse, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.create( @@ -484,7 +456,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(LANCreateResponse, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.create( @@ -499,7 +470,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: lan = await response.parse() assert_matches_type(LANCreateResponse, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.create( @@ -516,7 +486,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -535,7 +504,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: vlan_tag=0, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.update( @@ -545,7 +513,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.update( @@ -591,7 +558,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.update( @@ -605,7 +571,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: lan = await response.parse() assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.update( @@ -621,7 +586,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -645,7 +609,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: site_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.list( @@ -654,7 +617,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[LAN], lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.list( @@ -667,7 +629,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: lan = await response.parse() assert_matches_type(AsyncSinglePage[LAN], lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.list( @@ -682,7 +643,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -697,25 +657,21 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -723,14 +679,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: lan = await response.parse() assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -740,7 +694,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -748,7 +701,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): @@ -756,7 +708,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): @@ -764,10 +715,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.get( @@ -777,7 +726,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.get( @@ -791,7 +739,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: lan = await response.parse() assert_matches_type(LAN, lan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.get( @@ -807,7 +754,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_transit/sites/test_wans.py b/tests/api_resources/magic_transit/sites/test_wans.py index 08eb99c288c..86079814ce2 100644 --- a/tests/api_resources/magic_transit/sites/test_wans.py +++ b/tests/api_resources/magic_transit/sites/test_wans.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.magic_transit.sites.wan import WAN -from cloudflare.types.magic_transit.sites.wan_create_response import WANCreateResponse +from cloudflare.types.magic_transit.sites import ( + WAN, + WANCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestWANs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.create( @@ -30,7 +31,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(WANCreateResponse, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.create( @@ -48,7 +48,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(WANCreateResponse, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.create( @@ -63,7 +62,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: wan = response.parse() assert_matches_type(WANCreateResponse, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.create( @@ -80,7 +78,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -99,7 +96,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: vlan_tag=0, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.update( @@ -109,7 +105,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.update( @@ -128,7 +123,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.update( @@ -142,7 +136,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: wan = response.parse() assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.update( @@ -158,7 +151,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -182,7 +174,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: site_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.list( @@ -191,7 +182,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[WAN], wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.list( @@ -204,7 +194,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: wan = response.parse() assert_matches_type(SyncSinglePage[WAN], wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.list( @@ -219,7 +208,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -234,25 +222,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -260,14 +244,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: wan = response.parse() assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -277,7 +259,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -285,7 +266,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): @@ -293,7 +273,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): @@ -301,10 +280,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.get( @@ -314,7 +291,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.get( @@ -328,7 +304,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: wan = response.parse() assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.get( @@ -344,7 +319,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -372,7 +346,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWANs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.create( @@ -383,7 +356,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WANCreateResponse, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.create( @@ -401,7 +373,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(WANCreateResponse, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.create( @@ -416,7 +387,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: wan = await response.parse() assert_matches_type(WANCreateResponse, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.create( @@ -433,7 +403,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -452,7 +421,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: vlan_tag=0, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.update( @@ -462,7 +430,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.update( @@ -481,7 +448,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.update( @@ -495,7 +461,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: wan = await response.parse() assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.update( @@ -511,7 +476,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -535,7 +499,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: site_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.list( @@ -544,7 +507,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[WAN], wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.list( @@ -557,7 +519,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: wan = await response.parse() assert_matches_type(AsyncSinglePage[WAN], wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.list( @@ -572,7 +533,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -587,25 +547,21 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -613,14 +569,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: wan = await response.parse() assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -630,7 +584,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -638,7 +591,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): @@ -646,7 +598,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): @@ -654,10 +605,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.get( @@ -667,7 +616,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.get( @@ -681,7 +629,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: wan = await response.parse() assert_matches_type(WAN, wan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.get( @@ -697,7 +644,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_transit/test_cf_interconnects.py b/tests/api_resources/magic_transit/test_cf_interconnects.py index 0bc70ae2298..8869b789a89 100644 --- a/tests/api_resources/magic_transit/test_cf_interconnects.py +++ b/tests/api_resources/magic_transit/test_cf_interconnects.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_transit.cf_interconnect_get_response import CfInterconnectGetResponse -from cloudflare.types.magic_transit.cf_interconnect_list_response import CfInterconnectListResponse -from cloudflare.types.magic_transit.cf_interconnect_update_response import CfInterconnectUpdateResponse +from cloudflare.types.magic_transit import ( + CfInterconnectGetResponse, + CfInterconnectListResponse, + CfInterconnectUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestCfInterconnects: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.update( @@ -28,7 +29,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.update( @@ -47,7 +47,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.cf_interconnects.with_raw_response.update( @@ -60,7 +59,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: cf_interconnect = response.parse() assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.cf_interconnects.with_streaming_response.update( @@ -75,7 +73,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -90,7 +87,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.list( @@ -98,7 +94,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(CfInterconnectListResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.cf_interconnects.with_raw_response.list( @@ -110,7 +105,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: cf_interconnect = response.parse() assert_matches_type(CfInterconnectListResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.cf_interconnects.with_streaming_response.list( @@ -124,7 +118,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -132,7 +125,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.get( @@ -141,7 +133,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.cf_interconnects.with_raw_response.get( @@ -154,7 +145,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: cf_interconnect = response.parse() assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.cf_interconnects.with_streaming_response.get( @@ -169,7 +159,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -188,7 +177,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCfInterconnects: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.update( @@ -197,7 +185,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.update( @@ -216,7 +203,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.cf_interconnects.with_raw_response.update( @@ -229,7 +215,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await response.parse() assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.cf_interconnects.with_streaming_response.update( @@ -244,7 +229,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -259,7 +243,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.list( @@ -267,7 +250,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CfInterconnectListResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.cf_interconnects.with_raw_response.list( @@ -279,7 +261,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await response.parse() assert_matches_type(CfInterconnectListResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.cf_interconnects.with_streaming_response.list( @@ -293,7 +274,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -301,7 +281,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.get( @@ -310,7 +289,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.cf_interconnects.with_raw_response.get( @@ -323,7 +301,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await response.parse() assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.cf_interconnects.with_streaming_response.get( @@ -338,7 +315,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_transit/test_gre_tunnels.py b/tests/api_resources/magic_transit/test_gre_tunnels.py index ceec2e94870..4b34df6809b 100644 --- a/tests/api_resources/magic_transit/test_gre_tunnels.py +++ b/tests/api_resources/magic_transit/test_gre_tunnels.py @@ -9,11 +9,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_transit.gre_tunnel_get_response import GRETunnelGetResponse -from cloudflare.types.magic_transit.gre_tunnel_list_response import GRETunnelListResponse -from cloudflare.types.magic_transit.gre_tunnel_create_response import GRETunnelCreateResponse -from cloudflare.types.magic_transit.gre_tunnel_delete_response import GRETunnelDeleteResponse -from cloudflare.types.magic_transit.gre_tunnel_update_response import GRETunnelUpdateResponse +from cloudflare.types.magic_transit import ( + GRETunnelGetResponse, + GRETunnelListResponse, + GRETunnelCreateResponse, + GRETunnelDeleteResponse, + GRETunnelUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,7 @@ class TestGRETunnels: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.create( @@ -30,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(GRETunnelCreateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.create( @@ -43,7 +45,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: gre_tunnel = response.parse() assert_matches_type(GRETunnelCreateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.create( @@ -58,7 +60,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -67,7 +69,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.update( @@ -80,7 +81,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.update( @@ -103,7 +103,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.update( @@ -120,7 +119,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: gre_tunnel = response.parse() assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.update( @@ -139,7 +137,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -162,7 +159,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="GRE_1", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.list( @@ -170,7 +166,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(GRETunnelListResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.list( @@ -182,7 +177,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: gre_tunnel = response.parse() assert_matches_type(GRETunnelListResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.list( @@ -196,7 +190,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -204,23 +197,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -228,13 +217,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: gre_tunnel = response.parse() assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -244,24 +231,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.gre_tunnels.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): client.magic_transit.gre_tunnels.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.get( @@ -270,7 +253,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.get( @@ -283,7 +265,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: gre_tunnel = response.parse() assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.get( @@ -298,7 +279,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -317,7 +297,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGRETunnels: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.create( @@ -326,7 +306,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(GRETunnelCreateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.gre_tunnels.with_raw_response.create( @@ -339,7 +319,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await response.parse() assert_matches_type(GRETunnelCreateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.gre_tunnels.with_streaming_response.create( @@ -354,7 +334,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -363,7 +343,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.update( @@ -376,7 +355,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.update( @@ -399,7 +377,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.gre_tunnels.with_raw_response.update( @@ -416,7 +393,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await response.parse() assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.gre_tunnels.with_streaming_response.update( @@ -435,7 +411,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -458,7 +433,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="GRE_1", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.list( @@ -466,7 +440,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(GRETunnelListResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.gre_tunnels.with_raw_response.list( @@ -478,7 +451,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await response.parse() assert_matches_type(GRETunnelListResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.gre_tunnels.with_streaming_response.list( @@ -492,7 +464,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -500,23 +471,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.gre_tunnels.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -524,13 +491,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await response.parse() assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.gre_tunnels.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -540,24 +505,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.gre_tunnels.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): await async_client.magic_transit.gre_tunnels.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.get( @@ -566,7 +527,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.gre_tunnels.with_raw_response.get( @@ -579,7 +539,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await response.parse() assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.gre_tunnels.with_streaming_response.get( @@ -594,7 +553,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_transit/test_ipsec_tunnels.py b/tests/api_resources/magic_transit/test_ipsec_tunnels.py index c5b0736f9d9..e4ea142af03 100644 --- a/tests/api_resources/magic_transit/test_ipsec_tunnels.py +++ b/tests/api_resources/magic_transit/test_ipsec_tunnels.py @@ -9,12 +9,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_transit.ipsec_tunnel_get_response import IPSECTunnelGetResponse -from cloudflare.types.magic_transit.ipsec_tunnel_list_response import IPSECTunnelListResponse -from cloudflare.types.magic_transit.ipsec_tunnel_create_response import IPSECTunnelCreateResponse -from cloudflare.types.magic_transit.ipsec_tunnel_delete_response import IPSECTunnelDeleteResponse -from cloudflare.types.magic_transit.ipsec_tunnel_update_response import IPSECTunnelUpdateResponse -from cloudflare.types.magic_transit.ipsec_tunnel_psk_generate_response import IPSECTunnelPSKGenerateResponse +from cloudflare.types.magic_transit import ( + IPSECTunnelGetResponse, + IPSECTunnelListResponse, + IPSECTunnelCreateResponse, + IPSECTunnelDeleteResponse, + IPSECTunnelUpdateResponse, + IPSECTunnelPSKGenerateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,6 @@ class TestIPSECTunnels: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.create( @@ -33,7 +34,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(IPSECTunnelCreateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.create( @@ -55,7 +55,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(IPSECTunnelCreateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.create( @@ -70,7 +69,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ipsec_tunnel = response.parse() assert_matches_type(IPSECTunnelCreateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.create( @@ -87,7 +85,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -98,7 +95,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="IPsec_1", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( @@ -110,7 +106,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( @@ -133,7 +128,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.update( @@ -149,7 +143,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: ipsec_tunnel = response.parse() assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.update( @@ -167,7 +160,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -188,7 +180,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="IPsec_1", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.list( @@ -196,7 +187,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(IPSECTunnelListResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.list( @@ -208,7 +198,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: ipsec_tunnel = response.parse() assert_matches_type(IPSECTunnelListResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.list( @@ -222,7 +211,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -230,23 +218,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -254,13 +238,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: ipsec_tunnel = response.parse() assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -270,24 +252,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.get( @@ -296,7 +274,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.get( @@ -309,7 +286,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ipsec_tunnel = response.parse() assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.get( @@ -324,7 +300,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -339,7 +314,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_psk_generate(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.psk_generate( @@ -349,7 +323,6 @@ def test_method_psk_generate(self, client: Cloudflare) -> None: ) assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_psk_generate(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( @@ -363,7 +336,6 @@ def test_raw_response_psk_generate(self, client: Cloudflare) -> None: ipsec_tunnel = response.parse() assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_psk_generate(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.psk_generate( @@ -379,7 +351,6 @@ def test_streaming_response_psk_generate(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_psk_generate(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -400,7 +371,6 @@ def test_path_params_psk_generate(self, client: Cloudflare) -> None: class TestAsyncIPSECTunnels: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.create( @@ -411,7 +381,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IPSECTunnelCreateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.create( @@ -433,7 +402,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(IPSECTunnelCreateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.create( @@ -448,7 +416,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await response.parse() assert_matches_type(IPSECTunnelCreateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.create( @@ -465,7 +432,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -476,7 +442,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="IPsec_1", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.update( @@ -488,7 +453,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.update( @@ -511,7 +475,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( @@ -527,7 +490,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await response.parse() assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.update( @@ -545,7 +507,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -566,7 +527,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="IPsec_1", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.list( @@ -574,7 +534,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IPSECTunnelListResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.list( @@ -586,7 +545,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await response.parse() assert_matches_type(IPSECTunnelListResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.list( @@ -600,7 +558,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -608,23 +565,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -632,13 +585,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await response.parse() assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -648,24 +599,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.get( @@ -674,7 +621,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( @@ -687,7 +633,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await response.parse() assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.get( @@ -702,7 +647,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -717,7 +661,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_psk_generate(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.psk_generate( @@ -727,7 +670,6 @@ async def test_method_psk_generate(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_psk_generate(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( @@ -741,7 +683,6 @@ async def test_raw_response_psk_generate(self, async_client: AsyncCloudflare) -> ipsec_tunnel = await response.parse() assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_psk_generate(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.psk_generate( @@ -757,7 +698,6 @@ async def test_streaming_response_psk_generate(self, async_client: AsyncCloudfla assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_psk_generate(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_transit/test_routes.py b/tests/api_resources/magic_transit/test_routes.py index f6d14e34638..20866b7a330 100644 --- a/tests/api_resources/magic_transit/test_routes.py +++ b/tests/api_resources/magic_transit/test_routes.py @@ -9,12 +9,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_transit.route_get_response import RouteGetResponse -from cloudflare.types.magic_transit.route_list_response import RouteListResponse -from cloudflare.types.magic_transit.route_empty_response import RouteEmptyResponse -from cloudflare.types.magic_transit.route_create_response import RouteCreateResponse -from cloudflare.types.magic_transit.route_delete_response import RouteDeleteResponse -from cloudflare.types.magic_transit.route_update_response import RouteUpdateResponse +from cloudflare.types.magic_transit import ( + RouteGetResponse, + RouteListResponse, + RouteEmptyResponse, + RouteCreateResponse, + RouteDeleteResponse, + RouteUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,7 @@ class TestRoutes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: route = client.magic_transit.routes.create( @@ -31,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.create( @@ -44,7 +46,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.create( @@ -59,7 +61,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -68,7 +70,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: route = client.magic_transit.routes.update( @@ -80,7 +81,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(RouteUpdateResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: route = client.magic_transit.routes.update( @@ -98,7 +98,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RouteUpdateResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.update( @@ -114,7 +113,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RouteUpdateResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.update( @@ -132,7 +130,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -153,7 +150,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: priority=0, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: route = client.magic_transit.routes.list( @@ -161,7 +157,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(RouteListResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.list( @@ -173,7 +168,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RouteListResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.list( @@ -187,7 +181,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -195,23 +188,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: route = client.magic_transit.routes.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(RouteDeleteResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -219,13 +208,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RouteDeleteResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -235,38 +222,31 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.routes.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_identifier` but received ''"): client.magic_transit.routes.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_empty(self, client: Cloudflare) -> None: route = client.magic_transit.routes.empty( account_id="023e105f4ecef8ad9ca31a8372d0c353", - routes=[{}, {}, {}], ) assert_matches_type(RouteEmptyResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_empty(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.empty( account_id="023e105f4ecef8ad9ca31a8372d0c353", - routes=[{}, {}, {}], ) assert response.is_closed is True @@ -274,12 +254,10 @@ def test_raw_response_empty(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RouteEmptyResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_empty(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.empty( account_id="023e105f4ecef8ad9ca31a8372d0c353", - routes=[{}, {}, {}], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -289,16 +267,13 @@ def test_streaming_response_empty(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_empty(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.routes.with_raw_response.empty( account_id="", - routes=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: route = client.magic_transit.routes.get( @@ -307,7 +282,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(RouteGetResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.get( @@ -320,7 +294,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RouteGetResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.get( @@ -335,7 +308,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -354,7 +326,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRoutes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.create( @@ -363,7 +335,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.create( @@ -376,7 +348,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.create( @@ -391,7 +363,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -400,7 +372,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.update( @@ -412,7 +383,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RouteUpdateResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.update( @@ -430,7 +400,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(RouteUpdateResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.update( @@ -446,7 +415,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(RouteUpdateResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.update( @@ -464,7 +432,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -485,7 +452,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: priority=0, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.list( @@ -493,7 +459,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RouteListResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.list( @@ -505,7 +470,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(RouteListResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.list( @@ -519,7 +483,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -527,23 +490,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(RouteDeleteResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -551,13 +510,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(RouteDeleteResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -567,38 +524,31 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.routes.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_identifier` but received ''"): await async_client.magic_transit.routes.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_empty(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.empty( account_id="023e105f4ecef8ad9ca31a8372d0c353", - routes=[{}, {}, {}], ) assert_matches_type(RouteEmptyResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_empty(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.empty( account_id="023e105f4ecef8ad9ca31a8372d0c353", - routes=[{}, {}, {}], ) assert response.is_closed is True @@ -606,12 +556,10 @@ async def test_raw_response_empty(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(RouteEmptyResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_empty(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.empty( account_id="023e105f4ecef8ad9ca31a8372d0c353", - routes=[{}, {}, {}], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -621,16 +569,13 @@ async def test_streaming_response_empty(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_empty(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.routes.with_raw_response.empty( account_id="", - routes=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.get( @@ -639,7 +584,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RouteGetResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.get( @@ -652,7 +596,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(RouteGetResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.get( @@ -667,7 +610,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_transit/test_sites.py b/tests/api_resources/magic_transit/test_sites.py index 95204348147..a4cfda99cf1 100644 --- a/tests/api_resources/magic_transit/test_sites.py +++ b/tests/api_resources/magic_transit/test_sites.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.magic_transit.site import Site +from cloudflare.types.magic_transit import Site base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestSites: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: site = client.magic_transit.sites.create( @@ -27,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: site = client.magic_transit.sites.create( @@ -37,14 +35,13 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: description="string", ha_mode=True, location={ - "lat": "string", - "lon": "string", + "lat": "37.6192", + "lon": "122.3816", }, secondary_connector_id="8d67040d3835dbcf46ce29da440dc482", ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.create( @@ -57,7 +54,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: site = response.parse() assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.create( @@ -72,7 +68,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -81,7 +76,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="site_1", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: site = client.magic_transit.sites.update( @@ -90,7 +84,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: site = client.magic_transit.sites.update( @@ -99,15 +92,14 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: connector_id="ac60d3d0435248289d446cedd870bcf4", description="string", location={ - "lat": "string", - "lon": "string", + "lat": "37.6192", + "lon": "122.3816", }, name="site_1", secondary_connector_id="8d67040d3835dbcf46ce29da440dc482", ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.update( @@ -120,7 +112,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: site = response.parse() assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.update( @@ -135,7 +126,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -150,7 +140,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: site = client.magic_transit.sites.list( @@ -158,7 +147,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Site], site, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: site = client.magic_transit.sites.list( @@ -167,7 +155,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Site], site, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.list( @@ -179,7 +166,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: site = response.parse() assert_matches_type(SyncSinglePage[Site], site, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.list( @@ -193,7 +179,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -201,23 +186,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: site = client.magic_transit.sites.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -225,13 +206,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: site = response.parse() assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -241,24 +220,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: site = client.magic_transit.sites.get( @@ -267,7 +242,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.get( @@ -280,7 +254,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: site = response.parse() assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.get( @@ -295,7 +268,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -314,7 +286,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSites: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.create( @@ -323,7 +294,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.create( @@ -333,14 +303,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare description="string", ha_mode=True, location={ - "lat": "string", - "lon": "string", + "lat": "37.6192", + "lon": "122.3816", }, secondary_connector_id="8d67040d3835dbcf46ce29da440dc482", ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.create( @@ -353,7 +322,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: site = await response.parse() assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.create( @@ -368,7 +336,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -377,7 +344,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="site_1", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.update( @@ -386,7 +352,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.update( @@ -395,15 +360,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare connector_id="ac60d3d0435248289d446cedd870bcf4", description="string", location={ - "lat": "string", - "lon": "string", + "lat": "37.6192", + "lon": "122.3816", }, name="site_1", secondary_connector_id="8d67040d3835dbcf46ce29da440dc482", ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.update( @@ -416,7 +380,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: site = await response.parse() assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.update( @@ -431,7 +394,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -446,7 +408,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.list( @@ -454,7 +415,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Site], site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.list( @@ -463,7 +423,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[Site], site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.list( @@ -475,7 +434,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: site = await response.parse() assert_matches_type(AsyncSinglePage[Site], site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.list( @@ -489,7 +447,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -497,23 +454,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -521,13 +474,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: site = await response.parse() assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -537,24 +488,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.get( @@ -563,7 +510,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.get( @@ -576,7 +522,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: site = await response.parse() assert_matches_type(Site, site, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.get( @@ -591,7 +536,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/mtls_certificates/test_associations.py b/tests/api_resources/mtls_certificates/test_associations.py index 68a4e567393..cce75fc9fec 100644 --- a/tests/api_resources/mtls_certificates/test_associations.py +++ b/tests/api_resources/mtls_certificates/test_associations.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.mtls_certificates.association_get_response import AssociationGetResponse +from cloudflare.types.mtls_certificates import AssociationGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAssociations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: association = client.mtls_certificates.associations.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AssociationGetResponse], association, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.mtls_certificates.associations.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: association = response.parse() assert_matches_type(Optional[AssociationGetResponse], association, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.mtls_certificates.associations.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAssociations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: association = await async_client.mtls_certificates.associations.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AssociationGetResponse], association, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.associations.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: association = await response.parse() assert_matches_type(Optional[AssociationGetResponse], association, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.mtls_certificates.associations.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py index 70cc49a745d..4277e406662 100644 --- a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py +++ b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py @@ -3,17 +3,19 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.origin_tls_client_auth.authenticated_origin_pull import AuthenticatedOriginPull -from cloudflare.types.origin_tls_client_auth.hostnames.certificate_get_response import CertificateGetResponse -from cloudflare.types.origin_tls_client_auth.hostnames.certificate_create_response import CertificateCreateResponse -from cloudflare.types.origin_tls_client_auth.hostnames.certificate_delete_response import CertificateDeleteResponse +from cloudflare.types.origin_tls_client_auth import AuthenticatedOriginPull +from cloudflare.types.origin_tls_client_auth.hostnames import ( + CertificateGetResponse, + CertificateCreateResponse, + CertificateDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestCertificates: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: certificate = client.origin_tls_client_auth.hostnames.certificates.create( @@ -29,9 +30,8 @@ def test_method_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.certificates.with_raw_response.create( @@ -43,9 +43,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.create( @@ -57,11 +56,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -71,7 +69,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: certificate = client.origin_tls_client_auth.hostnames.certificates.list( @@ -79,7 +76,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[AuthenticatedOriginPull], certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.certificates.with_raw_response.list( @@ -91,7 +87,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: certificate = response.parse() assert_matches_type(SyncSinglePage[AuthenticatedOriginPull], certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.list( @@ -105,7 +100,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -113,73 +107,62 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate = client.origin_tls_client_auth.hostnames.certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate = client.origin_tls_client_auth.hostnames.certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( @@ -190,9 +173,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.get( @@ -203,11 +185,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -226,7 +207,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificates: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.origin_tls_client_auth.hostnames.certificates.create( @@ -234,9 +214,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.create( @@ -248,9 +227,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.create( @@ -262,11 +240,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -276,7 +253,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.origin_tls_client_auth.hostnames.certificates.list( @@ -284,7 +260,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[AuthenticatedOriginPull], certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.list( @@ -296,7 +271,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: certificate = await response.parse() assert_matches_type(AsyncSinglePage[AuthenticatedOriginPull], certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.list( @@ -310,7 +284,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -318,73 +291,62 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.origin_tls_client_auth.hostnames.certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.origin_tls_client_auth.hostnames.certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( @@ -395,9 +357,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.get( @@ -408,11 +369,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/origin_tls_client_auth/test_hostnames.py b/tests/api_resources/origin_tls_client_auth/test_hostnames.py index 6576aedf513..0bb7b13f294 100644 --- a/tests/api_resources/origin_tls_client_auth/test_hostnames.py +++ b/tests/api_resources/origin_tls_client_auth/test_hostnames.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.origin_tls_client_auth.hostname_update_response import HostnameUpdateResponse -from cloudflare.types.origin_tls_client_auth.authenticated_origin_pull import AuthenticatedOriginPull +from cloudflare.types.origin_tls_client_auth import ( + HostnameUpdateResponse, + AuthenticatedOriginPull, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestHostnames: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: hostname = client.origin_tls_client_auth.hostnames.update( @@ -27,7 +28,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[HostnameUpdateResponse], hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.with_raw_response.update( @@ -40,7 +40,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: hostname = response.parse() assert_matches_type(Optional[HostnameUpdateResponse], hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.with_streaming_response.update( @@ -55,7 +54,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -64,16 +62,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: config=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: hostname = client.origin_tls_client_auth.hostnames.get( "app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AuthenticatedOriginPull, hostname, path=["response"]) + assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.with_raw_response.get( @@ -84,9 +80,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(AuthenticatedOriginPull, hostname, path=["response"]) + assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.with_streaming_response.get( @@ -97,11 +92,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(AuthenticatedOriginPull, hostname, path=["response"]) + assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -120,7 +114,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHostnames: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.origin_tls_client_auth.hostnames.update( @@ -129,7 +122,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[HostnameUpdateResponse], hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.with_raw_response.update( @@ -142,7 +134,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: hostname = await response.parse() assert_matches_type(Optional[HostnameUpdateResponse], hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.with_streaming_response.update( @@ -157,7 +148,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -166,16 +156,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: config=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.origin_tls_client_auth.hostnames.get( "app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AuthenticatedOriginPull, hostname, path=["response"]) + assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.with_raw_response.get( @@ -186,9 +174,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(AuthenticatedOriginPull, hostname, path=["response"]) + assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.with_streaming_response.get( @@ -199,11 +186,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(AuthenticatedOriginPull, hostname, path=["response"]) + assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/origin_tls_client_auth/test_settings.py b/tests/api_resources/origin_tls_client_auth/test_settings.py index 4c35bbd0427..fc30faf30eb 100644 --- a/tests/api_resources/origin_tls_client_auth/test_settings.py +++ b/tests/api_resources/origin_tls_client_auth/test_settings.py @@ -3,14 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.origin_tls_client_auth.setting_get_response import SettingGetResponse -from cloudflare.types.origin_tls_client_auth.setting_update_response import SettingUpdateResponse +from cloudflare.types.origin_tls_client_auth import SettingGetResponse, SettingUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,16 +17,14 @@ class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: setting = client.origin_tls_client_auth.settings.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.settings.with_raw_response.update( @@ -38,9 +35,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.settings.with_streaming_response.update( @@ -51,11 +47,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -64,15 +59,13 @@ def test_path_params_update(self, client: Cloudflare) -> None: enabled=True, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.origin_tls_client_auth.settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.settings.with_raw_response.get( @@ -82,9 +75,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.settings.with_streaming_response.get( @@ -94,11 +86,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -110,16 +101,14 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: setting = await async_client.origin_tls_client_auth.settings.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.settings.with_raw_response.update( @@ -130,9 +119,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.settings.with_streaming_response.update( @@ -143,11 +131,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -156,15 +143,13 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: enabled=True, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.origin_tls_client_auth.settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.settings.with_raw_response.get( @@ -174,9 +159,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.settings.with_streaming_response.get( @@ -186,11 +170,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/page_shield/test_connections.py b/tests/api_resources/page_shield/test_connections.py index 7af1088e528..f0a138460d7 100644 --- a/tests/api_resources/page_shield/test_connections.py +++ b/tests/api_resources/page_shield/test_connections.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.page_shield.connection import Connection +from cloudflare.types.page_shield import Connection base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestConnections: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: connection = client.page_shield.connections.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Connection], connection, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: connection = client.page_shield.connections.list( @@ -37,7 +35,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: export="csv", hosts="blog.cloudflare.com,www.example*,*cloudflare.com", order_by="first_seen_at", - page="string", + page="2", page_url="example.com/page,*/checkout,example.com/*,*checkout*", per_page=100, prioritize_malicious=True, @@ -46,7 +44,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Connection], connection, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.page_shield.connections.with_raw_response.list( @@ -58,7 +55,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: connection = response.parse() assert_matches_type(SyncSinglePage[Connection], connection, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.page_shield.connections.with_streaming_response.list( @@ -72,7 +68,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -80,7 +75,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: connection = client.page_shield.connections.get( @@ -89,7 +83,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Connection, connection, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.connections.with_raw_response.get( @@ -102,7 +95,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: connection = response.parse() assert_matches_type(Connection, connection, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.connections.with_streaming_response.get( @@ -117,7 +109,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -136,7 +127,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnections: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: connection = await async_client.page_shield.connections.list( @@ -144,7 +134,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Connection], connection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: connection = await async_client.page_shield.connections.list( @@ -155,7 +144,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) export="csv", hosts="blog.cloudflare.com,www.example*,*cloudflare.com", order_by="first_seen_at", - page="string", + page="2", page_url="example.com/page,*/checkout,example.com/*,*checkout*", per_page=100, prioritize_malicious=True, @@ -164,7 +153,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[Connection], connection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.connections.with_raw_response.list( @@ -176,7 +164,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: connection = await response.parse() assert_matches_type(AsyncSinglePage[Connection], connection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.connections.with_streaming_response.list( @@ -190,7 +177,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -198,7 +184,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connection = await async_client.page_shield.connections.get( @@ -207,7 +192,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Connection, connection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.connections.with_raw_response.get( @@ -220,7 +204,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: connection = await response.parse() assert_matches_type(Connection, connection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.connections.with_streaming_response.get( @@ -235,7 +218,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/page_shield/test_policies.py b/tests/api_resources/page_shield/test_policies.py index c81f6dda008..500d4d23d0e 100644 --- a/tests/api_resources/page_shield/test_policies.py +++ b/tests/api_resources/page_shield/test_policies.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.page_shield.policy import Policy +from cloudflare.types.page_shield import Policy base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestPolicies: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: policy = client.page_shield.policies.create( @@ -26,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: policy = client.page_shield.policies.create( @@ -39,7 +37,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.create( @@ -51,7 +48,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.create( @@ -65,7 +61,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -73,7 +68,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.page_shield.policies.update( @@ -82,7 +76,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.page_shield.policies.update( @@ -96,7 +89,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.update( @@ -109,7 +101,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.update( @@ -124,7 +115,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -139,7 +129,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: policy = client.page_shield.policies.list( @@ -147,7 +136,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.list( @@ -159,7 +147,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(SyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.list( @@ -173,7 +160,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -181,7 +167,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.page_shield.policies.delete( @@ -190,7 +175,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert policy is None - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.delete( @@ -203,7 +187,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: policy = response.parse() assert policy is None - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.delete( @@ -218,7 +201,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -233,7 +215,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.page_shield.policies.get( @@ -242,7 +223,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.get( @@ -255,7 +235,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.get( @@ -270,7 +249,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -289,7 +267,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.create( @@ -297,7 +274,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.create( @@ -310,7 +286,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.create( @@ -322,7 +297,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.create( @@ -336,7 +310,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -344,7 +317,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.update( @@ -353,7 +325,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.update( @@ -367,7 +338,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.update( @@ -380,7 +350,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.update( @@ -395,7 +364,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -410,7 +378,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.list( @@ -418,7 +385,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.list( @@ -430,7 +396,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(AsyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.list( @@ -444,7 +409,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -452,7 +416,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.delete( @@ -461,7 +424,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert policy is None - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.delete( @@ -474,7 +436,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert policy is None - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.delete( @@ -489,7 +450,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -504,7 +464,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.get( @@ -513,7 +472,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.get( @@ -526,7 +484,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Policy, policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.get( @@ -541,7 +498,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/page_shield/test_scripts.py b/tests/api_resources/page_shield/test_scripts.py index 04693a1aa4c..a93e18c8b85 100644 --- a/tests/api_resources/page_shield/test_scripts.py +++ b/tests/api_resources/page_shield/test_scripts.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.page_shield.script import Script -from cloudflare.types.page_shield.script_get_response import ScriptGetResponse +from cloudflare.types.page_shield import Script, ScriptGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestScripts: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: script = client.page_shield.scripts.list( @@ -27,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: script = client.page_shield.scripts.list( @@ -39,7 +36,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: export="csv", hosts="blog.cloudflare.com,www.example*,*cloudflare.com", order_by="first_seen_at", - page="string", + page="2", page_url="example.com/page,*/checkout,example.com/*,*checkout*", per_page=100, prioritize_malicious=True, @@ -48,7 +45,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.page_shield.scripts.with_raw_response.list( @@ -60,7 +56,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: script = response.parse() assert_matches_type(SyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.page_shield.scripts.with_streaming_response.list( @@ -74,7 +69,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -82,7 +76,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: script = client.page_shield.scripts.get( @@ -91,7 +84,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ScriptGetResponse, script, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.scripts.with_raw_response.get( @@ -104,7 +96,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: script = response.parse() assert_matches_type(ScriptGetResponse, script, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.scripts.with_streaming_response.get( @@ -119,7 +110,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -138,7 +128,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScripts: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: script = await async_client.page_shield.scripts.list( @@ -146,7 +135,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: script = await async_client.page_shield.scripts.list( @@ -158,7 +146,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) export="csv", hosts="blog.cloudflare.com,www.example*,*cloudflare.com", order_by="first_seen_at", - page="string", + page="2", page_url="example.com/page,*/checkout,example.com/*,*checkout*", per_page=100, prioritize_malicious=True, @@ -167,7 +155,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.scripts.with_raw_response.list( @@ -179,7 +166,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: script = await response.parse() assert_matches_type(AsyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.scripts.with_streaming_response.list( @@ -193,7 +179,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -201,7 +186,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: script = await async_client.page_shield.scripts.get( @@ -210,7 +194,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ScriptGetResponse, script, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.scripts.with_raw_response.get( @@ -223,7 +206,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: script = await response.parse() assert_matches_type(ScriptGetResponse, script, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.scripts.with_streaming_response.get( @@ -238,7 +220,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/pagerules/test_settings.py b/tests/api_resources/pagerules/test_settings.py index 6e5c917c33a..7339a7f0ecc 100644 --- a/tests/api_resources/pagerules/test_settings.py +++ b/tests/api_resources/pagerules/test_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.pagerules.setting_list_response import SettingListResponse +from cloudflare.types.pagerules import SettingListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: setting = client.pagerules.settings.list( @@ -25,7 +24,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SettingListResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pagerules.settings.with_raw_response.list( @@ -37,7 +35,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(SettingListResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pagerules.settings.with_streaming_response.list( @@ -51,7 +48,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: setting = await async_client.pagerules.settings.list( @@ -71,7 +66,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SettingListResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pagerules.settings.with_raw_response.list( @@ -83,7 +77,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(SettingListResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pagerules.settings.with_streaming_response.list( @@ -97,7 +90,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/pages/projects/deployments/history/test_logs.py b/tests/api_resources/pages/projects/deployments/history/test_logs.py index 229d9086dc6..03612af99fe 100644 --- a/tests/api_resources/pages/projects/deployments/history/test_logs.py +++ b/tests/api_resources/pages/projects/deployments/history/test_logs.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.pages.projects.deployments.history.log_get_response import LogGetResponse +from cloudflare.types.pages.projects.deployments.history import LogGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestLogs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: log = client.pages.projects.deployments.history.logs.get( @@ -27,7 +26,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(LogGetResponse, log, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.history.logs.with_raw_response.get( @@ -41,7 +39,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: log = response.parse() assert_matches_type(LogGetResponse, log, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.deployments.history.logs.with_streaming_response.get( @@ -57,7 +54,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -85,7 +81,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLogs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: log = await async_client.pages.projects.deployments.history.logs.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(LogGetResponse, log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.history.logs.with_raw_response.get( @@ -109,7 +103,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: log = await response.parse() assert_matches_type(LogGetResponse, log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.history.logs.with_streaming_response.get( @@ -125,7 +118,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/pages/projects/test_deployments.py b/tests/api_resources/pages/projects/test_deployments.py index 028df3f39b9..45e2f785dad 100644 --- a/tests/api_resources/pages/projects/test_deployments.py +++ b/tests/api_resources/pages/projects/test_deployments.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.pages.deployment import Deployment +from cloudflare.types.pages import Deployment base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,7 @@ class TestDeployments: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.create( @@ -27,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.create( @@ -37,7 +37,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.create( @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: deployment = response.parse() assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.create( @@ -65,7 +65,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -80,7 +80,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.list( @@ -89,7 +88,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Deployment], deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.list( @@ -99,7 +97,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Deployment], deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.list( @@ -112,7 +109,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: deployment = response.parse() assert_matches_type(SyncSinglePage[Deployment], deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.list( @@ -127,7 +123,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -142,25 +137,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) assert_matches_type(object, deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) assert response.is_closed is True @@ -168,14 +159,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: deployment = response.parse() assert_matches_type(object, deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -185,7 +174,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -193,7 +181,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): @@ -201,7 +188,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): @@ -209,10 +195,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.get( @@ -222,7 +206,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.get( @@ -236,7 +219,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: deployment = response.parse() assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.get( @@ -252,7 +234,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -276,7 +257,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: project_name="this-is-my-project-01", ) - @pytest.mark.skip() @parametrize def test_method_retry(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.retry( @@ -287,7 +267,6 @@ def test_method_retry(self, client: Cloudflare) -> None: ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_retry(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.retry( @@ -302,7 +281,6 @@ def test_raw_response_retry(self, client: Cloudflare) -> None: deployment = response.parse() assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_retry(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.retry( @@ -319,7 +297,6 @@ def test_streaming_response_retry(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_retry(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -346,7 +323,6 @@ def test_path_params_retry(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_rollback(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.rollback( @@ -357,7 +333,6 @@ def test_method_rollback(self, client: Cloudflare) -> None: ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_rollback(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.rollback( @@ -372,7 +347,6 @@ def test_raw_response_rollback(self, client: Cloudflare) -> None: deployment = response.parse() assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_rollback(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.rollback( @@ -389,7 +363,6 @@ def test_streaming_response_rollback(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_rollback(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -420,7 +393,7 @@ def test_path_params_rollback(self, client: Cloudflare) -> None: class TestAsyncDeployments: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.create( @@ -429,7 +402,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.create( @@ -439,7 +412,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.create( @@ -452,7 +425,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: deployment = await response.parse() assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.create( @@ -467,7 +440,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -482,7 +455,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.list( @@ -491,7 +463,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Deployment], deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.list( @@ -501,7 +472,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[Deployment], deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.list( @@ -514,7 +484,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: deployment = await response.parse() assert_matches_type(AsyncSinglePage[Deployment], deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.list( @@ -529,7 +498,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -544,25 +512,21 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) assert_matches_type(object, deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) assert response.is_closed is True @@ -570,14 +534,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: deployment = await response.parse() assert_matches_type(object, deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -587,7 +549,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -595,7 +556,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): @@ -603,7 +563,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): @@ -611,10 +570,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.get( @@ -624,7 +581,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.get( @@ -638,7 +594,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: deployment = await response.parse() assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.get( @@ -654,7 +609,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -678,7 +632,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: project_name="this-is-my-project-01", ) - @pytest.mark.skip() @parametrize async def test_method_retry(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.retry( @@ -689,7 +642,6 @@ async def test_method_retry(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_retry(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.retry( @@ -704,7 +656,6 @@ async def test_raw_response_retry(self, async_client: AsyncCloudflare) -> None: deployment = await response.parse() assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_retry(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.retry( @@ -721,7 +672,6 @@ async def test_streaming_response_retry(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -748,7 +698,6 @@ async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_rollback(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.rollback( @@ -759,7 +708,6 @@ async def test_method_rollback(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_rollback(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.rollback( @@ -774,7 +722,6 @@ async def test_raw_response_rollback(self, async_client: AsyncCloudflare) -> Non deployment = await response.parse() assert_matches_type(Deployment, deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_rollback(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.rollback( @@ -791,7 +738,6 @@ async def test_streaming_response_rollback(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_rollback(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/pages/projects/test_domains.py b/tests/api_resources/pages/projects/test_domains.py index 2d52464334a..6fb601b3070 100644 --- a/tests/api_resources/pages/projects/test_domains.py +++ b/tests/api_resources/pages/projects/test_domains.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.pages.projects.domain_get_response import DomainGetResponse -from cloudflare.types.pages.projects.domain_edit_response import DomainEditResponse -from cloudflare.types.pages.projects.domain_create_response import DomainCreateResponse +from cloudflare.types.pages.projects import ( + DomainGetResponse, + DomainEditResponse, + DomainCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestDomains: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.create( @@ -30,7 +31,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DomainCreateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.create( @@ -44,7 +44,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(Optional[DomainCreateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.create( @@ -60,7 +59,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -77,7 +75,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={"name": "example.com"}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.list( @@ -86,7 +83,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[object], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.list( @@ -99,7 +95,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(SyncSinglePage[object], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.list( @@ -114,7 +109,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -129,25 +123,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.delete( "this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) assert_matches_type(object, domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.delete( "this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) assert response.is_closed is True @@ -155,14 +145,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(object, domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.delete( "this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -172,7 +160,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -180,7 +167,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): @@ -188,7 +174,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): @@ -196,10 +181,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.edit( @@ -210,7 +193,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DomainEditResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.edit( @@ -225,7 +207,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(Optional[DomainEditResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.edit( @@ -242,7 +223,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -269,7 +249,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.get( @@ -279,7 +258,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.get( @@ -293,7 +271,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.get( @@ -309,7 +286,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -337,7 +313,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.create( @@ -347,7 +322,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DomainCreateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.create( @@ -361,7 +335,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(Optional[DomainCreateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.create( @@ -377,7 +350,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -394,7 +366,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={"name": "example.com"}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.list( @@ -403,7 +374,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[object], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.list( @@ -416,7 +386,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(AsyncSinglePage[object], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.list( @@ -431,7 +400,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -446,25 +414,21 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.delete( "this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) assert_matches_type(object, domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.delete( "this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) assert response.is_closed is True @@ -472,14 +436,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(object, domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.delete( "this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -489,7 +451,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -497,7 +458,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): @@ -505,7 +465,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): @@ -513,10 +472,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.edit( @@ -527,7 +484,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DomainEditResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.edit( @@ -542,7 +498,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(Optional[DomainEditResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.edit( @@ -559,7 +514,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -586,7 +540,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.get( @@ -596,7 +549,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.get( @@ -610,7 +562,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.get( @@ -626,7 +577,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/pages/test_projects.py b/tests/api_resources/pages/test_projects.py index b21809e1159..562db3e98af 100644 --- a/tests/api_resources/pages/test_projects.py +++ b/tests/api_resources/pages/test_projects.py @@ -10,11 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.pages import Deployment -from cloudflare.types.pages.project import Project -from cloudflare.types.pages.deployment import Deployment -from cloudflare.types.pages.project_edit_response import ProjectEditResponse -from cloudflare.types.pages.project_create_response import ProjectCreateResponse +from cloudflare.types.pages import ( + Project, + Deployment, + ProjectEditResponse, + ProjectCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +23,6 @@ class TestProjects: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: project = client.pages.projects.create( @@ -30,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: project = client.pages.projects.create( @@ -110,7 +109,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.create( @@ -122,7 +120,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: project = response.parse() assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.create( @@ -136,7 +133,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -144,7 +140,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: project = client.pages.projects.list( @@ -152,7 +147,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Deployment], project, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.list( @@ -164,7 +158,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: project = response.parse() assert_matches_type(SyncSinglePage[Deployment], project, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.list( @@ -178,7 +171,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -186,23 +178,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: project = client.pages.projects.delete( "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.delete( "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -210,13 +198,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: project = response.parse() assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.delete( "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -226,24 +212,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.with_raw_response.delete( "this-is-my-project-01", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: project = client.pages.projects.edit( @@ -268,7 +250,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(ProjectEditResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.edit( @@ -297,7 +278,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: project = response.parse() assert_matches_type(ProjectEditResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.edit( @@ -328,7 +308,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -375,7 +354,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: project = client.pages.projects.get( @@ -384,7 +362,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Project, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.get( @@ -397,7 +374,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: project = response.parse() assert_matches_type(Project, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.get( @@ -412,7 +388,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -427,7 +402,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_purge_build_cache(self, client: Cloudflare) -> None: project = client.pages.projects.purge_build_cache( @@ -436,7 +410,6 @@ def test_method_purge_build_cache(self, client: Cloudflare) -> None: ) assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_purge_build_cache(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.purge_build_cache( @@ -449,7 +422,6 @@ def test_raw_response_purge_build_cache(self, client: Cloudflare) -> None: project = response.parse() assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_purge_build_cache(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.purge_build_cache( @@ -464,7 +436,6 @@ def test_streaming_response_purge_build_cache(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_purge_build_cache(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -483,7 +454,6 @@ def test_path_params_purge_build_cache(self, client: Cloudflare) -> None: class TestAsyncProjects: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.create( @@ -491,7 +461,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.create( @@ -571,7 +540,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.create( @@ -583,7 +551,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: project = await response.parse() assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.create( @@ -597,7 +564,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -605,7 +571,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.list( @@ -613,7 +578,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Deployment], project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.list( @@ -625,7 +589,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: project = await response.parse() assert_matches_type(AsyncSinglePage[Deployment], project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.list( @@ -639,7 +602,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -647,23 +609,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.delete( "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.delete( "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -671,13 +629,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: project = await response.parse() assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.delete( "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -687,24 +643,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.with_raw_response.delete( "this-is-my-project-01", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.edit( @@ -729,7 +681,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ProjectEditResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.edit( @@ -758,7 +709,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: project = await response.parse() assert_matches_type(ProjectEditResponse, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.edit( @@ -789,7 +739,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -836,7 +785,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.get( @@ -845,7 +793,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Project, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.get( @@ -858,7 +805,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: project = await response.parse() assert_matches_type(Project, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.get( @@ -873,7 +819,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -888,7 +833,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_purge_build_cache(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.purge_build_cache( @@ -897,7 +841,6 @@ async def test_method_purge_build_cache(self, async_client: AsyncCloudflare) -> ) assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_purge_build_cache(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.purge_build_cache( @@ -910,7 +853,6 @@ async def test_raw_response_purge_build_cache(self, async_client: AsyncCloudflar project = await response.parse() assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_purge_build_cache(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.purge_build_cache( @@ -925,7 +867,6 @@ async def test_streaming_response_purge_build_cache(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_purge_build_cache(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/pcaps/test_download.py b/tests/api_resources/pcaps/test_download.py index 2b6c3f86def..ee286a6f414 100644 --- a/tests/api_resources/pcaps/test_download.py +++ b/tests/api_resources/pcaps/test_download.py @@ -23,7 +23,6 @@ class TestDownload: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -39,7 +38,6 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: assert cast(Any, download.is_closed) is True assert isinstance(download, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -57,7 +55,6 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N assert download.json() == {"foo": "bar"} assert isinstance(download, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -77,7 +74,6 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter assert cast(Any, download.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_path_params_get(self, client: Cloudflare) -> None: @@ -97,7 +93,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownload: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -113,7 +108,6 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR assert cast(Any, download.is_closed) is True assert isinstance(download, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -131,7 +125,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: assert await download.json() == {"foo": "bar"} assert isinstance(download, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -151,7 +144,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx assert cast(Any, download.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/pcaps/test_ownership.py b/tests/api_resources/pcaps/test_ownership.py index ea09f6d7e9b..b1032e3d9e3 100644 --- a/tests/api_resources/pcaps/test_ownership.py +++ b/tests/api_resources/pcaps/test_ownership.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.pcaps.ownership import Ownership -from cloudflare.types.pcaps.ownership_get_response import OwnershipGetResponse +from cloudflare.types.pcaps import Ownership, OwnershipGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestOwnership: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: ownership = client.pcaps.ownership.create( @@ -27,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Ownership, ownership, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pcaps.ownership.with_raw_response.create( @@ -40,7 +37,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ownership = response.parse() assert_matches_type(Ownership, ownership, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pcaps.ownership.with_streaming_response.create( @@ -55,7 +51,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +59,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: destination_conf="s3://pcaps-bucket?region=us-east-1", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: ownership = client.pcaps.ownership.delete( @@ -73,7 +67,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert ownership is None - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pcaps.ownership.with_raw_response.delete( @@ -86,7 +79,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: ownership = response.parse() assert ownership is None - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pcaps.ownership.with_streaming_response.delete( @@ -101,7 +93,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -116,7 +107,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ownership = client.pcaps.ownership.get( @@ -124,7 +114,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OwnershipGetResponse], ownership, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pcaps.ownership.with_raw_response.get( @@ -136,7 +125,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ownership = response.parse() assert_matches_type(Optional[OwnershipGetResponse], ownership, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pcaps.ownership.with_streaming_response.get( @@ -150,7 +138,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -158,7 +145,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_validate(self, client: Cloudflare) -> None: ownership = client.pcaps.ownership.validate( @@ -168,7 +154,6 @@ def test_method_validate(self, client: Cloudflare) -> None: ) assert_matches_type(Ownership, ownership, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_validate(self, client: Cloudflare) -> None: response = client.pcaps.ownership.with_raw_response.validate( @@ -182,7 +167,6 @@ def test_raw_response_validate(self, client: Cloudflare) -> None: ownership = response.parse() assert_matches_type(Ownership, ownership, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_validate(self, client: Cloudflare) -> None: with client.pcaps.ownership.with_streaming_response.validate( @@ -198,7 +182,6 @@ def test_streaming_response_validate(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_validate(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -212,7 +195,6 @@ def test_path_params_validate(self, client: Cloudflare) -> None: class TestAsyncOwnership: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.pcaps.ownership.create( @@ -221,7 +203,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Ownership, ownership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.ownership.with_raw_response.create( @@ -234,7 +215,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ownership = await response.parse() assert_matches_type(Ownership, ownership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.ownership.with_streaming_response.create( @@ -249,7 +229,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -258,7 +237,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: destination_conf="s3://pcaps-bucket?region=us-east-1", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.pcaps.ownership.delete( @@ -267,7 +245,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert ownership is None - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.ownership.with_raw_response.delete( @@ -280,7 +257,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: ownership = await response.parse() assert ownership is None - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.ownership.with_streaming_response.delete( @@ -295,7 +271,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -310,7 +285,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.pcaps.ownership.get( @@ -318,7 +292,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OwnershipGetResponse], ownership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.ownership.with_raw_response.get( @@ -330,7 +303,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ownership = await response.parse() assert_matches_type(Optional[OwnershipGetResponse], ownership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.ownership.with_streaming_response.get( @@ -344,7 +316,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -352,7 +323,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_validate(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.pcaps.ownership.validate( @@ -362,7 +332,6 @@ async def test_method_validate(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Ownership, ownership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.ownership.with_raw_response.validate( @@ -376,7 +345,6 @@ async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> Non ownership = await response.parse() assert_matches_type(Ownership, ownership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_validate(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.ownership.with_streaming_response.validate( @@ -392,7 +360,6 @@ async def test_streaming_response_validate(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/queues/test_consumers.py b/tests/api_resources/queues/test_consumers.py index 34cfa593ec9..39efe21c453 100644 --- a/tests/api_resources/queues/test_consumers.py +++ b/tests/api_resources/queues/test_consumers.py @@ -9,10 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.queues.consumer_get_response import ConsumerGetResponse -from cloudflare.types.queues.consumer_create_response import ConsumerCreateResponse -from cloudflare.types.queues.consumer_delete_response import ConsumerDeleteResponse -from cloudflare.types.queues.consumer_update_response import ConsumerUpdateResponse +from cloudflare.types.queues import ( + ConsumerGetResponse, + ConsumerCreateResponse, + ConsumerDeleteResponse, + ConsumerUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestConsumers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: consumer = client.queues.consumers.create( @@ -40,7 +41,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.create( @@ -64,7 +64,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: consumer = response.parse() assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.create( @@ -90,7 +89,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -127,7 +125,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: consumer = client.queues.consumers.update( @@ -143,7 +140,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.update( @@ -163,7 +159,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: consumer = response.parse() assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.update( @@ -185,7 +180,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -227,25 +221,21 @@ def test_path_params_update(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: consumer = client.queues.consumers.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[ConsumerDeleteResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -253,14 +243,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: consumer = response.parse() assert_matches_type(Optional[ConsumerDeleteResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -270,7 +258,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -278,7 +265,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): @@ -286,7 +272,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): @@ -294,10 +279,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: consumer = client.queues.consumers.get( @@ -306,7 +289,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ConsumerGetResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.get( @@ -319,7 +301,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: consumer = response.parse() assert_matches_type(Optional[ConsumerGetResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.get( @@ -334,7 +315,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -353,7 +333,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConsumers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.create( @@ -373,7 +352,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.create( @@ -397,7 +375,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: consumer = await response.parse() assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.create( @@ -423,7 +400,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -460,7 +436,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.update( @@ -476,7 +451,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.update( @@ -496,7 +470,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: consumer = await response.parse() assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.update( @@ -518,7 +491,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -560,25 +532,21 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[ConsumerDeleteResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -586,14 +554,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: consumer = await response.parse() assert_matches_type(Optional[ConsumerDeleteResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -603,7 +569,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -611,7 +576,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): @@ -619,7 +583,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): @@ -627,10 +590,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.get( @@ -639,7 +600,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ConsumerGetResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.get( @@ -652,7 +612,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: consumer = await response.parse() assert_matches_type(Optional[ConsumerGetResponse], consumer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.get( @@ -667,7 +626,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/queues/test_messages.py b/tests/api_resources/queues/test_messages.py index e9d079c14c6..709728a1ff1 100644 --- a/tests/api_resources/queues/test_messages.py +++ b/tests/api_resources/queues/test_messages.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.queues.message_ack_response import MessageAckResponse -from cloudflare.types.queues.message_pull_response import MessagePullResponse +from cloudflare.types.queues import MessageAckResponse, MessagePullResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestMessages: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_ack(self, client: Cloudflare) -> None: message = client.queues.messages.ack( @@ -27,7 +25,6 @@ def test_method_ack(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ack_with_all_params(self, client: Cloudflare) -> None: message = client.queues.messages.ack( @@ -61,7 +58,6 @@ def test_method_ack_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ack(self, client: Cloudflare) -> None: response = client.queues.messages.with_raw_response.ack( @@ -74,7 +70,6 @@ def test_raw_response_ack(self, client: Cloudflare) -> None: message = response.parse() assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ack(self, client: Cloudflare) -> None: with client.queues.messages.with_streaming_response.ack( @@ -89,7 +84,6 @@ def test_streaming_response_ack(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_ack(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -104,7 +98,6 @@ def test_path_params_ack(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_pull(self, client: Cloudflare) -> None: message = client.queues.messages.pull( @@ -113,7 +106,6 @@ def test_method_pull(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_pull_with_all_params(self, client: Cloudflare) -> None: message = client.queues.messages.pull( @@ -124,7 +116,6 @@ def test_method_pull_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_pull(self, client: Cloudflare) -> None: response = client.queues.messages.with_raw_response.pull( @@ -137,7 +128,6 @@ def test_raw_response_pull(self, client: Cloudflare) -> None: message = response.parse() assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_pull(self, client: Cloudflare) -> None: with client.queues.messages.with_streaming_response.pull( @@ -152,7 +142,6 @@ def test_streaming_response_pull(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_pull(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -171,7 +160,6 @@ def test_path_params_pull(self, client: Cloudflare) -> None: class TestAsyncMessages: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_ack(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.ack( @@ -180,7 +168,6 @@ async def test_method_ack(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ack_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.ack( @@ -214,7 +201,6 @@ async def test_method_ack_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ack(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.messages.with_raw_response.ack( @@ -227,7 +213,6 @@ async def test_raw_response_ack(self, async_client: AsyncCloudflare) -> None: message = await response.parse() assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ack(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.messages.with_streaming_response.ack( @@ -242,7 +227,6 @@ async def test_streaming_response_ack(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_ack(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -257,7 +241,6 @@ async def test_path_params_ack(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_pull(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.pull( @@ -266,7 +249,6 @@ async def test_method_pull(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_pull_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.pull( @@ -277,7 +259,6 @@ async def test_method_pull_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_pull(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.messages.with_raw_response.pull( @@ -290,7 +271,6 @@ async def test_raw_response_pull(self, async_client: AsyncCloudflare) -> None: message = await response.parse() assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_pull(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.messages.with_streaming_response.pull( @@ -305,7 +285,6 @@ async def test_streaming_response_pull(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_pull(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/r2/test_buckets.py b/tests/api_resources/r2/test_buckets.py index 86527042892..956a75d7441 100644 --- a/tests/api_resources/r2/test_buckets.py +++ b/tests/api_resources/r2/test_buckets.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types.r2 import Bucket from cloudflare.pagination import SyncCursorPagination, AsyncCursorPagination -from cloudflare.types.r2.bucket import Bucket base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestBuckets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: bucket = client.r2.buckets.create( @@ -27,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: bucket = client.r2.buckets.create( @@ -37,7 +35,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.r2.buckets.with_raw_response.create( @@ -50,7 +47,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: bucket = response.parse() assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.r2.buckets.with_streaming_response.create( @@ -65,7 +61,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -74,7 +69,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="example-bucket", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: bucket = client.r2.buckets.list( @@ -82,7 +76,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncCursorPagination[Bucket], bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: bucket = client.r2.buckets.list( @@ -96,7 +89,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncCursorPagination[Bucket], bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.r2.buckets.with_raw_response.list( @@ -108,7 +100,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: bucket = response.parse() assert_matches_type(SyncCursorPagination[Bucket], bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.r2.buckets.with_streaming_response.list( @@ -122,7 +113,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -130,7 +120,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: bucket = client.r2.buckets.delete( @@ -139,7 +128,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(object, bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.r2.buckets.with_raw_response.delete( @@ -152,7 +140,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: bucket = response.parse() assert_matches_type(object, bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.r2.buckets.with_streaming_response.delete( @@ -167,7 +154,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -182,7 +168,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bucket = client.r2.buckets.get( @@ -191,7 +176,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.r2.buckets.with_raw_response.get( @@ -204,7 +188,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: bucket = response.parse() assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.r2.buckets.with_streaming_response.get( @@ -219,7 +202,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -238,7 +220,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBuckets: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.create( @@ -247,7 +228,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.create( @@ -257,7 +237,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.buckets.with_raw_response.create( @@ -270,7 +249,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: bucket = await response.parse() assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.buckets.with_streaming_response.create( @@ -285,7 +263,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -294,7 +271,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="example-bucket", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.list( @@ -302,7 +278,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncCursorPagination[Bucket], bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.list( @@ -316,7 +291,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncCursorPagination[Bucket], bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.buckets.with_raw_response.list( @@ -328,7 +302,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: bucket = await response.parse() assert_matches_type(AsyncCursorPagination[Bucket], bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.buckets.with_streaming_response.list( @@ -342,7 +315,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -350,7 +322,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.delete( @@ -359,7 +330,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(object, bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.buckets.with_raw_response.delete( @@ -372,7 +342,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: bucket = await response.parse() assert_matches_type(object, bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.buckets.with_streaming_response.delete( @@ -387,7 +356,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -402,7 +370,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.get( @@ -411,7 +378,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.buckets.with_raw_response.get( @@ -424,7 +390,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: bucket = await response.parse() assert_matches_type(Bucket, bucket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.buckets.with_streaming_response.get( @@ -439,7 +404,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/r2/test_sippy.py b/tests/api_resources/r2/test_sippy.py index 28ea8a332f9..b3005ce3cc9 100644 --- a/tests/api_resources/r2/test_sippy.py +++ b/tests/api_resources/r2/test_sippy.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.r2.sippy import Sippy -from cloudflare.types.r2.sippy_delete_response import SippyDeleteResponse +from cloudflare.types.r2 import Sippy, SippyDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestSippy: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( @@ -27,7 +25,6 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( @@ -48,7 +45,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.update( @@ -61,7 +57,6 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: sippy = response.parse() assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.update( @@ -76,7 +71,6 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -91,7 +85,6 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( @@ -100,7 +93,6 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( @@ -120,7 +112,6 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.update( @@ -133,7 +124,6 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: sippy = response.parse() assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.update( @@ -148,7 +138,6 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -163,7 +152,6 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: sippy = client.r2.sippy.delete( @@ -172,7 +160,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(SippyDeleteResponse, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.delete( @@ -185,7 +172,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: sippy = response.parse() assert_matches_type(SippyDeleteResponse, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.delete( @@ -200,7 +186,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -215,7 +200,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: sippy = client.r2.sippy.get( @@ -224,7 +208,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.get( @@ -237,7 +220,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: sippy = response.parse() assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.get( @@ -252,7 +234,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -271,7 +252,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSippy: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( @@ -280,7 +260,6 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( @@ -301,7 +280,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.update( @@ -314,7 +292,6 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar sippy = await response.parse() assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.update( @@ -329,7 +306,6 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -344,7 +320,6 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( @@ -353,7 +328,6 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( @@ -373,7 +347,6 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.update( @@ -386,7 +359,6 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar sippy = await response.parse() assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.update( @@ -401,7 +373,6 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -416,7 +387,6 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.delete( @@ -425,7 +395,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SippyDeleteResponse, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.delete( @@ -438,7 +407,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: sippy = await response.parse() assert_matches_type(SippyDeleteResponse, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.delete( @@ -453,7 +421,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -468,7 +435,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.get( @@ -477,7 +443,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.get( @@ -490,7 +455,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: sippy = await response.parse() assert_matches_type(Sippy, sippy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.get( @@ -505,7 +469,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/radar/annotations/test_outages.py b/tests/api_resources/radar/annotations/test_outages.py index 6e01d1086b1..f249d7e3c89 100644 --- a/tests/api_resources/radar/annotations/test_outages.py +++ b/tests/api_resources/radar/annotations/test_outages.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.annotations.outage_get_response import OutageGetResponse -from cloudflare.types.radar.annotations.outage_locations_response import OutageLocationsResponse +from cloudflare.types.radar.annotations import ( + OutageGetResponse, + OutageLocationsResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,17 +21,15 @@ class TestOutages: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: outage = client.radar.annotations.outages.get() assert_matches_type(OutageGetResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: outage = client.radar.annotations.outages.get( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), @@ -40,7 +40,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(OutageGetResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.annotations.outages.with_raw_response.get() @@ -50,7 +49,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: outage = response.parse() assert_matches_type(OutageGetResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.annotations.outages.with_streaming_response.get() as response: @@ -62,13 +60,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_locations(self, client: Cloudflare) -> None: outage = client.radar.annotations.outages.locations() assert_matches_type(OutageLocationsResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_locations_with_all_params(self, client: Cloudflare) -> None: outage = client.radar.annotations.outages.locations( @@ -80,7 +76,6 @@ def test_method_locations_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(OutageLocationsResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_locations(self, client: Cloudflare) -> None: response = client.radar.annotations.outages.with_raw_response.locations() @@ -90,7 +85,6 @@ def test_raw_response_locations(self, client: Cloudflare) -> None: outage = response.parse() assert_matches_type(OutageLocationsResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_locations(self, client: Cloudflare) -> None: with client.radar.annotations.outages.with_streaming_response.locations() as response: @@ -106,17 +100,15 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncOutages: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: outage = await async_client.radar.annotations.outages.get() assert_matches_type(OutageGetResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: outage = await async_client.radar.annotations.outages.get( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), @@ -127,7 +119,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(OutageGetResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.annotations.outages.with_raw_response.get() @@ -137,7 +128,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: outage = await response.parse() assert_matches_type(OutageGetResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.annotations.outages.with_streaming_response.get() as response: @@ -149,13 +139,11 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_locations(self, async_client: AsyncCloudflare) -> None: outage = await async_client.radar.annotations.outages.locations() assert_matches_type(OutageLocationsResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_locations_with_all_params(self, async_client: AsyncCloudflare) -> None: outage = await async_client.radar.annotations.outages.locations( @@ -167,7 +155,6 @@ async def test_method_locations_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(OutageLocationsResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.annotations.outages.with_raw_response.locations() @@ -177,7 +164,6 @@ async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> No outage = await response.parse() assert_matches_type(OutageLocationsResponse, outage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_locations(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.annotations.outages.with_streaming_response.locations() as response: diff --git a/tests/api_resources/radar/as112/test_summary.py b/tests/api_resources/radar/as112/test_summary.py index 0f5c33d4dda..13d0bdbf800 100644 --- a/tests/api_resources/radar/as112/test_summary.py +++ b/tests/api_resources/radar/as112/test_summary.py @@ -10,12 +10,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.as112.summary_edns_response import SummaryEdnsResponse -from cloudflare.types.radar.as112.summary_dnssec_response import SummaryDNSSECResponse -from cloudflare.types.radar.as112.summary_protocol_response import SummaryProtocolResponse -from cloudflare.types.radar.as112.summary_ip_version_response import SummaryIPVersionResponse -from cloudflare.types.radar.as112.summary_query_type_response import SummaryQueryTypeResponse -from cloudflare.types.radar.as112.summary_response_codes_response import SummaryResponseCodesResponse +from cloudflare.types.radar.as112 import ( + SummaryEdnsResponse, + SummaryDNSSECResponse, + SummaryProtocolResponse, + SummaryIPVersionResponse, + SummaryQueryTypeResponse, + SummaryResponseCodesResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,13 +25,11 @@ class TestSummary: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_dnssec(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.dnssec() assert_matches_type(SummaryDNSSECResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.dnssec( @@ -52,7 +52,6 @@ def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryDNSSECResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dnssec(self, client: Cloudflare) -> None: response = client.radar.as112.summary.with_raw_response.dnssec() @@ -62,7 +61,6 @@ def test_raw_response_dnssec(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryDNSSECResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dnssec(self, client: Cloudflare) -> None: with client.radar.as112.summary.with_streaming_response.dnssec() as response: @@ -74,13 +72,11 @@ def test_streaming_response_dnssec(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_edns(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.edns() assert_matches_type(SummaryEdnsResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edns_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.edns( @@ -103,7 +99,6 @@ def test_method_edns_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryEdnsResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edns(self, client: Cloudflare) -> None: response = client.radar.as112.summary.with_raw_response.edns() @@ -113,7 +108,6 @@ def test_raw_response_edns(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryEdnsResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edns(self, client: Cloudflare) -> None: with client.radar.as112.summary.with_streaming_response.edns() as response: @@ -125,13 +119,11 @@ def test_streaming_response_edns(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.ip_version( @@ -154,7 +146,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.as112.summary.with_raw_response.ip_version() @@ -164,7 +155,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.as112.summary.with_streaming_response.ip_version() as response: @@ -176,13 +166,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_protocol(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.protocol() assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.protocol( @@ -205,7 +193,6 @@ def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_protocol(self, client: Cloudflare) -> None: response = client.radar.as112.summary.with_raw_response.protocol() @@ -215,7 +202,6 @@ def test_raw_response_protocol(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_protocol(self, client: Cloudflare) -> None: with client.radar.as112.summary.with_streaming_response.protocol() as response: @@ -227,13 +213,11 @@ def test_streaming_response_protocol(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_query_type(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.query_type() assert_matches_type(SummaryQueryTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_query_type_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.query_type( @@ -256,7 +240,6 @@ def test_method_query_type_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryQueryTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_query_type(self, client: Cloudflare) -> None: response = client.radar.as112.summary.with_raw_response.query_type() @@ -266,7 +249,6 @@ def test_raw_response_query_type(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryQueryTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_query_type(self, client: Cloudflare) -> None: with client.radar.as112.summary.with_streaming_response.query_type() as response: @@ -278,13 +260,11 @@ def test_streaming_response_query_type(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_response_codes(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.response_codes() assert_matches_type(SummaryResponseCodesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.as112.summary.response_codes( @@ -307,7 +287,6 @@ def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None ) assert_matches_type(SummaryResponseCodesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_response_codes(self, client: Cloudflare) -> None: response = client.radar.as112.summary.with_raw_response.response_codes() @@ -317,7 +296,6 @@ def test_raw_response_response_codes(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryResponseCodesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_response_codes(self, client: Cloudflare) -> None: with client.radar.as112.summary.with_streaming_response.response_codes() as response: @@ -333,13 +311,11 @@ def test_streaming_response_response_codes(self, client: Cloudflare) -> None: class TestAsyncSummary: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.dnssec() assert_matches_type(SummaryDNSSECResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.dnssec( @@ -362,7 +338,6 @@ async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(SummaryDNSSECResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.summary.with_raw_response.dnssec() @@ -372,7 +347,6 @@ async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryDNSSECResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.summary.with_streaming_response.dnssec() as response: @@ -384,13 +358,11 @@ async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_edns(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.edns() assert_matches_type(SummaryEdnsResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.edns( @@ -413,7 +385,6 @@ async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(SummaryEdnsResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.summary.with_raw_response.edns() @@ -423,7 +394,6 @@ async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryEdnsResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.summary.with_streaming_response.edns() as response: @@ -435,13 +405,11 @@ async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.ip_version( @@ -464,7 +432,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.summary.with_raw_response.ip_version() @@ -474,7 +441,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N summary = await response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.summary.with_streaming_response.ip_version() as response: @@ -486,13 +452,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_protocol(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.protocol() assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.protocol( @@ -515,7 +479,6 @@ async def test_method_protocol_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_protocol(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.summary.with_raw_response.protocol() @@ -525,7 +488,6 @@ async def test_raw_response_protocol(self, async_client: AsyncCloudflare) -> Non summary = await response.parse() assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_protocol(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.summary.with_streaming_response.protocol() as response: @@ -537,13 +499,11 @@ async def test_streaming_response_protocol(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_query_type(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.query_type() assert_matches_type(SummaryQueryTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_query_type_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.query_type( @@ -566,7 +526,6 @@ async def test_method_query_type_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(SummaryQueryTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_query_type(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.summary.with_raw_response.query_type() @@ -576,7 +535,6 @@ async def test_raw_response_query_type(self, async_client: AsyncCloudflare) -> N summary = await response.parse() assert_matches_type(SummaryQueryTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_query_type(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.summary.with_streaming_response.query_type() as response: @@ -588,13 +546,11 @@ async def test_streaming_response_query_type(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_response_codes(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.response_codes() assert_matches_type(SummaryResponseCodesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_response_codes_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.as112.summary.response_codes( @@ -617,7 +573,6 @@ async def test_method_response_codes_with_all_params(self, async_client: AsyncCl ) assert_matches_type(SummaryResponseCodesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_response_codes(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.summary.with_raw_response.response_codes() @@ -627,7 +582,6 @@ async def test_raw_response_response_codes(self, async_client: AsyncCloudflare) summary = await response.parse() assert_matches_type(SummaryResponseCodesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_response_codes(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.summary.with_streaming_response.response_codes() as response: diff --git a/tests/api_resources/radar/as112/test_timeseries_groups.py b/tests/api_resources/radar/as112/test_timeseries_groups.py index 1d58cb77806..38ec1d21891 100644 --- a/tests/api_resources/radar/as112/test_timeseries_groups.py +++ b/tests/api_resources/radar/as112/test_timeseries_groups.py @@ -10,12 +10,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.as112.timeseries_group_edns_response import TimeseriesGroupEdnsResponse -from cloudflare.types.radar.as112.timeseries_group_dnssec_response import TimeseriesGroupDNSSECResponse -from cloudflare.types.radar.as112.timeseries_group_protocol_response import TimeseriesGroupProtocolResponse -from cloudflare.types.radar.as112.timeseries_group_ip_version_response import TimeseriesGroupIPVersionResponse -from cloudflare.types.radar.as112.timeseries_group_query_type_response import TimeseriesGroupQueryTypeResponse -from cloudflare.types.radar.as112.timeseries_group_response_codes_response import TimeseriesGroupResponseCodesResponse +from cloudflare.types.radar.as112 import ( + TimeseriesGroupEdnsResponse, + TimeseriesGroupDNSSECResponse, + TimeseriesGroupProtocolResponse, + TimeseriesGroupIPVersionResponse, + TimeseriesGroupQueryTypeResponse, + TimeseriesGroupResponseCodesResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,13 +25,11 @@ class TestTimeseriesGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_dnssec(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.dnssec() assert_matches_type(TimeseriesGroupDNSSECResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.dnssec( @@ -53,7 +53,6 @@ def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupDNSSECResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dnssec(self, client: Cloudflare) -> None: response = client.radar.as112.timeseries_groups.with_raw_response.dnssec() @@ -63,7 +62,6 @@ def test_raw_response_dnssec(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupDNSSECResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dnssec(self, client: Cloudflare) -> None: with client.radar.as112.timeseries_groups.with_streaming_response.dnssec() as response: @@ -75,13 +73,11 @@ def test_streaming_response_dnssec(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_edns(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.edns() assert_matches_type(TimeseriesGroupEdnsResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edns_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.edns( @@ -105,7 +101,6 @@ def test_method_edns_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupEdnsResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edns(self, client: Cloudflare) -> None: response = client.radar.as112.timeseries_groups.with_raw_response.edns() @@ -115,7 +110,6 @@ def test_raw_response_edns(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupEdnsResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edns(self, client: Cloudflare) -> None: with client.radar.as112.timeseries_groups.with_streaming_response.edns() as response: @@ -127,13 +121,11 @@ def test_streaming_response_edns(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.ip_version( @@ -157,7 +149,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.as112.timeseries_groups.with_raw_response.ip_version() @@ -167,7 +158,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.as112.timeseries_groups.with_streaming_response.ip_version() as response: @@ -179,13 +169,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_protocol(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.protocol() assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.protocol( @@ -209,7 +197,6 @@ def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_protocol(self, client: Cloudflare) -> None: response = client.radar.as112.timeseries_groups.with_raw_response.protocol() @@ -219,7 +206,6 @@ def test_raw_response_protocol(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_protocol(self, client: Cloudflare) -> None: with client.radar.as112.timeseries_groups.with_streaming_response.protocol() as response: @@ -231,13 +217,11 @@ def test_streaming_response_protocol(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_query_type(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.query_type() assert_matches_type(TimeseriesGroupQueryTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_query_type_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.query_type( @@ -261,7 +245,6 @@ def test_method_query_type_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupQueryTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_query_type(self, client: Cloudflare) -> None: response = client.radar.as112.timeseries_groups.with_raw_response.query_type() @@ -271,7 +254,6 @@ def test_raw_response_query_type(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupQueryTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_query_type(self, client: Cloudflare) -> None: with client.radar.as112.timeseries_groups.with_streaming_response.query_type() as response: @@ -283,13 +265,11 @@ def test_streaming_response_query_type(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_response_codes(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.response_codes() assert_matches_type(TimeseriesGroupResponseCodesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.as112.timeseries_groups.response_codes( @@ -313,7 +293,6 @@ def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None ) assert_matches_type(TimeseriesGroupResponseCodesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_response_codes(self, client: Cloudflare) -> None: response = client.radar.as112.timeseries_groups.with_raw_response.response_codes() @@ -323,7 +302,6 @@ def test_raw_response_response_codes(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupResponseCodesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_response_codes(self, client: Cloudflare) -> None: with client.radar.as112.timeseries_groups.with_streaming_response.response_codes() as response: @@ -339,13 +317,11 @@ def test_streaming_response_response_codes(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.dnssec() assert_matches_type(TimeseriesGroupDNSSECResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.dnssec( @@ -369,7 +345,6 @@ async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(TimeseriesGroupDNSSECResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.timeseries_groups.with_raw_response.dnssec() @@ -379,7 +354,6 @@ async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupDNSSECResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.timeseries_groups.with_streaming_response.dnssec() as response: @@ -391,13 +365,11 @@ async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_edns(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.edns() assert_matches_type(TimeseriesGroupEdnsResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.edns( @@ -421,7 +393,6 @@ async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TimeseriesGroupEdnsResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.timeseries_groups.with_raw_response.edns() @@ -431,7 +402,6 @@ async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupEdnsResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.timeseries_groups.with_streaming_response.edns() as response: @@ -443,13 +413,11 @@ async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.ip_version( @@ -473,7 +441,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.timeseries_groups.with_raw_response.ip_version() @@ -483,7 +450,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.timeseries_groups.with_streaming_response.ip_version() as response: @@ -495,13 +461,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_protocol(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.protocol() assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.protocol( @@ -525,7 +489,6 @@ async def test_method_protocol_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_protocol(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.timeseries_groups.with_raw_response.protocol() @@ -535,7 +498,6 @@ async def test_raw_response_protocol(self, async_client: AsyncCloudflare) -> Non timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_protocol(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.timeseries_groups.with_streaming_response.protocol() as response: @@ -547,13 +509,11 @@ async def test_streaming_response_protocol(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_query_type(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.query_type() assert_matches_type(TimeseriesGroupQueryTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_query_type_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.query_type( @@ -577,7 +537,6 @@ async def test_method_query_type_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(TimeseriesGroupQueryTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_query_type(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.timeseries_groups.with_raw_response.query_type() @@ -587,7 +546,6 @@ async def test_raw_response_query_type(self, async_client: AsyncCloudflare) -> N timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupQueryTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_query_type(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.timeseries_groups.with_streaming_response.query_type() as response: @@ -599,13 +557,11 @@ async def test_streaming_response_query_type(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_response_codes(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.response_codes() assert_matches_type(TimeseriesGroupResponseCodesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_response_codes_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.as112.timeseries_groups.response_codes( @@ -629,7 +585,6 @@ async def test_method_response_codes_with_all_params(self, async_client: AsyncCl ) assert_matches_type(TimeseriesGroupResponseCodesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_response_codes(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.timeseries_groups.with_raw_response.response_codes() @@ -639,7 +594,6 @@ async def test_raw_response_response_codes(self, async_client: AsyncCloudflare) timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupResponseCodesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_response_codes(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.timeseries_groups.with_streaming_response.response_codes() as response: diff --git a/tests/api_resources/radar/as112/test_top.py b/tests/api_resources/radar/as112/test_top.py index 8b96e7e9fbe..81ffe5314d8 100644 --- a/tests/api_resources/radar/as112/test_top.py +++ b/tests/api_resources/radar/as112/test_top.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.as112.top_edns_response import TopEdnsResponse -from cloudflare.types.radar.as112.top_dnssec_response import TopDNSSECResponse -from cloudflare.types.radar.as112.top_locations_response import TopLocationsResponse -from cloudflare.types.radar.as112.top_ip_version_response import TopIPVersionResponse +from cloudflare.types.radar.as112 import ( + TopEdnsResponse, + TopDNSSECResponse, + TopIPVersionResponse, + TopLocationsResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestTop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_dnssec(self, client: Cloudflare) -> None: top = client.radar.as112.top.dnssec( @@ -29,7 +30,6 @@ def test_method_dnssec(self, client: Cloudflare) -> None: ) assert_matches_type(TopDNSSECResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.dnssec( @@ -54,7 +54,6 @@ def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopDNSSECResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dnssec(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.dnssec( @@ -66,7 +65,6 @@ def test_raw_response_dnssec(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopDNSSECResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dnssec(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.dnssec( @@ -80,7 +78,6 @@ def test_streaming_response_dnssec(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_edns(self, client: Cloudflare) -> None: top = client.radar.as112.top.edns( @@ -88,7 +85,6 @@ def test_method_edns(self, client: Cloudflare) -> None: ) assert_matches_type(TopEdnsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edns_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.edns( @@ -113,7 +109,6 @@ def test_method_edns_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopEdnsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edns(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.edns( @@ -125,7 +120,6 @@ def test_raw_response_edns(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopEdnsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edns(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.edns( @@ -139,7 +133,6 @@ def test_streaming_response_edns(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: top = client.radar.as112.top.ip_version( @@ -147,7 +140,6 @@ def test_method_ip_version(self, client: Cloudflare) -> None: ) assert_matches_type(TopIPVersionResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.ip_version( @@ -172,7 +164,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopIPVersionResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.ip_version( @@ -184,7 +175,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopIPVersionResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.ip_version( @@ -198,13 +188,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_locations(self, client: Cloudflare) -> None: top = client.radar.as112.top.locations() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_locations_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.locations( @@ -228,7 +216,6 @@ def test_method_locations_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_locations(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.locations() @@ -238,7 +225,6 @@ def test_raw_response_locations(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_locations(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.locations() as response: @@ -254,7 +240,6 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.dnssec( @@ -262,7 +247,6 @@ async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TopDNSSECResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.dnssec( @@ -287,7 +271,6 @@ async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(TopDNSSECResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.dnssec( @@ -299,7 +282,6 @@ async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: top = await response.parse() assert_matches_type(TopDNSSECResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.dnssec( @@ -313,7 +295,6 @@ async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_edns(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.edns( @@ -321,7 +302,6 @@ async def test_method_edns(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TopEdnsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.edns( @@ -346,7 +326,6 @@ async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TopEdnsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.edns( @@ -358,7 +337,6 @@ async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: top = await response.parse() assert_matches_type(TopEdnsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.edns( @@ -372,7 +350,6 @@ async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.ip_version( @@ -380,7 +357,6 @@ async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TopIPVersionResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.ip_version( @@ -405,7 +381,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(TopIPVersionResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.ip_version( @@ -417,7 +392,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N top = await response.parse() assert_matches_type(TopIPVersionResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.ip_version( @@ -431,13 +405,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_locations(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.locations() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_locations_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.locations( @@ -461,7 +433,6 @@ async def test_method_locations_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.locations() @@ -471,7 +442,6 @@ async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> No top = await response.parse() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_locations(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.locations() as response: diff --git a/tests/api_resources/radar/attacks/layer3/test_summary.py b/tests/api_resources/radar/attacks/layer3/test_summary.py index 82a2922ffb2..4b0fa3e5290 100644 --- a/tests/api_resources/radar/attacks/layer3/test_summary.py +++ b/tests/api_resources/radar/attacks/layer3/test_summary.py @@ -10,12 +10,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer3.summary_get_response import SummaryGetResponse -from cloudflare.types.radar.attacks.layer3.summary_vector_response import SummaryVectorResponse -from cloudflare.types.radar.attacks.layer3.summary_bitrate_response import SummaryBitrateResponse -from cloudflare.types.radar.attacks.layer3.summary_duration_response import SummaryDurationResponse -from cloudflare.types.radar.attacks.layer3.summary_protocol_response import SummaryProtocolResponse -from cloudflare.types.radar.attacks.layer3.summary_ip_version_response import SummaryIPVersionResponse +from cloudflare.types.radar.attacks.layer3 import ( + SummaryGetResponse, + SummaryVectorResponse, + SummaryBitrateResponse, + SummaryDurationResponse, + SummaryProtocolResponse, + SummaryIPVersionResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,13 +25,11 @@ class TestSummary: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_bitrate(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.bitrate() assert_matches_type(SummaryBitrateResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_bitrate_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.bitrate( @@ -54,7 +54,6 @@ def test_method_bitrate_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryBitrateResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_bitrate(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.summary.with_raw_response.bitrate() @@ -64,7 +63,6 @@ def test_raw_response_bitrate(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryBitrateResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_bitrate(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.summary.with_streaming_response.bitrate() as response: @@ -76,13 +74,11 @@ def test_streaming_response_bitrate(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_duration(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.duration() assert_matches_type(SummaryDurationResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_duration_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.duration( @@ -107,7 +103,6 @@ def test_method_duration_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryDurationResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_duration(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.summary.with_raw_response.duration() @@ -117,7 +112,6 @@ def test_raw_response_duration(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryDurationResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_duration(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.summary.with_streaming_response.duration() as response: @@ -129,13 +123,11 @@ def test_streaming_response_duration(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.get() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.get( @@ -158,7 +150,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.summary.with_raw_response.get() @@ -168,7 +159,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.summary.with_streaming_response.get() as response: @@ -180,13 +170,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.ip_version( @@ -210,7 +198,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.summary.with_raw_response.ip_version() @@ -220,7 +207,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.summary.with_streaming_response.ip_version() as response: @@ -232,13 +218,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_protocol(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.protocol() assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.protocol( @@ -262,7 +246,6 @@ def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_protocol(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.summary.with_raw_response.protocol() @@ -272,7 +255,6 @@ def test_raw_response_protocol(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_protocol(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.summary.with_streaming_response.protocol() as response: @@ -284,13 +266,11 @@ def test_streaming_response_protocol(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_vector(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.vector() assert_matches_type(SummaryVectorResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_vector_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer3.summary.vector( @@ -315,7 +295,6 @@ def test_method_vector_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryVectorResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_vector(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.summary.with_raw_response.vector() @@ -325,7 +304,6 @@ def test_raw_response_vector(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryVectorResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_vector(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.summary.with_streaming_response.vector() as response: @@ -341,13 +319,11 @@ def test_streaming_response_vector(self, client: Cloudflare) -> None: class TestAsyncSummary: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_bitrate(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.bitrate() assert_matches_type(SummaryBitrateResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_bitrate_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.bitrate( @@ -372,7 +348,6 @@ async def test_method_bitrate_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(SummaryBitrateResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_bitrate(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.summary.with_raw_response.bitrate() @@ -382,7 +357,6 @@ async def test_raw_response_bitrate(self, async_client: AsyncCloudflare) -> None summary = await response.parse() assert_matches_type(SummaryBitrateResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_bitrate(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.summary.with_streaming_response.bitrate() as response: @@ -394,13 +368,11 @@ async def test_streaming_response_bitrate(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_duration(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.duration() assert_matches_type(SummaryDurationResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_duration_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.duration( @@ -425,7 +397,6 @@ async def test_method_duration_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(SummaryDurationResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_duration(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.summary.with_raw_response.duration() @@ -435,7 +406,6 @@ async def test_raw_response_duration(self, async_client: AsyncCloudflare) -> Non summary = await response.parse() assert_matches_type(SummaryDurationResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_duration(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.summary.with_streaming_response.duration() as response: @@ -447,13 +417,11 @@ async def test_streaming_response_duration(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.get() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.get( @@ -476,7 +444,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.summary.with_raw_response.get() @@ -486,7 +453,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.summary.with_streaming_response.get() as response: @@ -498,13 +464,11 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.ip_version( @@ -528,7 +492,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.summary.with_raw_response.ip_version() @@ -538,7 +501,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N summary = await response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.summary.with_streaming_response.ip_version() as response: @@ -550,13 +512,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_protocol(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.protocol() assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.protocol( @@ -580,7 +540,6 @@ async def test_method_protocol_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_protocol(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.summary.with_raw_response.protocol() @@ -590,7 +549,6 @@ async def test_raw_response_protocol(self, async_client: AsyncCloudflare) -> Non summary = await response.parse() assert_matches_type(SummaryProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_protocol(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.summary.with_streaming_response.protocol() as response: @@ -602,13 +560,11 @@ async def test_streaming_response_protocol(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_vector(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.vector() assert_matches_type(SummaryVectorResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer3.summary.vector( @@ -633,7 +589,6 @@ async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(SummaryVectorResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_vector(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.summary.with_raw_response.vector() @@ -643,7 +598,6 @@ async def test_raw_response_vector(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryVectorResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_vector(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.summary.with_streaming_response.vector() as response: diff --git a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py index 02d5501344c..1dd04286948 100644 --- a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py @@ -10,14 +10,16 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer3.timeseries_group_get_response import TimeseriesGroupGetResponse -from cloudflare.types.radar.attacks.layer3.timeseries_group_vector_response import TimeseriesGroupVectorResponse -from cloudflare.types.radar.attacks.layer3.timeseries_group_bitrate_response import TimeseriesGroupBitrateResponse -from cloudflare.types.radar.attacks.layer3.timeseries_group_duration_response import TimeseriesGroupDurationResponse -from cloudflare.types.radar.attacks.layer3.timeseries_group_industry_response import TimeseriesGroupIndustryResponse -from cloudflare.types.radar.attacks.layer3.timeseries_group_protocol_response import TimeseriesGroupProtocolResponse -from cloudflare.types.radar.attacks.layer3.timeseries_group_vertical_response import TimeseriesGroupVerticalResponse -from cloudflare.types.radar.attacks.layer3.timeseries_group_ip_version_response import TimeseriesGroupIPVersionResponse +from cloudflare.types.radar.attacks.layer3 import ( + TimeseriesGroupGetResponse, + TimeseriesGroupVectorResponse, + TimeseriesGroupBitrateResponse, + TimeseriesGroupDurationResponse, + TimeseriesGroupIndustryResponse, + TimeseriesGroupProtocolResponse, + TimeseriesGroupVerticalResponse, + TimeseriesGroupIPVersionResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,13 +27,11 @@ class TestTimeseriesGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_bitrate(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.bitrate() assert_matches_type(TimeseriesGroupBitrateResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_bitrate_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.bitrate( @@ -58,7 +58,6 @@ def test_method_bitrate_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupBitrateResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_bitrate(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.timeseries_groups.with_raw_response.bitrate() @@ -68,7 +67,6 @@ def test_raw_response_bitrate(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupBitrateResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_bitrate(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.timeseries_groups.with_streaming_response.bitrate() as response: @@ -80,13 +78,11 @@ def test_streaming_response_bitrate(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_duration(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.duration() assert_matches_type(TimeseriesGroupDurationResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_duration_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.duration( @@ -113,7 +109,6 @@ def test_method_duration_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupDurationResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_duration(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.timeseries_groups.with_raw_response.duration() @@ -123,7 +118,6 @@ def test_raw_response_duration(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupDurationResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_duration(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.timeseries_groups.with_streaming_response.duration() as response: @@ -135,13 +129,11 @@ def test_streaming_response_duration(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.get() assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.get( @@ -165,7 +157,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.timeseries_groups.with_raw_response.get() @@ -175,7 +166,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.timeseries_groups.with_streaming_response.get() as response: @@ -187,13 +177,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_industry(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.industry() assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_industry_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.industry( @@ -220,7 +208,6 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_industry(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.timeseries_groups.with_raw_response.industry() @@ -230,7 +217,6 @@ def test_raw_response_industry(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_industry(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.timeseries_groups.with_streaming_response.industry() as response: @@ -242,13 +228,11 @@ def test_streaming_response_industry(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.ip_version( @@ -274,7 +258,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.timeseries_groups.with_raw_response.ip_version() @@ -284,7 +267,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.timeseries_groups.with_streaming_response.ip_version() as response: @@ -296,13 +278,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_protocol(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.protocol() assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.protocol( @@ -328,7 +308,6 @@ def test_method_protocol_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_protocol(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.timeseries_groups.with_raw_response.protocol() @@ -338,7 +317,6 @@ def test_raw_response_protocol(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_protocol(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.timeseries_groups.with_streaming_response.protocol() as response: @@ -350,13 +328,11 @@ def test_streaming_response_protocol(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_vector(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.vector() assert_matches_type(TimeseriesGroupVectorResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_vector_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.vector( @@ -384,7 +360,6 @@ def test_method_vector_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupVectorResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_vector(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.timeseries_groups.with_raw_response.vector() @@ -394,7 +369,6 @@ def test_raw_response_vector(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupVectorResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_vector(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.timeseries_groups.with_streaming_response.vector() as response: @@ -406,13 +380,11 @@ def test_streaming_response_vector(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_vertical(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.vertical() assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer3.timeseries_groups.vertical( @@ -439,7 +411,6 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_vertical(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.timeseries_groups.with_raw_response.vertical() @@ -449,7 +420,6 @@ def test_raw_response_vertical(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_vertical(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.timeseries_groups.with_streaming_response.vertical() as response: @@ -465,13 +435,11 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_bitrate(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.bitrate() assert_matches_type(TimeseriesGroupBitrateResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_bitrate_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.bitrate( @@ -498,7 +466,6 @@ async def test_method_bitrate_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(TimeseriesGroupBitrateResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_bitrate(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.timeseries_groups.with_raw_response.bitrate() @@ -508,7 +475,6 @@ async def test_raw_response_bitrate(self, async_client: AsyncCloudflare) -> None timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupBitrateResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_bitrate(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.timeseries_groups.with_streaming_response.bitrate() as response: @@ -520,13 +486,11 @@ async def test_streaming_response_bitrate(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_duration(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.duration() assert_matches_type(TimeseriesGroupDurationResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_duration_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.duration( @@ -553,7 +517,6 @@ async def test_method_duration_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TimeseriesGroupDurationResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_duration(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.timeseries_groups.with_raw_response.duration() @@ -563,7 +526,6 @@ async def test_raw_response_duration(self, async_client: AsyncCloudflare) -> Non timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupDurationResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_duration(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.timeseries_groups.with_streaming_response.duration() as response: @@ -575,13 +537,11 @@ async def test_streaming_response_duration(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.get() assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.get( @@ -605,7 +565,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.timeseries_groups.with_raw_response.get() @@ -615,7 +574,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.timeseries_groups.with_streaming_response.get() as response: @@ -627,13 +585,11 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_industry(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.industry() assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_industry_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.industry( @@ -660,7 +616,6 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_industry(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.timeseries_groups.with_raw_response.industry() @@ -670,7 +625,6 @@ async def test_raw_response_industry(self, async_client: AsyncCloudflare) -> Non timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_industry(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.timeseries_groups.with_streaming_response.industry() as response: @@ -682,13 +636,11 @@ async def test_streaming_response_industry(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.ip_version( @@ -714,7 +666,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.timeseries_groups.with_raw_response.ip_version() @@ -724,7 +675,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.timeseries_groups.with_streaming_response.ip_version() as response: @@ -736,13 +686,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_protocol(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.protocol() assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.protocol( @@ -768,7 +716,6 @@ async def test_method_protocol_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_protocol(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.timeseries_groups.with_raw_response.protocol() @@ -778,7 +725,6 @@ async def test_raw_response_protocol(self, async_client: AsyncCloudflare) -> Non timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_protocol(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.timeseries_groups.with_streaming_response.protocol() as response: @@ -790,13 +736,11 @@ async def test_streaming_response_protocol(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_vector(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.vector() assert_matches_type(TimeseriesGroupVectorResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.vector( @@ -824,7 +768,6 @@ async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(TimeseriesGroupVectorResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_vector(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.timeseries_groups.with_raw_response.vector() @@ -834,7 +777,6 @@ async def test_raw_response_vector(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupVectorResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_vector(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.timeseries_groups.with_streaming_response.vector() as response: @@ -846,13 +788,11 @@ async def test_streaming_response_vector(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_vertical(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.vertical() assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_vertical_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer3.timeseries_groups.vertical( @@ -879,7 +819,6 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_vertical(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.timeseries_groups.with_raw_response.vertical() @@ -889,7 +828,6 @@ async def test_raw_response_vertical(self, async_client: AsyncCloudflare) -> Non timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_vertical(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.timeseries_groups.with_streaming_response.vertical() as response: diff --git a/tests/api_resources/radar/attacks/layer3/test_top.py b/tests/api_resources/radar/attacks/layer3/test_top.py index d1af74044c4..6d2d7d36d7c 100644 --- a/tests/api_resources/radar/attacks/layer3/test_top.py +++ b/tests/api_resources/radar/attacks/layer3/test_top.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer3.top_attacks_response import TopAttacksResponse -from cloudflare.types.radar.attacks.layer3.top_industry_response import TopIndustryResponse -from cloudflare.types.radar.attacks.layer3.top_vertical_response import TopVerticalResponse +from cloudflare.types.radar.attacks.layer3 import ( + TopAttacksResponse, + TopIndustryResponse, + TopVerticalResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,13 +22,11 @@ class TestTop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_attacks(self, client: Cloudflare) -> None: top = client.radar.attacks.layer3.top.attacks() assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_attacks_with_all_params(self, client: Cloudflare) -> None: top = client.radar.attacks.layer3.top.attacks( @@ -53,7 +53,6 @@ def test_method_attacks_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_attacks(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.top.with_raw_response.attacks() @@ -63,7 +62,6 @@ def test_raw_response_attacks(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_attacks(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.top.with_streaming_response.attacks() as response: @@ -75,13 +73,11 @@ def test_streaming_response_attacks(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_industry(self, client: Cloudflare) -> None: top = client.radar.attacks.layer3.top.industry() assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_industry_with_all_params(self, client: Cloudflare) -> None: top = client.radar.attacks.layer3.top.industry( @@ -106,7 +102,6 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_industry(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.top.with_raw_response.industry() @@ -116,7 +111,6 @@ def test_raw_response_industry(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_industry(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.top.with_streaming_response.industry() as response: @@ -128,13 +122,11 @@ def test_streaming_response_industry(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_vertical(self, client: Cloudflare) -> None: top = client.radar.attacks.layer3.top.vertical() assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: top = client.radar.attacks.layer3.top.vertical( @@ -159,7 +151,6 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_vertical(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.top.with_raw_response.vertical() @@ -169,7 +160,6 @@ def test_raw_response_vertical(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_vertical(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.top.with_streaming_response.vertical() as response: @@ -185,13 +175,11 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_attacks(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer3.top.attacks() assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer3.top.attacks( @@ -218,7 +206,6 @@ async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_attacks(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.top.with_raw_response.attacks() @@ -228,7 +215,6 @@ async def test_raw_response_attacks(self, async_client: AsyncCloudflare) -> None top = await response.parse() assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_attacks(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.top.with_streaming_response.attacks() as response: @@ -240,13 +226,11 @@ async def test_streaming_response_attacks(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_industry(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer3.top.industry() assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_industry_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer3.top.industry( @@ -271,7 +255,6 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_industry(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.top.with_raw_response.industry() @@ -281,7 +264,6 @@ async def test_raw_response_industry(self, async_client: AsyncCloudflare) -> Non top = await response.parse() assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_industry(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.top.with_streaming_response.industry() as response: @@ -293,13 +275,11 @@ async def test_streaming_response_industry(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_vertical(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer3.top.vertical() assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_vertical_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer3.top.vertical( @@ -324,7 +304,6 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_vertical(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.top.with_raw_response.vertical() @@ -334,7 +313,6 @@ async def test_raw_response_vertical(self, async_client: AsyncCloudflare) -> Non top = await response.parse() assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_vertical(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.top.with_streaming_response.vertical() as response: diff --git a/tests/api_resources/radar/attacks/layer3/top/test_locations.py b/tests/api_resources/radar/attacks/layer3/top/test_locations.py index 0b3c0f450b9..f1848af7b27 100644 --- a/tests/api_resources/radar/attacks/layer3/top/test_locations.py +++ b/tests/api_resources/radar/attacks/layer3/top/test_locations.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer3.top.location_origin_response import LocationOriginResponse -from cloudflare.types.radar.attacks.layer3.top.location_target_response import LocationTargetResponse +from cloudflare.types.radar.attacks.layer3.top import ( + LocationOriginResponse, + LocationTargetResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +21,11 @@ class TestLocations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_origin(self, client: Cloudflare) -> None: location = client.radar.attacks.layer3.top.locations.origin() assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_origin_with_all_params(self, client: Cloudflare) -> None: location = client.radar.attacks.layer3.top.locations.origin( @@ -50,7 +50,6 @@ def test_method_origin_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_origin(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.top.locations.with_raw_response.origin() @@ -60,7 +59,6 @@ def test_raw_response_origin(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_origin(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.top.locations.with_streaming_response.origin() as response: @@ -72,13 +70,11 @@ def test_streaming_response_origin(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_target(self, client: Cloudflare) -> None: location = client.radar.attacks.layer3.top.locations.target() assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_target_with_all_params(self, client: Cloudflare) -> None: location = client.radar.attacks.layer3.top.locations.target( @@ -103,7 +99,6 @@ def test_method_target_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_target(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.top.locations.with_raw_response.target() @@ -113,7 +108,6 @@ def test_raw_response_target(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_target(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.top.locations.with_streaming_response.target() as response: @@ -129,13 +123,11 @@ def test_streaming_response_target(self, client: Cloudflare) -> None: class TestAsyncLocations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.attacks.layer3.top.locations.origin() assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.attacks.layer3.top.locations.origin( @@ -160,7 +152,6 @@ async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.top.locations.with_raw_response.origin() @@ -170,7 +161,6 @@ async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.top.locations.with_streaming_response.origin() as response: @@ -182,13 +172,11 @@ async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_target(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.attacks.layer3.top.locations.target() assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_target_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.attacks.layer3.top.locations.target( @@ -213,7 +201,6 @@ async def test_method_target_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_target(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.top.locations.with_raw_response.target() @@ -223,7 +210,6 @@ async def test_raw_response_target(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_target(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.top.locations.with_streaming_response.target() as response: diff --git a/tests/api_resources/radar/attacks/layer7/test_summary.py b/tests/api_resources/radar/attacks/layer7/test_summary.py index 04f966d65f7..c8f4159e08c 100644 --- a/tests/api_resources/radar/attacks/layer7/test_summary.py +++ b/tests/api_resources/radar/attacks/layer7/test_summary.py @@ -10,12 +10,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer7.summary_get_response import SummaryGetResponse -from cloudflare.types.radar.attacks.layer7.summary_ip_version_response import SummaryIPVersionResponse -from cloudflare.types.radar.attacks.layer7.summary_http_method_response import SummaryHTTPMethodResponse -from cloudflare.types.radar.attacks.layer7.summary_http_version_response import SummaryHTTPVersionResponse -from cloudflare.types.radar.attacks.layer7.summary_managed_rules_response import SummaryManagedRulesResponse -from cloudflare.types.radar.attacks.layer7.summary_mitigation_product_response import SummaryMitigationProductResponse +from cloudflare.types.radar.attacks.layer7 import ( + SummaryGetResponse, + SummaryIPVersionResponse, + SummaryHTTPMethodResponse, + SummaryHTTPVersionResponse, + SummaryManagedRulesResponse, + SummaryMitigationProductResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,13 +25,11 @@ class TestSummary: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.get() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.get( @@ -52,7 +52,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.summary.with_raw_response.get() @@ -62,7 +61,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.summary.with_streaming_response.get() as response: @@ -74,13 +72,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_http_method(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.http_method() assert_matches_type(SummaryHTTPMethodResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_http_method_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.http_method( @@ -106,7 +102,6 @@ def test_method_http_method_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryHTTPMethodResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_http_method(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.summary.with_raw_response.http_method() @@ -116,7 +111,6 @@ def test_raw_response_http_method(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryHTTPMethodResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_http_method(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.summary.with_streaming_response.http_method() as response: @@ -128,13 +122,11 @@ def test_streaming_response_http_method(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_http_version(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.http_version() assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.http_version( @@ -160,7 +152,6 @@ def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_http_version(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.summary.with_raw_response.http_version() @@ -170,7 +161,6 @@ def test_raw_response_http_version(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_http_version(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.summary.with_streaming_response.http_version() as response: @@ -182,13 +172,11 @@ def test_streaming_response_http_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.ip_version( @@ -214,7 +202,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.summary.with_raw_response.ip_version() @@ -224,7 +211,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.summary.with_streaming_response.ip_version() as response: @@ -236,13 +222,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_managed_rules(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.managed_rules() assert_matches_type(SummaryManagedRulesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.managed_rules( @@ -269,7 +253,6 @@ def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryManagedRulesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_managed_rules(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.summary.with_raw_response.managed_rules() @@ -279,7 +262,6 @@ def test_raw_response_managed_rules(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryManagedRulesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_managed_rules(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.summary.with_streaming_response.managed_rules() as response: @@ -291,13 +273,11 @@ def test_streaming_response_managed_rules(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_mitigation_product(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.mitigation_product() assert_matches_type(SummaryMitigationProductResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.attacks.layer7.summary.mitigation_product( @@ -323,7 +303,6 @@ def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> ) assert_matches_type(SummaryMitigationProductResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_mitigation_product(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.summary.with_raw_response.mitigation_product() @@ -333,7 +312,6 @@ def test_raw_response_mitigation_product(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryMitigationProductResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_mitigation_product(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.summary.with_streaming_response.mitigation_product() as response: @@ -349,13 +327,11 @@ def test_streaming_response_mitigation_product(self, client: Cloudflare) -> None class TestAsyncSummary: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.get() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.get( @@ -378,7 +354,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.summary.with_raw_response.get() @@ -388,7 +363,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.summary.with_streaming_response.get() as response: @@ -400,13 +374,11 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_http_method(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.http_method() assert_matches_type(SummaryHTTPMethodResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_http_method_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.http_method( @@ -432,7 +404,6 @@ async def test_method_http_method_with_all_params(self, async_client: AsyncCloud ) assert_matches_type(SummaryHTTPMethodResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_http_method(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.summary.with_raw_response.http_method() @@ -442,7 +413,6 @@ async def test_raw_response_http_method(self, async_client: AsyncCloudflare) -> summary = await response.parse() assert_matches_type(SummaryHTTPMethodResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_http_method(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.summary.with_streaming_response.http_method() as response: @@ -454,13 +424,11 @@ async def test_streaming_response_http_method(self, async_client: AsyncCloudflar assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_http_version(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.http_version() assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_http_version_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.http_version( @@ -486,7 +454,6 @@ async def test_method_http_version_with_all_params(self, async_client: AsyncClou ) assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_http_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.summary.with_raw_response.http_version() @@ -496,7 +463,6 @@ async def test_raw_response_http_version(self, async_client: AsyncCloudflare) -> summary = await response.parse() assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_http_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.summary.with_streaming_response.http_version() as response: @@ -508,13 +474,11 @@ async def test_streaming_response_http_version(self, async_client: AsyncCloudfla assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.ip_version( @@ -540,7 +504,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.summary.with_raw_response.ip_version() @@ -550,7 +513,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N summary = await response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.summary.with_streaming_response.ip_version() as response: @@ -562,13 +524,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_managed_rules(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.managed_rules() assert_matches_type(SummaryManagedRulesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_managed_rules_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.managed_rules( @@ -595,7 +555,6 @@ async def test_method_managed_rules_with_all_params(self, async_client: AsyncClo ) assert_matches_type(SummaryManagedRulesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_managed_rules(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.summary.with_raw_response.managed_rules() @@ -605,7 +564,6 @@ async def test_raw_response_managed_rules(self, async_client: AsyncCloudflare) - summary = await response.parse() assert_matches_type(SummaryManagedRulesResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_managed_rules(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.summary.with_streaming_response.managed_rules() as response: @@ -617,13 +575,11 @@ async def test_streaming_response_managed_rules(self, async_client: AsyncCloudfl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_mitigation_product(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.mitigation_product() assert_matches_type(SummaryMitigationProductResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_mitigation_product_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.attacks.layer7.summary.mitigation_product( @@ -649,7 +605,6 @@ async def test_method_mitigation_product_with_all_params(self, async_client: Asy ) assert_matches_type(SummaryMitigationProductResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_mitigation_product(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.summary.with_raw_response.mitigation_product() @@ -659,7 +614,6 @@ async def test_raw_response_mitigation_product(self, async_client: AsyncCloudfla summary = await response.parse() assert_matches_type(SummaryMitigationProductResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_mitigation_product(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.summary.with_streaming_response.mitigation_product() as response: diff --git a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py index 6ddbc689255..99f8be5a802 100644 --- a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py @@ -10,20 +10,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer7.timeseries_group_get_response import TimeseriesGroupGetResponse -from cloudflare.types.radar.attacks.layer7.timeseries_group_industry_response import TimeseriesGroupIndustryResponse -from cloudflare.types.radar.attacks.layer7.timeseries_group_vertical_response import TimeseriesGroupVerticalResponse -from cloudflare.types.radar.attacks.layer7.timeseries_group_ip_version_response import TimeseriesGroupIPVersionResponse -from cloudflare.types.radar.attacks.layer7.timeseries_group_http_method_response import ( +from cloudflare.types.radar.attacks.layer7 import ( + TimeseriesGroupGetResponse, + TimeseriesGroupIndustryResponse, + TimeseriesGroupVerticalResponse, + TimeseriesGroupIPVersionResponse, TimeseriesGroupHTTPMethodResponse, -) -from cloudflare.types.radar.attacks.layer7.timeseries_group_http_version_response import ( TimeseriesGroupHTTPVersionResponse, -) -from cloudflare.types.radar.attacks.layer7.timeseries_group_managed_rules_response import ( TimeseriesGroupManagedRulesResponse, -) -from cloudflare.types.radar.attacks.layer7.timeseries_group_mitigation_product_response import ( TimeseriesGroupMitigationProductResponse, ) @@ -33,13 +27,11 @@ class TestTimeseriesGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.get() assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.get( @@ -63,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.timeseries_groups.with_raw_response.get() @@ -73,7 +64,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.timeseries_groups.with_streaming_response.get() as response: @@ -85,13 +75,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_http_method(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.http_method() assert_matches_type(TimeseriesGroupHTTPMethodResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_http_method_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.http_method( @@ -119,7 +107,6 @@ def test_method_http_method_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupHTTPMethodResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_http_method(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.timeseries_groups.with_raw_response.http_method() @@ -129,7 +116,6 @@ def test_raw_response_http_method(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupHTTPMethodResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_http_method(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.timeseries_groups.with_streaming_response.http_method() as response: @@ -141,13 +127,11 @@ def test_streaming_response_http_method(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_http_version(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.http_version() assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.http_version( @@ -175,7 +159,6 @@ def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_http_version(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.timeseries_groups.with_raw_response.http_version() @@ -185,7 +168,6 @@ def test_raw_response_http_version(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_http_version(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.timeseries_groups.with_streaming_response.http_version() as response: @@ -197,13 +179,11 @@ def test_streaming_response_http_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_industry(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.industry() assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_industry_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.industry( @@ -233,7 +213,6 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_industry(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.timeseries_groups.with_raw_response.industry() @@ -243,7 +222,6 @@ def test_raw_response_industry(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_industry(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.timeseries_groups.with_streaming_response.industry() as response: @@ -255,13 +233,11 @@ def test_streaming_response_industry(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.ip_version( @@ -289,7 +265,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.timeseries_groups.with_raw_response.ip_version() @@ -299,7 +274,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.timeseries_groups.with_streaming_response.ip_version() as response: @@ -311,13 +285,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_managed_rules(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.managed_rules() assert_matches_type(TimeseriesGroupManagedRulesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.managed_rules( @@ -346,7 +318,6 @@ def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupManagedRulesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_managed_rules(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.timeseries_groups.with_raw_response.managed_rules() @@ -356,7 +327,6 @@ def test_raw_response_managed_rules(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupManagedRulesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_managed_rules(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.timeseries_groups.with_streaming_response.managed_rules() as response: @@ -368,13 +338,11 @@ def test_streaming_response_managed_rules(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_mitigation_product(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.mitigation_product() assert_matches_type(TimeseriesGroupMitigationProductResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.mitigation_product( @@ -402,7 +370,6 @@ def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> ) assert_matches_type(TimeseriesGroupMitigationProductResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_mitigation_product(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.timeseries_groups.with_raw_response.mitigation_product() @@ -412,7 +379,6 @@ def test_raw_response_mitigation_product(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupMitigationProductResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_mitigation_product(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.timeseries_groups.with_streaming_response.mitigation_product() as response: @@ -424,13 +390,11 @@ def test_streaming_response_mitigation_product(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_vertical(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.vertical() assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.attacks.layer7.timeseries_groups.vertical( @@ -460,7 +424,6 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_vertical(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.timeseries_groups.with_raw_response.vertical() @@ -470,7 +433,6 @@ def test_raw_response_vertical(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_vertical(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.timeseries_groups.with_streaming_response.vertical() as response: @@ -486,13 +448,11 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.get() assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.get( @@ -516,7 +476,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.timeseries_groups.with_raw_response.get() @@ -526,7 +485,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupGetResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.timeseries_groups.with_streaming_response.get() as response: @@ -538,13 +496,11 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_http_method(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.http_method() assert_matches_type(TimeseriesGroupHTTPMethodResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_http_method_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.http_method( @@ -572,7 +528,6 @@ async def test_method_http_method_with_all_params(self, async_client: AsyncCloud ) assert_matches_type(TimeseriesGroupHTTPMethodResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_http_method(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.timeseries_groups.with_raw_response.http_method() @@ -582,7 +537,6 @@ async def test_raw_response_http_method(self, async_client: AsyncCloudflare) -> timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupHTTPMethodResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_http_method(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.timeseries_groups.with_streaming_response.http_method() as response: @@ -594,13 +548,11 @@ async def test_streaming_response_http_method(self, async_client: AsyncCloudflar assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_http_version(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.http_version() assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_http_version_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.http_version( @@ -628,7 +580,6 @@ async def test_method_http_version_with_all_params(self, async_client: AsyncClou ) assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_http_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.timeseries_groups.with_raw_response.http_version() @@ -638,7 +589,6 @@ async def test_raw_response_http_version(self, async_client: AsyncCloudflare) -> timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_http_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.timeseries_groups.with_streaming_response.http_version() as response: @@ -650,13 +600,11 @@ async def test_streaming_response_http_version(self, async_client: AsyncCloudfla assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_industry(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.industry() assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_industry_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.industry( @@ -686,7 +634,6 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_industry(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.timeseries_groups.with_raw_response.industry() @@ -696,7 +643,6 @@ async def test_raw_response_industry(self, async_client: AsyncCloudflare) -> Non timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupIndustryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_industry(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.timeseries_groups.with_streaming_response.industry() as response: @@ -708,13 +654,11 @@ async def test_streaming_response_industry(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.ip_version( @@ -742,7 +686,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.timeseries_groups.with_raw_response.ip_version() @@ -752,7 +695,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.timeseries_groups.with_streaming_response.ip_version() as response: @@ -764,13 +706,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_managed_rules(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.managed_rules() assert_matches_type(TimeseriesGroupManagedRulesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_managed_rules_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.managed_rules( @@ -799,7 +739,6 @@ async def test_method_managed_rules_with_all_params(self, async_client: AsyncClo ) assert_matches_type(TimeseriesGroupManagedRulesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_managed_rules(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.timeseries_groups.with_raw_response.managed_rules() @@ -809,7 +748,6 @@ async def test_raw_response_managed_rules(self, async_client: AsyncCloudflare) - timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupManagedRulesResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_managed_rules(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.timeseries_groups.with_streaming_response.managed_rules() as response: @@ -821,13 +759,11 @@ async def test_streaming_response_managed_rules(self, async_client: AsyncCloudfl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_mitigation_product(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.mitigation_product() assert_matches_type(TimeseriesGroupMitigationProductResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_mitigation_product_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.mitigation_product( @@ -855,7 +791,6 @@ async def test_method_mitigation_product_with_all_params(self, async_client: Asy ) assert_matches_type(TimeseriesGroupMitigationProductResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_mitigation_product(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.timeseries_groups.with_raw_response.mitigation_product() @@ -865,7 +800,6 @@ async def test_raw_response_mitigation_product(self, async_client: AsyncCloudfla timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupMitigationProductResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_mitigation_product(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.timeseries_groups.with_streaming_response.mitigation_product() as response: @@ -877,13 +811,11 @@ async def test_streaming_response_mitigation_product(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_vertical(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.vertical() assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_vertical_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.attacks.layer7.timeseries_groups.vertical( @@ -913,7 +845,6 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_vertical(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.timeseries_groups.with_raw_response.vertical() @@ -923,7 +854,6 @@ async def test_raw_response_vertical(self, async_client: AsyncCloudflare) -> Non timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupVerticalResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_vertical(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.timeseries_groups.with_streaming_response.vertical() as response: diff --git a/tests/api_resources/radar/attacks/layer7/test_top.py b/tests/api_resources/radar/attacks/layer7/test_top.py index e42d7e3911e..edce1b2472a 100644 --- a/tests/api_resources/radar/attacks/layer7/test_top.py +++ b/tests/api_resources/radar/attacks/layer7/test_top.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer7.top_attacks_response import TopAttacksResponse -from cloudflare.types.radar.attacks.layer7.top_industry_response import TopIndustryResponse -from cloudflare.types.radar.attacks.layer7.top_vertical_response import TopVerticalResponse +from cloudflare.types.radar.attacks.layer7 import ( + TopAttacksResponse, + TopIndustryResponse, + TopVerticalResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,13 +22,11 @@ class TestTop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_attacks(self, client: Cloudflare) -> None: top = client.radar.attacks.layer7.top.attacks() assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_attacks_with_all_params(self, client: Cloudflare) -> None: top = client.radar.attacks.layer7.top.attacks( @@ -53,7 +53,6 @@ def test_method_attacks_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_attacks(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.top.with_raw_response.attacks() @@ -63,7 +62,6 @@ def test_raw_response_attacks(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_attacks(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.top.with_streaming_response.attacks() as response: @@ -75,13 +73,11 @@ def test_streaming_response_attacks(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_industry(self, client: Cloudflare) -> None: top = client.radar.attacks.layer7.top.industry() assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_industry_with_all_params(self, client: Cloudflare) -> None: top = client.radar.attacks.layer7.top.industry( @@ -105,7 +101,6 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_industry(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.top.with_raw_response.industry() @@ -115,7 +110,6 @@ def test_raw_response_industry(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_industry(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.top.with_streaming_response.industry() as response: @@ -127,13 +121,11 @@ def test_streaming_response_industry(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_vertical(self, client: Cloudflare) -> None: top = client.radar.attacks.layer7.top.vertical() assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: top = client.radar.attacks.layer7.top.vertical( @@ -157,7 +149,6 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_vertical(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.top.with_raw_response.vertical() @@ -167,7 +158,6 @@ def test_raw_response_vertical(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_vertical(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.top.with_streaming_response.vertical() as response: @@ -183,13 +173,11 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_attacks(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer7.top.attacks() assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer7.top.attacks( @@ -216,7 +204,6 @@ async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_attacks(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.top.with_raw_response.attacks() @@ -226,7 +213,6 @@ async def test_raw_response_attacks(self, async_client: AsyncCloudflare) -> None top = await response.parse() assert_matches_type(TopAttacksResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_attacks(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.top.with_streaming_response.attacks() as response: @@ -238,13 +224,11 @@ async def test_streaming_response_attacks(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_industry(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer7.top.industry() assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_industry_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer7.top.industry( @@ -268,7 +252,6 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_industry(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.top.with_raw_response.industry() @@ -278,7 +261,6 @@ async def test_raw_response_industry(self, async_client: AsyncCloudflare) -> Non top = await response.parse() assert_matches_type(TopIndustryResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_industry(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.top.with_streaming_response.industry() as response: @@ -290,13 +272,11 @@ async def test_streaming_response_industry(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_vertical(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer7.top.vertical() assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_vertical_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.attacks.layer7.top.vertical( @@ -320,7 +300,6 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_vertical(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.top.with_raw_response.vertical() @@ -330,7 +309,6 @@ async def test_raw_response_vertical(self, async_client: AsyncCloudflare) -> Non top = await response.parse() assert_matches_type(TopVerticalResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_vertical(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.top.with_streaming_response.vertical() as response: diff --git a/tests/api_resources/radar/attacks/layer7/top/test_ases.py b/tests/api_resources/radar/attacks/layer7/top/test_ases.py index 837a20eb43a..afa9610bd1a 100644 --- a/tests/api_resources/radar/attacks/layer7/top/test_ases.py +++ b/tests/api_resources/radar/attacks/layer7/top/test_ases.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer7.top.ase_origin_response import AseOriginResponse +from cloudflare.types.radar.attacks.layer7.top import AseOriginResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestAses: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_origin(self, client: Cloudflare) -> None: ase = client.radar.attacks.layer7.top.ases.origin() assert_matches_type(AseOriginResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_origin_with_all_params(self, client: Cloudflare) -> None: ase = client.radar.attacks.layer7.top.ases.origin( @@ -47,7 +45,6 @@ def test_method_origin_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(AseOriginResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_origin(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.top.ases.with_raw_response.origin() @@ -57,7 +54,6 @@ def test_raw_response_origin(self, client: Cloudflare) -> None: ase = response.parse() assert_matches_type(AseOriginResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_origin(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.top.ases.with_streaming_response.origin() as response: @@ -73,13 +69,11 @@ def test_streaming_response_origin(self, client: Cloudflare) -> None: class TestAsyncAses: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: ase = await async_client.radar.attacks.layer7.top.ases.origin() assert_matches_type(AseOriginResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare) -> None: ase = await async_client.radar.attacks.layer7.top.ases.origin( @@ -102,7 +96,6 @@ async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(AseOriginResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.top.ases.with_raw_response.origin() @@ -112,7 +105,6 @@ async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: ase = await response.parse() assert_matches_type(AseOriginResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.top.ases.with_streaming_response.origin() as response: diff --git a/tests/api_resources/radar/attacks/layer7/top/test_locations.py b/tests/api_resources/radar/attacks/layer7/top/test_locations.py index 8fc1f872afe..e1482281e22 100644 --- a/tests/api_resources/radar/attacks/layer7/top/test_locations.py +++ b/tests/api_resources/radar/attacks/layer7/top/test_locations.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer7.top.location_origin_response import LocationOriginResponse -from cloudflare.types.radar.attacks.layer7.top.location_target_response import LocationTargetResponse +from cloudflare.types.radar.attacks.layer7.top import ( + LocationOriginResponse, + LocationTargetResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +21,11 @@ class TestLocations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_origin(self, client: Cloudflare) -> None: location = client.radar.attacks.layer7.top.locations.origin() assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_origin_with_all_params(self, client: Cloudflare) -> None: location = client.radar.attacks.layer7.top.locations.origin( @@ -48,7 +48,6 @@ def test_method_origin_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_origin(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.top.locations.with_raw_response.origin() @@ -58,7 +57,6 @@ def test_raw_response_origin(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_origin(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.top.locations.with_streaming_response.origin() as response: @@ -70,13 +68,11 @@ def test_streaming_response_origin(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_target(self, client: Cloudflare) -> None: location = client.radar.attacks.layer7.top.locations.target() assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_target_with_all_params(self, client: Cloudflare) -> None: location = client.radar.attacks.layer7.top.locations.target( @@ -98,7 +94,6 @@ def test_method_target_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_target(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.top.locations.with_raw_response.target() @@ -108,7 +103,6 @@ def test_raw_response_target(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_target(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.top.locations.with_streaming_response.target() as response: @@ -124,13 +118,11 @@ def test_streaming_response_target(self, client: Cloudflare) -> None: class TestAsyncLocations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.attacks.layer7.top.locations.origin() assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.attacks.layer7.top.locations.origin( @@ -153,7 +145,6 @@ async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.top.locations.with_raw_response.origin() @@ -163,7 +154,6 @@ async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(LocationOriginResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.top.locations.with_streaming_response.origin() as response: @@ -175,13 +165,11 @@ async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_target(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.attacks.layer7.top.locations.target() assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_target_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.attacks.layer7.top.locations.target( @@ -203,7 +191,6 @@ async def test_method_target_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_target(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.top.locations.with_raw_response.target() @@ -213,7 +200,6 @@ async def test_raw_response_target(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(LocationTargetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_target(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.top.locations.with_streaming_response.target() as response: diff --git a/tests/api_resources/radar/attacks/test_layer3.py b/tests/api_resources/radar/attacks/test_layer3.py index 046f8f55624..bdcdabdb226 100644 --- a/tests/api_resources/radar/attacks/test_layer3.py +++ b/tests/api_resources/radar/attacks/test_layer3.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer3_timeseries_response import Layer3TimeseriesResponse +from cloudflare.types.radar.attacks import Layer3TimeseriesResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestLayer3: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_timeseries(self, client: Cloudflare) -> None: layer3 = client.radar.attacks.layer3.timeseries() assert_matches_type(Layer3TimeseriesResponse, layer3, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: layer3 = client.radar.attacks.layer3.timeseries( @@ -53,7 +51,6 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Layer3TimeseriesResponse, layer3, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_timeseries(self, client: Cloudflare) -> None: response = client.radar.attacks.layer3.with_raw_response.timeseries() @@ -63,7 +60,6 @@ def test_raw_response_timeseries(self, client: Cloudflare) -> None: layer3 = response.parse() assert_matches_type(Layer3TimeseriesResponse, layer3, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_timeseries(self, client: Cloudflare) -> None: with client.radar.attacks.layer3.with_streaming_response.timeseries() as response: @@ -79,13 +75,11 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncLayer3: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: layer3 = await async_client.radar.attacks.layer3.timeseries() assert_matches_type(Layer3TimeseriesResponse, layer3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None: layer3 = await async_client.radar.attacks.layer3.timeseries( @@ -114,7 +108,6 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(Layer3TimeseriesResponse, layer3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer3.with_raw_response.timeseries() @@ -124,7 +117,6 @@ async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> N layer3 = await response.parse() assert_matches_type(Layer3TimeseriesResponse, layer3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_timeseries(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer3.with_streaming_response.timeseries() as response: diff --git a/tests/api_resources/radar/attacks/test_layer7.py b/tests/api_resources/radar/attacks/test_layer7.py index 8c9bb815231..5f4c4fbdb19 100644 --- a/tests/api_resources/radar/attacks/test_layer7.py +++ b/tests/api_resources/radar/attacks/test_layer7.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.attacks.layer7_timeseries_response import Layer7TimeseriesResponse +from cloudflare.types.radar.attacks import Layer7TimeseriesResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestLayer7: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_timeseries(self, client: Cloudflare) -> None: layer7 = client.radar.attacks.layer7.timeseries() assert_matches_type(Layer7TimeseriesResponse, layer7, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: layer7 = client.radar.attacks.layer7.timeseries( @@ -50,7 +48,6 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Layer7TimeseriesResponse, layer7, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_timeseries(self, client: Cloudflare) -> None: response = client.radar.attacks.layer7.with_raw_response.timeseries() @@ -60,7 +57,6 @@ def test_raw_response_timeseries(self, client: Cloudflare) -> None: layer7 = response.parse() assert_matches_type(Layer7TimeseriesResponse, layer7, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_timeseries(self, client: Cloudflare) -> None: with client.radar.attacks.layer7.with_streaming_response.timeseries() as response: @@ -76,13 +72,11 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncLayer7: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: layer7 = await async_client.radar.attacks.layer7.timeseries() assert_matches_type(Layer7TimeseriesResponse, layer7, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None: layer7 = await async_client.radar.attacks.layer7.timeseries( @@ -108,7 +102,6 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(Layer7TimeseriesResponse, layer7, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.attacks.layer7.with_raw_response.timeseries() @@ -118,7 +111,6 @@ async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> N layer7 = await response.parse() assert_matches_type(Layer7TimeseriesResponse, layer7, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_timeseries(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.attacks.layer7.with_streaming_response.timeseries() as response: diff --git a/tests/api_resources/radar/bgp/hijacks/test_events.py b/tests/api_resources/radar/bgp/hijacks/test_events.py index ff34479ed22..f0f7fa02ebe 100644 --- a/tests/api_resources/radar/bgp/hijacks/test_events.py +++ b/tests/api_resources/radar/bgp/hijacks/test_events.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePagination, AsyncV4PagePagination -from cloudflare.types.radar.bgp.hijacks.event_list_response import EventListResponse +from cloudflare.types.radar.bgp.hijacks import EventListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +19,11 @@ class TestEvents: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: event = client.radar.bgp.hijacks.events.list() assert_matches_type(SyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: event = client.radar.bgp.hijacks.events.list( @@ -48,7 +46,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.radar.bgp.hijacks.events.with_raw_response.list() @@ -58,7 +55,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: event = response.parse() assert_matches_type(SyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.radar.bgp.hijacks.events.with_streaming_response.list() as response: @@ -74,13 +70,11 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncEvents: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: event = await async_client.radar.bgp.hijacks.events.list() assert_matches_type(AsyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.radar.bgp.hijacks.events.list( @@ -103,7 +97,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.hijacks.events.with_raw_response.list() @@ -113,7 +106,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: event = await response.parse() assert_matches_type(AsyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.hijacks.events.with_streaming_response.list() as response: diff --git a/tests/api_resources/radar/bgp/leaks/test_events.py b/tests/api_resources/radar/bgp/leaks/test_events.py index 5a98a3b965f..8c4feb02045 100644 --- a/tests/api_resources/radar/bgp/leaks/test_events.py +++ b/tests/api_resources/radar/bgp/leaks/test_events.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePagination, AsyncV4PagePagination -from cloudflare.types.radar.bgp.leaks.event_list_response import EventListResponse +from cloudflare.types.radar.bgp.leaks import EventListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +19,11 @@ class TestEvents: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: event = client.radar.bgp.leaks.events.list() assert_matches_type(SyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: event = client.radar.bgp.leaks.events.list( @@ -44,7 +42,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.radar.bgp.leaks.events.with_raw_response.list() @@ -54,7 +51,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: event = response.parse() assert_matches_type(SyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.radar.bgp.leaks.events.with_streaming_response.list() as response: @@ -70,13 +66,11 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncEvents: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: event = await async_client.radar.bgp.leaks.events.list() assert_matches_type(AsyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.radar.bgp.leaks.events.list( @@ -95,7 +89,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.leaks.events.with_raw_response.list() @@ -105,7 +98,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: event = await response.parse() assert_matches_type(AsyncV4PagePagination[EventListResponse], event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.leaks.events.with_streaming_response.list() as response: diff --git a/tests/api_resources/radar/bgp/test_routes.py b/tests/api_resources/radar/bgp/test_routes.py index 73f6f629fe7..a1bf66bc655 100644 --- a/tests/api_resources/radar/bgp/test_routes.py +++ b/tests/api_resources/radar/bgp/test_routes.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.bgp.route_moas_response import RouteMoasResponse -from cloudflare.types.radar.bgp.route_stats_response import RouteStatsResponse -from cloudflare.types.radar.bgp.route_pfx2as_response import RoutePfx2asResponse -from cloudflare.types.radar.bgp.route_timeseries_response import RouteTimeseriesResponse +from cloudflare.types.radar.bgp import ( + RouteMoasResponse, + RouteStatsResponse, + RoutePfx2asResponse, + RouteTimeseriesResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,13 +23,11 @@ class TestRoutes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_moas(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.moas() assert_matches_type(RouteMoasResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_moas_with_all_params(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.moas( @@ -38,7 +38,6 @@ def test_method_moas_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RouteMoasResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_moas(self, client: Cloudflare) -> None: response = client.radar.bgp.routes.with_raw_response.moas() @@ -48,7 +47,6 @@ def test_raw_response_moas(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RouteMoasResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_moas(self, client: Cloudflare) -> None: with client.radar.bgp.routes.with_streaming_response.moas() as response: @@ -60,13 +58,11 @@ def test_streaming_response_moas(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_pfx2as(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.pfx2as() assert_matches_type(RoutePfx2asResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_pfx2as_with_all_params(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.pfx2as( @@ -78,7 +74,6 @@ def test_method_pfx2as_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RoutePfx2asResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_pfx2as(self, client: Cloudflare) -> None: response = client.radar.bgp.routes.with_raw_response.pfx2as() @@ -88,7 +83,6 @@ def test_raw_response_pfx2as(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RoutePfx2asResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_pfx2as(self, client: Cloudflare) -> None: with client.radar.bgp.routes.with_streaming_response.pfx2as() as response: @@ -100,23 +94,20 @@ def test_streaming_response_pfx2as(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_stats(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.stats() assert_matches_type(RouteStatsResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_stats_with_all_params(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.stats( - asn=0, + asn=174, format="JSON", location="US", ) assert_matches_type(RouteStatsResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_stats(self, client: Cloudflare) -> None: response = client.radar.bgp.routes.with_raw_response.stats() @@ -126,7 +117,6 @@ def test_raw_response_stats(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RouteStatsResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_stats(self, client: Cloudflare) -> None: with client.radar.bgp.routes.with_streaming_response.stats() as response: @@ -138,17 +128,15 @@ def test_streaming_response_stats(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_timeseries(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.timeseries() assert_matches_type(RouteTimeseriesResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.timeseries( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), @@ -158,7 +146,6 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RouteTimeseriesResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_timeseries(self, client: Cloudflare) -> None: response = client.radar.bgp.routes.with_raw_response.timeseries() @@ -168,7 +155,6 @@ def test_raw_response_timeseries(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(RouteTimeseriesResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_timeseries(self, client: Cloudflare) -> None: with client.radar.bgp.routes.with_streaming_response.timeseries() as response: @@ -184,13 +170,11 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncRoutes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_moas(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.moas() assert_matches_type(RouteMoasResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_moas_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.moas( @@ -201,7 +185,6 @@ async def test_method_moas_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(RouteMoasResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_moas(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.routes.with_raw_response.moas() @@ -211,7 +194,6 @@ async def test_raw_response_moas(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(RouteMoasResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_moas(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.routes.with_streaming_response.moas() as response: @@ -223,13 +205,11 @@ async def test_streaming_response_moas(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_pfx2as(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.pfx2as() assert_matches_type(RoutePfx2asResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_pfx2as_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.pfx2as( @@ -241,7 +221,6 @@ async def test_method_pfx2as_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(RoutePfx2asResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_pfx2as(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.routes.with_raw_response.pfx2as() @@ -251,7 +230,6 @@ async def test_raw_response_pfx2as(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(RoutePfx2asResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_pfx2as(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.routes.with_streaming_response.pfx2as() as response: @@ -263,23 +241,20 @@ async def test_streaming_response_pfx2as(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_stats(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.stats() assert_matches_type(RouteStatsResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_stats_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.stats( - asn=0, + asn=174, format="JSON", location="US", ) assert_matches_type(RouteStatsResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_stats(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.routes.with_raw_response.stats() @@ -289,7 +264,6 @@ async def test_raw_response_stats(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(RouteStatsResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_stats(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.routes.with_streaming_response.stats() as response: @@ -301,17 +275,15 @@ async def test_streaming_response_stats(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.timeseries() assert_matches_type(RouteTimeseriesResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.timeseries( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), @@ -321,7 +293,6 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(RouteTimeseriesResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.routes.with_raw_response.timeseries() @@ -331,7 +302,6 @@ async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> N route = await response.parse() assert_matches_type(RouteTimeseriesResponse, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_timeseries(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.routes.with_streaming_response.timeseries() as response: diff --git a/tests/api_resources/radar/bgp/test_top.py b/tests/api_resources/radar/bgp/test_top.py index 8a7e33da87e..aabb2c05533 100644 --- a/tests/api_resources/radar/bgp/test_top.py +++ b/tests/api_resources/radar/bgp/test_top.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.bgp.top_prefixes_response import TopPrefixesResponse +from cloudflare.types.radar.bgp import TopPrefixesResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestTop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_prefixes(self, client: Cloudflare) -> None: top = client.radar.bgp.top.prefixes() assert_matches_type(TopPrefixesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_prefixes_with_all_params(self, client: Cloudflare) -> None: top = client.radar.bgp.top.prefixes( @@ -47,7 +45,6 @@ def test_method_prefixes_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopPrefixesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_prefixes(self, client: Cloudflare) -> None: response = client.radar.bgp.top.with_raw_response.prefixes() @@ -57,7 +54,6 @@ def test_raw_response_prefixes(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopPrefixesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_prefixes(self, client: Cloudflare) -> None: with client.radar.bgp.top.with_streaming_response.prefixes() as response: @@ -73,13 +69,11 @@ def test_streaming_response_prefixes(self, client: Cloudflare) -> None: class TestAsyncTop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_prefixes(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.bgp.top.prefixes() assert_matches_type(TopPrefixesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_prefixes_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.bgp.top.prefixes( @@ -102,7 +96,6 @@ async def test_method_prefixes_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TopPrefixesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_prefixes(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.top.with_raw_response.prefixes() @@ -112,7 +105,6 @@ async def test_raw_response_prefixes(self, async_client: AsyncCloudflare) -> Non top = await response.parse() assert_matches_type(TopPrefixesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_prefixes(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.top.with_streaming_response.prefixes() as response: diff --git a/tests/api_resources/radar/bgp/top/test_ases.py b/tests/api_resources/radar/bgp/top/test_ases.py index 3ed5a561ce7..0eb51280b0a 100644 --- a/tests/api_resources/radar/bgp/top/test_ases.py +++ b/tests/api_resources/radar/bgp/top/test_ases.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.bgp.top.ase_get_response import AseGetResponse -from cloudflare.types.radar.bgp.top.ase_prefixes_response import AsePrefixesResponse +from cloudflare.types.radar.bgp.top import AseGetResponse, AsePrefixesResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +18,11 @@ class TestAses: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ase = client.radar.bgp.top.ases.get() assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ase = client.radar.bgp.top.ases.get( @@ -49,7 +46,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.bgp.top.ases.with_raw_response.get() @@ -59,7 +55,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ase = response.parse() assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.bgp.top.ases.with_streaming_response.get() as response: @@ -71,13 +66,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_prefixes(self, client: Cloudflare) -> None: ase = client.radar.bgp.top.ases.prefixes() assert_matches_type(AsePrefixesResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_prefixes_with_all_params(self, client: Cloudflare) -> None: ase = client.radar.bgp.top.ases.prefixes( @@ -87,7 +80,6 @@ def test_method_prefixes_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(AsePrefixesResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_prefixes(self, client: Cloudflare) -> None: response = client.radar.bgp.top.ases.with_raw_response.prefixes() @@ -97,7 +89,6 @@ def test_raw_response_prefixes(self, client: Cloudflare) -> None: ase = response.parse() assert_matches_type(AsePrefixesResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_prefixes(self, client: Cloudflare) -> None: with client.radar.bgp.top.ases.with_streaming_response.prefixes() as response: @@ -113,13 +104,11 @@ def test_streaming_response_prefixes(self, client: Cloudflare) -> None: class TestAsyncAses: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ase = await async_client.radar.bgp.top.ases.get() assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ase = await async_client.radar.bgp.top.ases.get( @@ -143,7 +132,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.top.ases.with_raw_response.get() @@ -153,7 +141,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ase = await response.parse() assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.top.ases.with_streaming_response.get() as response: @@ -165,13 +152,11 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_prefixes(self, async_client: AsyncCloudflare) -> None: ase = await async_client.radar.bgp.top.ases.prefixes() assert_matches_type(AsePrefixesResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_prefixes_with_all_params(self, async_client: AsyncCloudflare) -> None: ase = await async_client.radar.bgp.top.ases.prefixes( @@ -181,7 +166,6 @@ async def test_method_prefixes_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(AsePrefixesResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_prefixes(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.top.ases.with_raw_response.prefixes() @@ -191,7 +175,6 @@ async def test_raw_response_prefixes(self, async_client: AsyncCloudflare) -> Non ase = await response.parse() assert_matches_type(AsePrefixesResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_prefixes(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.top.ases.with_streaming_response.prefixes() as response: diff --git a/tests/api_resources/radar/dns/test_top.py b/tests/api_resources/radar/dns/test_top.py index ebdc9f1f3c5..f9c7f770b64 100644 --- a/tests/api_resources/radar/dns/test_top.py +++ b/tests/api_resources/radar/dns/test_top.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.dns.top_ases_response import TopAsesResponse -from cloudflare.types.radar.dns.top_locations_response import TopLocationsResponse +from cloudflare.types.radar.dns import TopAsesResponse, TopLocationsResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestTop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_ases(self, client: Cloudflare) -> None: top = client.radar.dns.top.ases( @@ -27,7 +25,6 @@ def test_method_ases(self, client: Cloudflare) -> None: ) assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ases_with_all_params(self, client: Cloudflare) -> None: top = client.radar.dns.top.ases( @@ -52,7 +49,6 @@ def test_method_ases_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ases(self, client: Cloudflare) -> None: response = client.radar.dns.top.with_raw_response.ases( @@ -64,7 +60,6 @@ def test_raw_response_ases(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ases(self, client: Cloudflare) -> None: with client.radar.dns.top.with_streaming_response.ases( @@ -78,7 +73,6 @@ def test_streaming_response_ases(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_locations(self, client: Cloudflare) -> None: top = client.radar.dns.top.locations( @@ -86,7 +80,6 @@ def test_method_locations(self, client: Cloudflare) -> None: ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_locations_with_all_params(self, client: Cloudflare) -> None: top = client.radar.dns.top.locations( @@ -111,7 +104,6 @@ def test_method_locations_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_locations(self, client: Cloudflare) -> None: response = client.radar.dns.top.with_raw_response.locations( @@ -123,7 +115,6 @@ def test_raw_response_locations(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_locations(self, client: Cloudflare) -> None: with client.radar.dns.top.with_streaming_response.locations( @@ -141,7 +132,6 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.dns.top.ases( @@ -149,7 +139,6 @@ async def test_method_ases(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.dns.top.ases( @@ -174,7 +163,6 @@ async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ases(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.dns.top.with_raw_response.ases( @@ -186,7 +174,6 @@ async def test_raw_response_ases(self, async_client: AsyncCloudflare) -> None: top = await response.parse() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ases(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.dns.top.with_streaming_response.ases( @@ -200,7 +187,6 @@ async def test_streaming_response_ases(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_locations(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.dns.top.locations( @@ -208,7 +194,6 @@ async def test_method_locations(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_locations_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.dns.top.locations( @@ -233,7 +218,6 @@ async def test_method_locations_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.dns.top.with_raw_response.locations( @@ -245,7 +229,6 @@ async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> No top = await response.parse() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_locations(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.dns.top.with_streaming_response.locations( diff --git a/tests/api_resources/radar/email/routing/test_summary.py b/tests/api_resources/radar/email/routing/test_summary.py index f308e6ebe35..23fa3d37588 100644 --- a/tests/api_resources/radar/email/routing/test_summary.py +++ b/tests/api_resources/radar/email/routing/test_summary.py @@ -10,12 +10,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.email.routing.summary_arc_response import SummaryARCResponse -from cloudflare.types.radar.email.routing.summary_spf_response import SummarySPFResponse -from cloudflare.types.radar.email.routing.summary_dkim_response import SummaryDKIMResponse -from cloudflare.types.radar.email.routing.summary_dmarc_response import SummaryDMARCResponse -from cloudflare.types.radar.email.routing.summary_encrypted_response import SummaryEncryptedResponse -from cloudflare.types.radar.email.routing.summary_ip_version_response import SummaryIPVersionResponse +from cloudflare.types.radar.email.routing import ( + SummaryARCResponse, + SummarySPFResponse, + SummaryDKIMResponse, + SummaryDMARCResponse, + SummaryEncryptedResponse, + SummaryIPVersionResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,13 +25,11 @@ class TestSummary: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_arc(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.arc() assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_arc_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.arc( @@ -54,7 +54,6 @@ def test_method_arc_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_arc(self, client: Cloudflare) -> None: response = client.radar.email.routing.summary.with_raw_response.arc() @@ -64,7 +63,6 @@ def test_raw_response_arc(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_arc(self, client: Cloudflare) -> None: with client.radar.email.routing.summary.with_streaming_response.arc() as response: @@ -76,13 +74,11 @@ def test_streaming_response_arc(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_dkim(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.dkim() assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.dkim( @@ -107,7 +103,6 @@ def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dkim(self, client: Cloudflare) -> None: response = client.radar.email.routing.summary.with_raw_response.dkim() @@ -117,7 +112,6 @@ def test_raw_response_dkim(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dkim(self, client: Cloudflare) -> None: with client.radar.email.routing.summary.with_streaming_response.dkim() as response: @@ -129,13 +123,11 @@ def test_streaming_response_dkim(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_dmarc(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.dmarc() assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.dmarc( @@ -160,7 +152,6 @@ def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dmarc(self, client: Cloudflare) -> None: response = client.radar.email.routing.summary.with_raw_response.dmarc() @@ -170,7 +161,6 @@ def test_raw_response_dmarc(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dmarc(self, client: Cloudflare) -> None: with client.radar.email.routing.summary.with_streaming_response.dmarc() as response: @@ -182,13 +172,11 @@ def test_streaming_response_dmarc(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_encrypted(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.encrypted() assert_matches_type(SummaryEncryptedResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_encrypted_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.encrypted( @@ -213,7 +201,6 @@ def test_method_encrypted_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryEncryptedResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_encrypted(self, client: Cloudflare) -> None: response = client.radar.email.routing.summary.with_raw_response.encrypted() @@ -223,7 +210,6 @@ def test_raw_response_encrypted(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryEncryptedResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_encrypted(self, client: Cloudflare) -> None: with client.radar.email.routing.summary.with_streaming_response.encrypted() as response: @@ -235,13 +221,11 @@ def test_streaming_response_encrypted(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.ip_version( @@ -266,7 +250,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.email.routing.summary.with_raw_response.ip_version() @@ -276,7 +259,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.email.routing.summary.with_streaming_response.ip_version() as response: @@ -288,13 +270,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_spf(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.spf() assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_spf_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.routing.summary.spf( @@ -319,7 +299,6 @@ def test_method_spf_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_spf(self, client: Cloudflare) -> None: response = client.radar.email.routing.summary.with_raw_response.spf() @@ -329,7 +308,6 @@ def test_raw_response_spf(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_spf(self, client: Cloudflare) -> None: with client.radar.email.routing.summary.with_streaming_response.spf() as response: @@ -345,13 +323,11 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None: class TestAsyncSummary: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.arc() assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.arc( @@ -376,7 +352,6 @@ async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_arc(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.summary.with_raw_response.arc() @@ -386,7 +361,6 @@ async def test_raw_response_arc(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_arc(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.summary.with_streaming_response.arc() as response: @@ -398,13 +372,11 @@ async def test_streaming_response_arc(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_dkim(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.dkim() assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.dkim( @@ -429,7 +401,6 @@ async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dkim(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.summary.with_raw_response.dkim() @@ -439,7 +410,6 @@ async def test_raw_response_dkim(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dkim(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.summary.with_streaming_response.dkim() as response: @@ -451,13 +421,11 @@ async def test_streaming_response_dkim(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_dmarc(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.dmarc() assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.dmarc( @@ -482,7 +450,6 @@ async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dmarc(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.summary.with_raw_response.dmarc() @@ -492,7 +459,6 @@ async def test_raw_response_dmarc(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dmarc(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.summary.with_streaming_response.dmarc() as response: @@ -504,13 +470,11 @@ async def test_streaming_response_dmarc(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_encrypted(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.encrypted() assert_matches_type(SummaryEncryptedResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_encrypted_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.encrypted( @@ -535,7 +499,6 @@ async def test_method_encrypted_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(SummaryEncryptedResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_encrypted(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.summary.with_raw_response.encrypted() @@ -545,7 +508,6 @@ async def test_raw_response_encrypted(self, async_client: AsyncCloudflare) -> No summary = await response.parse() assert_matches_type(SummaryEncryptedResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_encrypted(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.summary.with_streaming_response.encrypted() as response: @@ -557,13 +519,11 @@ async def test_streaming_response_encrypted(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.ip_version( @@ -588,7 +548,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.summary.with_raw_response.ip_version() @@ -598,7 +557,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N summary = await response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.summary.with_streaming_response.ip_version() as response: @@ -610,13 +568,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_spf(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.spf() assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.routing.summary.spf( @@ -641,7 +597,6 @@ async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_spf(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.summary.with_raw_response.spf() @@ -651,7 +606,6 @@ async def test_raw_response_spf(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_spf(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.summary.with_streaming_response.spf() as response: diff --git a/tests/api_resources/radar/email/routing/test_timeseries_groups.py b/tests/api_resources/radar/email/routing/test_timeseries_groups.py index 87384aa42a4..c75e3da7701 100644 --- a/tests/api_resources/radar/email/routing/test_timeseries_groups.py +++ b/tests/api_resources/radar/email/routing/test_timeseries_groups.py @@ -10,12 +10,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.email.routing.timeseries_group_arc_response import TimeseriesGroupARCResponse -from cloudflare.types.radar.email.routing.timeseries_group_spf_response import TimeseriesGroupSPFResponse -from cloudflare.types.radar.email.routing.timeseries_group_dkim_response import TimeseriesGroupDKIMResponse -from cloudflare.types.radar.email.routing.timeseries_group_dmarc_response import TimeseriesGroupDMARCResponse -from cloudflare.types.radar.email.routing.timeseries_group_encrypted_response import TimeseriesGroupEncryptedResponse -from cloudflare.types.radar.email.routing.timeseries_group_ip_version_response import TimeseriesGroupIPVersionResponse +from cloudflare.types.radar.email.routing import ( + TimeseriesGroupARCResponse, + TimeseriesGroupSPFResponse, + TimeseriesGroupDKIMResponse, + TimeseriesGroupDMARCResponse, + TimeseriesGroupEncryptedResponse, + TimeseriesGroupIPVersionResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,13 +25,11 @@ class TestTimeseriesGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_arc(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.arc() assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_arc_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.arc( @@ -55,7 +55,6 @@ def test_method_arc_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_arc(self, client: Cloudflare) -> None: response = client.radar.email.routing.timeseries_groups.with_raw_response.arc() @@ -65,7 +64,6 @@ def test_raw_response_arc(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_arc(self, client: Cloudflare) -> None: with client.radar.email.routing.timeseries_groups.with_streaming_response.arc() as response: @@ -77,13 +75,11 @@ def test_streaming_response_arc(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_dkim(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.dkim() assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.dkim( @@ -109,7 +105,6 @@ def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dkim(self, client: Cloudflare) -> None: response = client.radar.email.routing.timeseries_groups.with_raw_response.dkim() @@ -119,7 +114,6 @@ def test_raw_response_dkim(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dkim(self, client: Cloudflare) -> None: with client.radar.email.routing.timeseries_groups.with_streaming_response.dkim() as response: @@ -131,13 +125,11 @@ def test_streaming_response_dkim(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_dmarc(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.dmarc() assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.dmarc( @@ -163,7 +155,6 @@ def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dmarc(self, client: Cloudflare) -> None: response = client.radar.email.routing.timeseries_groups.with_raw_response.dmarc() @@ -173,7 +164,6 @@ def test_raw_response_dmarc(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dmarc(self, client: Cloudflare) -> None: with client.radar.email.routing.timeseries_groups.with_streaming_response.dmarc() as response: @@ -185,13 +175,11 @@ def test_streaming_response_dmarc(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_encrypted(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.encrypted() assert_matches_type(TimeseriesGroupEncryptedResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_encrypted_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.encrypted( @@ -217,7 +205,6 @@ def test_method_encrypted_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupEncryptedResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_encrypted(self, client: Cloudflare) -> None: response = client.radar.email.routing.timeseries_groups.with_raw_response.encrypted() @@ -227,7 +214,6 @@ def test_raw_response_encrypted(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupEncryptedResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_encrypted(self, client: Cloudflare) -> None: with client.radar.email.routing.timeseries_groups.with_streaming_response.encrypted() as response: @@ -239,13 +225,11 @@ def test_streaming_response_encrypted(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.ip_version( @@ -271,7 +255,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.email.routing.timeseries_groups.with_raw_response.ip_version() @@ -281,7 +264,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.email.routing.timeseries_groups.with_streaming_response.ip_version() as response: @@ -293,13 +275,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_spf(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.spf() assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_spf_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.routing.timeseries_groups.spf( @@ -325,7 +305,6 @@ def test_method_spf_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_spf(self, client: Cloudflare) -> None: response = client.radar.email.routing.timeseries_groups.with_raw_response.spf() @@ -335,7 +314,6 @@ def test_raw_response_spf(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_spf(self, client: Cloudflare) -> None: with client.radar.email.routing.timeseries_groups.with_streaming_response.spf() as response: @@ -351,13 +329,11 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.arc() assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.arc( @@ -383,7 +359,6 @@ async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_arc(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.timeseries_groups.with_raw_response.arc() @@ -393,7 +368,6 @@ async def test_raw_response_arc(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_arc(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.timeseries_groups.with_streaming_response.arc() as response: @@ -405,13 +379,11 @@ async def test_streaming_response_arc(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_dkim(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.dkim() assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.dkim( @@ -437,7 +409,6 @@ async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dkim(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.timeseries_groups.with_raw_response.dkim() @@ -447,7 +418,6 @@ async def test_raw_response_dkim(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dkim(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.timeseries_groups.with_streaming_response.dkim() as response: @@ -459,13 +429,11 @@ async def test_streaming_response_dkim(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_dmarc(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.dmarc() assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.dmarc( @@ -491,7 +459,6 @@ async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dmarc(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.timeseries_groups.with_raw_response.dmarc() @@ -501,7 +468,6 @@ async def test_raw_response_dmarc(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dmarc(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.timeseries_groups.with_streaming_response.dmarc() as response: @@ -513,13 +479,11 @@ async def test_streaming_response_dmarc(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_encrypted(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.encrypted() assert_matches_type(TimeseriesGroupEncryptedResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_encrypted_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.encrypted( @@ -545,7 +509,6 @@ async def test_method_encrypted_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(TimeseriesGroupEncryptedResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_encrypted(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.timeseries_groups.with_raw_response.encrypted() @@ -555,7 +518,6 @@ async def test_raw_response_encrypted(self, async_client: AsyncCloudflare) -> No timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupEncryptedResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_encrypted(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.timeseries_groups.with_streaming_response.encrypted() as response: @@ -567,13 +529,11 @@ async def test_streaming_response_encrypted(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.ip_version( @@ -599,7 +559,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.timeseries_groups.with_raw_response.ip_version() @@ -609,7 +568,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.timeseries_groups.with_streaming_response.ip_version() as response: @@ -621,13 +579,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_spf(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.spf() assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.routing.timeseries_groups.spf( @@ -653,7 +609,6 @@ async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_spf(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.routing.timeseries_groups.with_raw_response.spf() @@ -663,7 +618,6 @@ async def test_raw_response_spf(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_spf(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.routing.timeseries_groups.with_streaming_response.spf() as response: diff --git a/tests/api_resources/radar/email/security/test_summary.py b/tests/api_resources/radar/email/security/test_summary.py index 184499e541f..4fb28b76274 100644 --- a/tests/api_resources/radar/email/security/test_summary.py +++ b/tests/api_resources/radar/email/security/test_summary.py @@ -10,15 +10,17 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.email.security.summary_arc_response import SummaryARCResponse -from cloudflare.types.radar.email.security.summary_spf_response import SummarySPFResponse -from cloudflare.types.radar.email.security.summary_dkim_response import SummaryDKIMResponse -from cloudflare.types.radar.email.security.summary_spam_response import SummarySpamResponse -from cloudflare.types.radar.email.security.summary_dmarc_response import SummaryDMARCResponse -from cloudflare.types.radar.email.security.summary_spoof_response import SummarySpoofResponse -from cloudflare.types.radar.email.security.summary_malicious_response import SummaryMaliciousResponse -from cloudflare.types.radar.email.security.summary_tls_version_response import SummaryTLSVersionResponse -from cloudflare.types.radar.email.security.summary_threat_category_response import SummaryThreatCategoryResponse +from cloudflare.types.radar.email.security import ( + SummaryARCResponse, + SummarySPFResponse, + SummaryDKIMResponse, + SummarySpamResponse, + SummaryDMARCResponse, + SummarySpoofResponse, + SummaryMaliciousResponse, + SummaryTLSVersionResponse, + SummaryThreatCategoryResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,13 +28,11 @@ class TestSummary: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_arc(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.arc() assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_arc_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.arc( @@ -56,7 +56,6 @@ def test_method_arc_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_arc(self, client: Cloudflare) -> None: response = client.radar.email.security.summary.with_raw_response.arc() @@ -66,7 +65,6 @@ def test_raw_response_arc(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_arc(self, client: Cloudflare) -> None: with client.radar.email.security.summary.with_streaming_response.arc() as response: @@ -78,13 +76,11 @@ def test_streaming_response_arc(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_dkim(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.dkim() assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.dkim( @@ -108,7 +104,6 @@ def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dkim(self, client: Cloudflare) -> None: response = client.radar.email.security.summary.with_raw_response.dkim() @@ -118,7 +113,6 @@ def test_raw_response_dkim(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dkim(self, client: Cloudflare) -> None: with client.radar.email.security.summary.with_streaming_response.dkim() as response: @@ -130,13 +124,11 @@ def test_streaming_response_dkim(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_dmarc(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.dmarc() assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.dmarc( @@ -160,7 +152,6 @@ def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dmarc(self, client: Cloudflare) -> None: response = client.radar.email.security.summary.with_raw_response.dmarc() @@ -170,7 +161,6 @@ def test_raw_response_dmarc(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dmarc(self, client: Cloudflare) -> None: with client.radar.email.security.summary.with_streaming_response.dmarc() as response: @@ -182,13 +172,11 @@ def test_streaming_response_dmarc(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_malicious(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.malicious() assert_matches_type(SummaryMaliciousResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_malicious_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.malicious( @@ -213,7 +201,6 @@ def test_method_malicious_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryMaliciousResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_malicious(self, client: Cloudflare) -> None: response = client.radar.email.security.summary.with_raw_response.malicious() @@ -223,7 +210,6 @@ def test_raw_response_malicious(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryMaliciousResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_malicious(self, client: Cloudflare) -> None: with client.radar.email.security.summary.with_streaming_response.malicious() as response: @@ -235,13 +221,11 @@ def test_streaming_response_malicious(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_spam(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.spam() assert_matches_type(SummarySpamResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_spam_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.spam( @@ -266,7 +250,6 @@ def test_method_spam_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummarySpamResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_spam(self, client: Cloudflare) -> None: response = client.radar.email.security.summary.with_raw_response.spam() @@ -276,7 +259,6 @@ def test_raw_response_spam(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummarySpamResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_spam(self, client: Cloudflare) -> None: with client.radar.email.security.summary.with_streaming_response.spam() as response: @@ -288,13 +270,11 @@ def test_streaming_response_spam(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_spf(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.spf() assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_spf_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.spf( @@ -318,7 +298,6 @@ def test_method_spf_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_spf(self, client: Cloudflare) -> None: response = client.radar.email.security.summary.with_raw_response.spf() @@ -328,7 +307,6 @@ def test_raw_response_spf(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_spf(self, client: Cloudflare) -> None: with client.radar.email.security.summary.with_streaming_response.spf() as response: @@ -340,13 +318,11 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_spoof(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.spoof() assert_matches_type(SummarySpoofResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_spoof_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.spoof( @@ -371,7 +347,6 @@ def test_method_spoof_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummarySpoofResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_spoof(self, client: Cloudflare) -> None: response = client.radar.email.security.summary.with_raw_response.spoof() @@ -381,7 +356,6 @@ def test_raw_response_spoof(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummarySpoofResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_spoof(self, client: Cloudflare) -> None: with client.radar.email.security.summary.with_streaming_response.spoof() as response: @@ -393,13 +367,11 @@ def test_streaming_response_spoof(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_threat_category(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.threat_category() assert_matches_type(SummaryThreatCategoryResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_threat_category_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.threat_category( @@ -424,7 +396,6 @@ def test_method_threat_category_with_all_params(self, client: Cloudflare) -> Non ) assert_matches_type(SummaryThreatCategoryResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_threat_category(self, client: Cloudflare) -> None: response = client.radar.email.security.summary.with_raw_response.threat_category() @@ -434,7 +405,6 @@ def test_raw_response_threat_category(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryThreatCategoryResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_threat_category(self, client: Cloudflare) -> None: with client.radar.email.security.summary.with_streaming_response.threat_category() as response: @@ -446,13 +416,11 @@ def test_streaming_response_threat_category(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_tls_version(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.tls_version() assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.email.security.summary.tls_version( @@ -476,7 +444,6 @@ def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_tls_version(self, client: Cloudflare) -> None: response = client.radar.email.security.summary.with_raw_response.tls_version() @@ -486,7 +453,6 @@ def test_raw_response_tls_version(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_tls_version(self, client: Cloudflare) -> None: with client.radar.email.security.summary.with_streaming_response.tls_version() as response: @@ -502,13 +468,11 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncSummary: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.arc() assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.arc( @@ -532,7 +496,6 @@ async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_arc(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.summary.with_raw_response.arc() @@ -542,7 +505,6 @@ async def test_raw_response_arc(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_arc(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.summary.with_streaming_response.arc() as response: @@ -554,13 +516,11 @@ async def test_streaming_response_arc(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_dkim(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.dkim() assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.dkim( @@ -584,7 +544,6 @@ async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dkim(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.summary.with_raw_response.dkim() @@ -594,7 +553,6 @@ async def test_raw_response_dkim(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryDKIMResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dkim(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.summary.with_streaming_response.dkim() as response: @@ -606,13 +564,11 @@ async def test_streaming_response_dkim(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_dmarc(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.dmarc() assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.dmarc( @@ -636,7 +592,6 @@ async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dmarc(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.summary.with_raw_response.dmarc() @@ -646,7 +601,6 @@ async def test_raw_response_dmarc(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryDMARCResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dmarc(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.summary.with_streaming_response.dmarc() as response: @@ -658,13 +612,11 @@ async def test_streaming_response_dmarc(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_malicious(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.malicious() assert_matches_type(SummaryMaliciousResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_malicious_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.malicious( @@ -689,7 +641,6 @@ async def test_method_malicious_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(SummaryMaliciousResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_malicious(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.summary.with_raw_response.malicious() @@ -699,7 +650,6 @@ async def test_raw_response_malicious(self, async_client: AsyncCloudflare) -> No summary = await response.parse() assert_matches_type(SummaryMaliciousResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_malicious(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.summary.with_streaming_response.malicious() as response: @@ -711,13 +661,11 @@ async def test_streaming_response_malicious(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_spam(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.spam() assert_matches_type(SummarySpamResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_spam_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.spam( @@ -742,7 +690,6 @@ async def test_method_spam_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(SummarySpamResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_spam(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.summary.with_raw_response.spam() @@ -752,7 +699,6 @@ async def test_raw_response_spam(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummarySpamResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_spam(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.summary.with_streaming_response.spam() as response: @@ -764,13 +710,11 @@ async def test_streaming_response_spam(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_spf(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.spf() assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.spf( @@ -794,7 +738,6 @@ async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_spf(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.summary.with_raw_response.spf() @@ -804,7 +747,6 @@ async def test_raw_response_spf(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummarySPFResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_spf(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.summary.with_streaming_response.spf() as response: @@ -816,13 +758,11 @@ async def test_streaming_response_spf(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_spoof(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.spoof() assert_matches_type(SummarySpoofResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_spoof_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.spoof( @@ -847,7 +787,6 @@ async def test_method_spoof_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(SummarySpoofResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_spoof(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.summary.with_raw_response.spoof() @@ -857,7 +796,6 @@ async def test_raw_response_spoof(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummarySpoofResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_spoof(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.summary.with_streaming_response.spoof() as response: @@ -869,13 +807,11 @@ async def test_streaming_response_spoof(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_threat_category(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.threat_category() assert_matches_type(SummaryThreatCategoryResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_threat_category_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.threat_category( @@ -900,7 +836,6 @@ async def test_method_threat_category_with_all_params(self, async_client: AsyncC ) assert_matches_type(SummaryThreatCategoryResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_threat_category(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.summary.with_raw_response.threat_category() @@ -910,7 +845,6 @@ async def test_raw_response_threat_category(self, async_client: AsyncCloudflare) summary = await response.parse() assert_matches_type(SummaryThreatCategoryResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_threat_category(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.summary.with_streaming_response.threat_category() as response: @@ -922,13 +856,11 @@ async def test_streaming_response_threat_category(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_tls_version(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.tls_version() assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_tls_version_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.email.security.summary.tls_version( @@ -952,7 +884,6 @@ async def test_method_tls_version_with_all_params(self, async_client: AsyncCloud ) assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_tls_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.summary.with_raw_response.tls_version() @@ -962,7 +893,6 @@ async def test_raw_response_tls_version(self, async_client: AsyncCloudflare) -> summary = await response.parse() assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_tls_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.summary.with_streaming_response.tls_version() as response: diff --git a/tests/api_resources/radar/email/security/test_timeseries_groups.py b/tests/api_resources/radar/email/security/test_timeseries_groups.py index ddb4b23599e..b9b4674e1e2 100644 --- a/tests/api_resources/radar/email/security/test_timeseries_groups.py +++ b/tests/api_resources/radar/email/security/test_timeseries_groups.py @@ -10,17 +10,15 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.email.security.timeseries_group_arc_response import TimeseriesGroupARCResponse -from cloudflare.types.radar.email.security.timeseries_group_spf_response import TimeseriesGroupSPFResponse -from cloudflare.types.radar.email.security.timeseries_group_dkim_response import TimeseriesGroupDKIMResponse -from cloudflare.types.radar.email.security.timeseries_group_spam_response import TimeseriesGroupSpamResponse -from cloudflare.types.radar.email.security.timeseries_group_dmarc_response import TimeseriesGroupDMARCResponse -from cloudflare.types.radar.email.security.timeseries_group_spoof_response import TimeseriesGroupSpoofResponse -from cloudflare.types.radar.email.security.timeseries_group_malicious_response import TimeseriesGroupMaliciousResponse -from cloudflare.types.radar.email.security.timeseries_group_tls_version_response import ( +from cloudflare.types.radar.email.security import ( + TimeseriesGroupARCResponse, + TimeseriesGroupSPFResponse, + TimeseriesGroupDKIMResponse, + TimeseriesGroupSpamResponse, + TimeseriesGroupDMARCResponse, + TimeseriesGroupSpoofResponse, + TimeseriesGroupMaliciousResponse, TimeseriesGroupTLSVersionResponse, -) -from cloudflare.types.radar.email.security.timeseries_group_threat_category_response import ( TimeseriesGroupThreatCategoryResponse, ) @@ -30,13 +28,11 @@ class TestTimeseriesGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_arc(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.arc() assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_arc_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.arc( @@ -61,7 +57,6 @@ def test_method_arc_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_arc(self, client: Cloudflare) -> None: response = client.radar.email.security.timeseries_groups.with_raw_response.arc() @@ -71,7 +66,6 @@ def test_raw_response_arc(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_arc(self, client: Cloudflare) -> None: with client.radar.email.security.timeseries_groups.with_streaming_response.arc() as response: @@ -83,13 +77,11 @@ def test_streaming_response_arc(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_dkim(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.dkim() assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.dkim( @@ -114,7 +106,6 @@ def test_method_dkim_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dkim(self, client: Cloudflare) -> None: response = client.radar.email.security.timeseries_groups.with_raw_response.dkim() @@ -124,7 +115,6 @@ def test_raw_response_dkim(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dkim(self, client: Cloudflare) -> None: with client.radar.email.security.timeseries_groups.with_streaming_response.dkim() as response: @@ -136,13 +126,11 @@ def test_streaming_response_dkim(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_dmarc(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.dmarc() assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.dmarc( @@ -167,7 +155,6 @@ def test_method_dmarc_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_dmarc(self, client: Cloudflare) -> None: response = client.radar.email.security.timeseries_groups.with_raw_response.dmarc() @@ -177,7 +164,6 @@ def test_raw_response_dmarc(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_dmarc(self, client: Cloudflare) -> None: with client.radar.email.security.timeseries_groups.with_streaming_response.dmarc() as response: @@ -189,13 +175,11 @@ def test_streaming_response_dmarc(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_malicious(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.malicious() assert_matches_type(TimeseriesGroupMaliciousResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_malicious_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.malicious( @@ -221,7 +205,6 @@ def test_method_malicious_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupMaliciousResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_malicious(self, client: Cloudflare) -> None: response = client.radar.email.security.timeseries_groups.with_raw_response.malicious() @@ -231,7 +214,6 @@ def test_raw_response_malicious(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupMaliciousResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_malicious(self, client: Cloudflare) -> None: with client.radar.email.security.timeseries_groups.with_streaming_response.malicious() as response: @@ -243,13 +225,11 @@ def test_streaming_response_malicious(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_spam(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.spam() assert_matches_type(TimeseriesGroupSpamResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_spam_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.spam( @@ -275,7 +255,6 @@ def test_method_spam_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupSpamResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_spam(self, client: Cloudflare) -> None: response = client.radar.email.security.timeseries_groups.with_raw_response.spam() @@ -285,7 +264,6 @@ def test_raw_response_spam(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupSpamResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_spam(self, client: Cloudflare) -> None: with client.radar.email.security.timeseries_groups.with_streaming_response.spam() as response: @@ -297,13 +275,11 @@ def test_streaming_response_spam(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_spf(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.spf() assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_spf_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.spf( @@ -328,7 +304,6 @@ def test_method_spf_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_spf(self, client: Cloudflare) -> None: response = client.radar.email.security.timeseries_groups.with_raw_response.spf() @@ -338,7 +313,6 @@ def test_raw_response_spf(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_spf(self, client: Cloudflare) -> None: with client.radar.email.security.timeseries_groups.with_streaming_response.spf() as response: @@ -350,13 +324,11 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_spoof(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.spoof() assert_matches_type(TimeseriesGroupSpoofResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_spoof_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.spoof( @@ -382,7 +354,6 @@ def test_method_spoof_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupSpoofResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_spoof(self, client: Cloudflare) -> None: response = client.radar.email.security.timeseries_groups.with_raw_response.spoof() @@ -392,7 +363,6 @@ def test_raw_response_spoof(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupSpoofResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_spoof(self, client: Cloudflare) -> None: with client.radar.email.security.timeseries_groups.with_streaming_response.spoof() as response: @@ -404,13 +374,11 @@ def test_streaming_response_spoof(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_threat_category(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.threat_category() assert_matches_type(TimeseriesGroupThreatCategoryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_threat_category_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.threat_category( @@ -436,7 +404,6 @@ def test_method_threat_category_with_all_params(self, client: Cloudflare) -> Non ) assert_matches_type(TimeseriesGroupThreatCategoryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_threat_category(self, client: Cloudflare) -> None: response = client.radar.email.security.timeseries_groups.with_raw_response.threat_category() @@ -446,7 +413,6 @@ def test_raw_response_threat_category(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupThreatCategoryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_threat_category(self, client: Cloudflare) -> None: with client.radar.email.security.timeseries_groups.with_streaming_response.threat_category() as response: @@ -458,13 +424,11 @@ def test_streaming_response_threat_category(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_tls_version(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.tls_version() assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.email.security.timeseries_groups.tls_version( @@ -489,7 +453,6 @@ def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_tls_version(self, client: Cloudflare) -> None: response = client.radar.email.security.timeseries_groups.with_raw_response.tls_version() @@ -499,7 +462,6 @@ def test_raw_response_tls_version(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_tls_version(self, client: Cloudflare) -> None: with client.radar.email.security.timeseries_groups.with_streaming_response.tls_version() as response: @@ -515,13 +477,11 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.arc() assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.arc( @@ -546,7 +506,6 @@ async def test_method_arc_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_arc(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.timeseries_groups.with_raw_response.arc() @@ -556,7 +515,6 @@ async def test_raw_response_arc(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_arc(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.timeseries_groups.with_streaming_response.arc() as response: @@ -568,13 +526,11 @@ async def test_streaming_response_arc(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_dkim(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.dkim() assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.dkim( @@ -599,7 +555,6 @@ async def test_method_dkim_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dkim(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.timeseries_groups.with_raw_response.dkim() @@ -609,7 +564,6 @@ async def test_raw_response_dkim(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupDKIMResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dkim(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.timeseries_groups.with_streaming_response.dkim() as response: @@ -621,13 +575,11 @@ async def test_streaming_response_dkim(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_dmarc(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.dmarc() assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.dmarc( @@ -652,7 +604,6 @@ async def test_method_dmarc_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_dmarc(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.timeseries_groups.with_raw_response.dmarc() @@ -662,7 +613,6 @@ async def test_raw_response_dmarc(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupDMARCResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_dmarc(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.timeseries_groups.with_streaming_response.dmarc() as response: @@ -674,13 +624,11 @@ async def test_streaming_response_dmarc(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_malicious(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.malicious() assert_matches_type(TimeseriesGroupMaliciousResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_malicious_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.malicious( @@ -706,7 +654,6 @@ async def test_method_malicious_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(TimeseriesGroupMaliciousResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_malicious(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.timeseries_groups.with_raw_response.malicious() @@ -716,7 +663,6 @@ async def test_raw_response_malicious(self, async_client: AsyncCloudflare) -> No timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupMaliciousResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_malicious(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.timeseries_groups.with_streaming_response.malicious() as response: @@ -728,13 +674,11 @@ async def test_streaming_response_malicious(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_spam(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.spam() assert_matches_type(TimeseriesGroupSpamResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_spam_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.spam( @@ -760,7 +704,6 @@ async def test_method_spam_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TimeseriesGroupSpamResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_spam(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.timeseries_groups.with_raw_response.spam() @@ -770,7 +713,6 @@ async def test_raw_response_spam(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupSpamResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_spam(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.timeseries_groups.with_streaming_response.spam() as response: @@ -782,13 +724,11 @@ async def test_streaming_response_spam(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_spf(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.spf() assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.spf( @@ -813,7 +753,6 @@ async def test_method_spf_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_spf(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.timeseries_groups.with_raw_response.spf() @@ -823,7 +762,6 @@ async def test_raw_response_spf(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupSPFResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_spf(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.timeseries_groups.with_streaming_response.spf() as response: @@ -835,13 +773,11 @@ async def test_streaming_response_spf(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_spoof(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.spoof() assert_matches_type(TimeseriesGroupSpoofResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_spoof_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.spoof( @@ -867,7 +803,6 @@ async def test_method_spoof_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TimeseriesGroupSpoofResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_spoof(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.timeseries_groups.with_raw_response.spoof() @@ -877,7 +812,6 @@ async def test_raw_response_spoof(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupSpoofResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_spoof(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.timeseries_groups.with_streaming_response.spoof() as response: @@ -889,13 +823,11 @@ async def test_streaming_response_spoof(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_threat_category(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.threat_category() assert_matches_type(TimeseriesGroupThreatCategoryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_threat_category_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.threat_category( @@ -921,7 +853,6 @@ async def test_method_threat_category_with_all_params(self, async_client: AsyncC ) assert_matches_type(TimeseriesGroupThreatCategoryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_threat_category(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.timeseries_groups.with_raw_response.threat_category() @@ -931,7 +862,6 @@ async def test_raw_response_threat_category(self, async_client: AsyncCloudflare) timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupThreatCategoryResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_threat_category(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.timeseries_groups.with_streaming_response.threat_category() as response: @@ -943,13 +873,11 @@ async def test_streaming_response_threat_category(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_tls_version(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.tls_version() assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_tls_version_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.email.security.timeseries_groups.tls_version( @@ -974,7 +902,6 @@ async def test_method_tls_version_with_all_params(self, async_client: AsyncCloud ) assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_tls_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.timeseries_groups.with_raw_response.tls_version() @@ -984,7 +911,6 @@ async def test_raw_response_tls_version(self, async_client: AsyncCloudflare) -> timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_tls_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.timeseries_groups.with_streaming_response.tls_version() as response: diff --git a/tests/api_resources/radar/email/security/top/test_tlds.py b/tests/api_resources/radar/email/security/top/test_tlds.py index def47cffc7b..f0307596a1a 100644 --- a/tests/api_resources/radar/email/security/top/test_tlds.py +++ b/tests/api_resources/radar/email/security/top/test_tlds.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.email.security.top.tld_get_response import TldGetResponse +from cloudflare.types.radar.email.security.top import TldGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestTlds: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tld = client.radar.email.security.top.tlds.get() assert_matches_type(TldGetResponse, tld, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: tld = client.radar.email.security.top.tlds.get( @@ -51,7 +49,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TldGetResponse, tld, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.with_raw_response.get() @@ -61,7 +58,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tld = response.parse() assert_matches_type(TldGetResponse, tld, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.with_streaming_response.get() as response: @@ -77,13 +73,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTlds: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tld = await async_client.radar.email.security.top.tlds.get() assert_matches_type(TldGetResponse, tld, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: tld = await async_client.radar.email.security.top.tlds.get( @@ -110,7 +104,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TldGetResponse, tld, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.with_raw_response.get() @@ -120,7 +113,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tld = await response.parse() assert_matches_type(TldGetResponse, tld, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.top.tlds.with_streaming_response.get() as response: diff --git a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py index 705b7b82018..290d8768747 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.email.security.top.tlds.malicious_get_response import MaliciousGetResponse +from cloudflare.types.radar.email.security.top.tlds import MaliciousGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestMalicious: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: malicious = client.radar.email.security.top.tlds.malicious.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: malicious = client.radar.email.security.top.tlds.malicious.get( @@ -54,7 +52,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.malicious.with_raw_response.get( @@ -66,7 +63,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: malicious = response.parse() assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.malicious.with_streaming_response.get( @@ -84,7 +80,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncMalicious: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: malicious = await async_client.radar.email.security.top.tlds.malicious.get( @@ -92,7 +87,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: malicious = await async_client.radar.email.security.top.tlds.malicious.get( @@ -120,7 +114,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.malicious.with_raw_response.get( @@ -132,7 +125,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: malicious = await response.parse() assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.top.tlds.malicious.with_streaming_response.get( diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spam.py b/tests/api_resources/radar/email/security/top/tlds/test_spam.py index 0a98e2f14ed..4991fa622eb 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spam.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spam.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.email.security.top.tlds.spam_get_response import SpamGetResponse +from cloudflare.types.radar.email.security.top.tlds import SpamGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestSpam: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: spam = client.radar.email.security.top.tlds.spam.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(SpamGetResponse, spam, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: spam = client.radar.email.security.top.tlds.spam.get( @@ -54,7 +52,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SpamGetResponse, spam, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.spam.with_raw_response.get( @@ -66,7 +63,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: spam = response.parse() assert_matches_type(SpamGetResponse, spam, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.spam.with_streaming_response.get( @@ -84,7 +80,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncSpam: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: spam = await async_client.radar.email.security.top.tlds.spam.get( @@ -92,7 +87,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SpamGetResponse, spam, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: spam = await async_client.radar.email.security.top.tlds.spam.get( @@ -120,7 +114,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(SpamGetResponse, spam, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.spam.with_raw_response.get( @@ -132,7 +125,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: spam = await response.parse() assert_matches_type(SpamGetResponse, spam, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.top.tlds.spam.with_streaming_response.get( diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py index 15a09dc7c6b..3800432f585 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.email.security.top.tlds.spoof_get_response import SpoofGetResponse +from cloudflare.types.radar.email.security.top.tlds import SpoofGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestSpoof: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: spoof = client.radar.email.security.top.tlds.spoof.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(SpoofGetResponse, spoof, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: spoof = client.radar.email.security.top.tlds.spoof.get( @@ -54,7 +52,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SpoofGetResponse, spoof, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.spoof.with_raw_response.get( @@ -66,7 +63,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: spoof = response.parse() assert_matches_type(SpoofGetResponse, spoof, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.spoof.with_streaming_response.get( @@ -84,7 +80,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncSpoof: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: spoof = await async_client.radar.email.security.top.tlds.spoof.get( @@ -92,7 +87,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SpoofGetResponse, spoof, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: spoof = await async_client.radar.email.security.top.tlds.spoof.get( @@ -120,7 +114,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(SpoofGetResponse, spoof, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.spoof.with_raw_response.get( @@ -132,7 +125,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: spoof = await response.parse() assert_matches_type(SpoofGetResponse, spoof, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.top.tlds.spoof.with_streaming_response.get( diff --git a/tests/api_resources/radar/entities/test_asns.py b/tests/api_resources/radar/entities/test_asns.py index 958e4fb3ea6..0a1ad904dc7 100644 --- a/tests/api_resources/radar/entities/test_asns.py +++ b/tests/api_resources/radar/entities/test_asns.py @@ -9,10 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.radar.entities.asn_ip_response import ASNIPResponse -from cloudflare.types.radar.entities.asn_get_response import ASNGetResponse -from cloudflare.types.radar.entities.asn_rel_response import ASNRelResponse -from cloudflare.types.radar.entities.asn_list_response import ASNListResponse +from cloudflare.types.radar.entities import ( + ASNIPResponse, + ASNGetResponse, + ASNRelResponse, + ASNListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,13 +22,11 @@ class TestASNs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.list() assert_matches_type(ASNListResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.list( @@ -39,7 +39,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ASNListResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.radar.entities.asns.with_raw_response.list() @@ -49,7 +48,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: asn = response.parse() assert_matches_type(ASNListResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.radar.entities.asns.with_streaming_response.list() as response: @@ -61,7 +59,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.get( @@ -69,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ASNGetResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.get( @@ -78,7 +74,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ASNGetResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.entities.asns.with_raw_response.get( @@ -90,7 +85,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: asn = response.parse() assert_matches_type(ASNGetResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.entities.asns.with_streaming_response.get( @@ -104,7 +98,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.ip( @@ -112,7 +105,6 @@ def test_method_ip(self, client: Cloudflare) -> None: ) assert_matches_type(ASNIPResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_with_all_params(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.ip( @@ -121,7 +113,6 @@ def test_method_ip_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ASNIPResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip(self, client: Cloudflare) -> None: response = client.radar.entities.asns.with_raw_response.ip( @@ -133,7 +124,6 @@ def test_raw_response_ip(self, client: Cloudflare) -> None: asn = response.parse() assert_matches_type(ASNIPResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip(self, client: Cloudflare) -> None: with client.radar.entities.asns.with_streaming_response.ip( @@ -147,7 +137,6 @@ def test_streaming_response_ip(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_rel(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.rel( @@ -155,7 +144,6 @@ def test_method_rel(self, client: Cloudflare) -> None: ) assert_matches_type(ASNRelResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_rel_with_all_params(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.rel( @@ -165,7 +153,6 @@ def test_method_rel_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ASNRelResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_rel(self, client: Cloudflare) -> None: response = client.radar.entities.asns.with_raw_response.rel( @@ -177,7 +164,6 @@ def test_raw_response_rel(self, client: Cloudflare) -> None: asn = response.parse() assert_matches_type(ASNRelResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_rel(self, client: Cloudflare) -> None: with client.radar.entities.asns.with_streaming_response.rel( @@ -195,13 +181,11 @@ def test_streaming_response_rel(self, client: Cloudflare) -> None: class TestAsyncASNs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.list() assert_matches_type(ASNListResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.list( @@ -214,7 +198,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(ASNListResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.asns.with_raw_response.list() @@ -224,7 +207,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: asn = await response.parse() assert_matches_type(ASNListResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.asns.with_streaming_response.list() as response: @@ -236,7 +218,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.get( @@ -244,7 +225,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ASNGetResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.get( @@ -253,7 +233,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(ASNGetResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.asns.with_raw_response.get( @@ -265,7 +244,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: asn = await response.parse() assert_matches_type(ASNGetResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.asns.with_streaming_response.get( @@ -279,7 +257,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.ip( @@ -287,7 +264,6 @@ async def test_method_ip(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ASNIPResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_with_all_params(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.ip( @@ -296,7 +272,6 @@ async def test_method_ip_with_all_params(self, async_client: AsyncCloudflare) -> ) assert_matches_type(ASNIPResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.asns.with_raw_response.ip( @@ -308,7 +283,6 @@ async def test_raw_response_ip(self, async_client: AsyncCloudflare) -> None: asn = await response.parse() assert_matches_type(ASNIPResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.asns.with_streaming_response.ip( @@ -322,7 +296,6 @@ async def test_streaming_response_ip(self, async_client: AsyncCloudflare) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_rel(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.rel( @@ -330,7 +303,6 @@ async def test_method_rel(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ASNRelResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_rel_with_all_params(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.rel( @@ -340,7 +312,6 @@ async def test_method_rel_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(ASNRelResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_rel(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.asns.with_raw_response.rel( @@ -352,7 +323,6 @@ async def test_raw_response_rel(self, async_client: AsyncCloudflare) -> None: asn = await response.parse() assert_matches_type(ASNRelResponse, asn, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_rel(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.asns.with_streaming_response.rel( diff --git a/tests/api_resources/radar/entities/test_locations.py b/tests/api_resources/radar/entities/test_locations.py index 36ae6224790..6cb88295e26 100644 --- a/tests/api_resources/radar/entities/test_locations.py +++ b/tests/api_resources/radar/entities/test_locations.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.radar.entities.location_get_response import LocationGetResponse -from cloudflare.types.radar.entities.location_list_response import LocationListResponse +from cloudflare.types.radar.entities import ( + LocationGetResponse, + LocationListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +20,11 @@ class TestLocations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: location = client.radar.entities.locations.list() assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: location = client.radar.entities.locations.list( @@ -35,7 +35,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.radar.entities.locations.with_raw_response.list() @@ -45,7 +44,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.radar.entities.locations.with_streaming_response.list() as response: @@ -57,7 +55,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: location = client.radar.entities.locations.get( @@ -65,7 +62,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: location = client.radar.entities.locations.get( @@ -74,7 +70,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.entities.locations.with_raw_response.get( @@ -86,7 +81,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.entities.locations.with_streaming_response.get( @@ -100,7 +94,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `location` but received ''"): @@ -112,13 +105,11 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLocations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.entities.locations.list() assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.entities.locations.list( @@ -129,7 +120,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.locations.with_raw_response.list() @@ -139,7 +129,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.locations.with_streaming_response.list() as response: @@ -151,7 +140,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.entities.locations.get( @@ -159,7 +147,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.entities.locations.get( @@ -168,7 +155,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.locations.with_raw_response.get( @@ -180,7 +166,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.locations.with_streaming_response.get( @@ -194,7 +179,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `location` but received ''"): diff --git a/tests/api_resources/radar/http/ases/test_bot_class.py b/tests/api_resources/radar/http/ases/test_bot_class.py index a804ae8a959..c1196859b45 100644 --- a/tests/api_resources/radar/http/ases/test_bot_class.py +++ b/tests/api_resources/radar/http/ases/test_bot_class.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.ases.bot_class_get_response import BotClassGetResponse +from cloudflare.types.radar.http.ases import BotClassGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestBotClass: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bot_class = client.radar.http.ases.bot_class.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bot_class = client.radar.http.ases.bot_class.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.bot_class.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: bot_class = response.parse() assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.bot_class.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBotClass: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.ases.bot_class.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.ases.bot_class.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.bot_class.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: bot_class = await response.parse() assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.bot_class.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/ases/test_device_type.py b/tests/api_resources/radar/http/ases/test_device_type.py index 391e750c55e..cbf61936f48 100644 --- a/tests/api_resources/radar/http/ases/test_device_type.py +++ b/tests/api_resources/radar/http/ases/test_device_type.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.ases.device_type_get_response import DeviceTypeGetResponse +from cloudflare.types.radar.http.ases import DeviceTypeGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestDeviceType: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: device_type = client.radar.http.ases.device_type.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: device_type = client.radar.http.ases.device_type.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.device_type.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: device_type = response.parse() assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.device_type.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncDeviceType: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.ases.device_type.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.ases.device_type.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.device_type.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: device_type = await response.parse() assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.device_type.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/ases/test_http_method.py b/tests/api_resources/radar/http/ases/test_http_method.py index 03efb0c4ff9..e791bb09aa4 100644 --- a/tests/api_resources/radar/http/ases/test_http_method.py +++ b/tests/api_resources/radar/http/ases/test_http_method.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.ases.http_method_get_response import HTTPMethodGetResponse +from cloudflare.types.radar.http.ases import HTTPMethodGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestHTTPMethod: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: http_method = client.radar.http.ases.http_method.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_method = client.radar.http.ases.http_method.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.http_method.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: http_method = response.parse() assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.http_method.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPMethod: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.ases.http_method.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.ases.http_method.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.http_method.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: http_method = await response.parse() assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.http_method.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/ases/test_http_protocol.py b/tests/api_resources/radar/http/ases/test_http_protocol.py index 16d31c48ba6..37266961af0 100644 --- a/tests/api_resources/radar/http/ases/test_http_protocol.py +++ b/tests/api_resources/radar/http/ases/test_http_protocol.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.ases.http_protocol_get_response import HTTPProtocolGetResponse +from cloudflare.types.radar.http.ases import HTTPProtocolGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestHTTPProtocol: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: http_protocol = client.radar.http.ases.http_protocol.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_protocol = client.radar.http.ases.http_protocol.get( @@ -56,7 +54,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.http_protocol.with_raw_response.get( @@ -68,7 +65,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: http_protocol = response.parse() assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.http_protocol.with_streaming_response.get( @@ -86,7 +82,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPProtocol: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.ases.http_protocol.get( @@ -94,7 +89,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.ases.http_protocol.get( @@ -124,7 +118,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.http_protocol.with_raw_response.get( @@ -136,7 +129,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: http_protocol = await response.parse() assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.http_protocol.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/ases/test_ip_version.py b/tests/api_resources/radar/http/ases/test_ip_version.py index 395fc8f4668..c69d7d39017 100644 --- a/tests/api_resources/radar/http/ases/test_ip_version.py +++ b/tests/api_resources/radar/http/ases/test_ip_version.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.ases.ip_version_get_response import IPVersionGetResponse +from cloudflare.types.radar.http.ases import IPVersionGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestIPVersion: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ip_version = client.radar.http.ases.ip_version.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip_version = client.radar.http.ases.ip_version.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.ip_version.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ip_version = response.parse() assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.ip_version.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncIPVersion: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.ases.ip_version.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.ases.ip_version.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.ip_version.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ip_version = await response.parse() assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.ip_version.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/ases/test_os.py b/tests/api_resources/radar/http/ases/test_os.py index 57df70a027a..a197d163aea 100644 --- a/tests/api_resources/radar/http/ases/test_os.py +++ b/tests/api_resources/radar/http/ases/test_os.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.ases.os_get_response import OSGetResponse +from cloudflare.types.radar.http.ases import OSGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestOS: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: os = client.radar.http.ases.os.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: os = client.radar.http.ases.os.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.os.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: os = response.parse() assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.os.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncOS: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.ases.os.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.ases.os.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.os.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: os = await response.parse() assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.os.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/ases/test_tls_version.py b/tests/api_resources/radar/http/ases/test_tls_version.py index 18b2a467775..b785844f314 100644 --- a/tests/api_resources/radar/http/ases/test_tls_version.py +++ b/tests/api_resources/radar/http/ases/test_tls_version.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.ases.tls_version_get_response import TLSVersionGetResponse +from cloudflare.types.radar.http.ases import TLSVersionGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestTLSVersion: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tls_version = client.radar.http.ases.tls_version.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: tls_version = client.radar.http.ases.tls_version.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.tls_version.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tls_version = response.parse() assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.tls_version.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTLSVersion: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.ases.tls_version.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.ases.tls_version.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.tls_version.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tls_version = await response.parse() assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.tls_version.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/locations/test_bot_class.py b/tests/api_resources/radar/http/locations/test_bot_class.py index 2e0daafb45a..064a76b14c5 100644 --- a/tests/api_resources/radar/http/locations/test_bot_class.py +++ b/tests/api_resources/radar/http/locations/test_bot_class.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.locations.bot_class_get_response import BotClassGetResponse +from cloudflare.types.radar.http.locations import BotClassGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestBotClass: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bot_class = client.radar.http.locations.bot_class.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bot_class = client.radar.http.locations.bot_class.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.bot_class.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: bot_class = response.parse() assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.bot_class.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBotClass: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.locations.bot_class.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.locations.bot_class.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.bot_class.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: bot_class = await response.parse() assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.bot_class.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/locations/test_device_type.py b/tests/api_resources/radar/http/locations/test_device_type.py index 412200f90b4..1fa468dd59c 100644 --- a/tests/api_resources/radar/http/locations/test_device_type.py +++ b/tests/api_resources/radar/http/locations/test_device_type.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.locations.device_type_get_response import DeviceTypeGetResponse +from cloudflare.types.radar.http.locations import DeviceTypeGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestDeviceType: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: device_type = client.radar.http.locations.device_type.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: device_type = client.radar.http.locations.device_type.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.device_type.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: device_type = response.parse() assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.device_type.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncDeviceType: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.locations.device_type.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.locations.device_type.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.device_type.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: device_type = await response.parse() assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.device_type.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/locations/test_http_method.py b/tests/api_resources/radar/http/locations/test_http_method.py index c657fceb244..972e82a1e61 100644 --- a/tests/api_resources/radar/http/locations/test_http_method.py +++ b/tests/api_resources/radar/http/locations/test_http_method.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.locations.http_method_get_response import HTTPMethodGetResponse +from cloudflare.types.radar.http.locations import HTTPMethodGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestHTTPMethod: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: http_method = client.radar.http.locations.http_method.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_method = client.radar.http.locations.http_method.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.http_method.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: http_method = response.parse() assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.http_method.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPMethod: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.locations.http_method.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.locations.http_method.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.http_method.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: http_method = await response.parse() assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.http_method.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/locations/test_http_protocol.py b/tests/api_resources/radar/http/locations/test_http_protocol.py index 268a2cdfc18..944a356a577 100644 --- a/tests/api_resources/radar/http/locations/test_http_protocol.py +++ b/tests/api_resources/radar/http/locations/test_http_protocol.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.locations.http_protocol_get_response import HTTPProtocolGetResponse +from cloudflare.types.radar.http.locations import HTTPProtocolGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestHTTPProtocol: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: http_protocol = client.radar.http.locations.http_protocol.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_protocol = client.radar.http.locations.http_protocol.get( @@ -56,7 +54,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.http_protocol.with_raw_response.get( @@ -68,7 +65,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: http_protocol = response.parse() assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.http_protocol.with_streaming_response.get( @@ -86,7 +82,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPProtocol: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.locations.http_protocol.get( @@ -94,7 +89,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.locations.http_protocol.get( @@ -124,7 +118,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.http_protocol.with_raw_response.get( @@ -136,7 +129,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: http_protocol = await response.parse() assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.http_protocol.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/locations/test_ip_version.py b/tests/api_resources/radar/http/locations/test_ip_version.py index 19995d31358..f26711c76c0 100644 --- a/tests/api_resources/radar/http/locations/test_ip_version.py +++ b/tests/api_resources/radar/http/locations/test_ip_version.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.locations.ip_version_get_response import IPVersionGetResponse +from cloudflare.types.radar.http.locations import IPVersionGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestIPVersion: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ip_version = client.radar.http.locations.ip_version.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip_version = client.radar.http.locations.ip_version.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.ip_version.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ip_version = response.parse() assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.ip_version.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncIPVersion: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.locations.ip_version.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.locations.ip_version.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.ip_version.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ip_version = await response.parse() assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.ip_version.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/locations/test_os.py b/tests/api_resources/radar/http/locations/test_os.py index 2b42985d9f1..a72186e7703 100644 --- a/tests/api_resources/radar/http/locations/test_os.py +++ b/tests/api_resources/radar/http/locations/test_os.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.locations.os_get_response import OSGetResponse +from cloudflare.types.radar.http.locations import OSGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestOS: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: os = client.radar.http.locations.os.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: os = client.radar.http.locations.os.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.os.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: os = response.parse() assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.os.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncOS: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.locations.os.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.locations.os.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.os.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: os = await response.parse() assert_matches_type(OSGetResponse, os, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.os.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/locations/test_tls_version.py b/tests/api_resources/radar/http/locations/test_tls_version.py index 535fc2b26d0..0be78706192 100644 --- a/tests/api_resources/radar/http/locations/test_tls_version.py +++ b/tests/api_resources/radar/http/locations/test_tls_version.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.locations.tls_version_get_response import TLSVersionGetResponse +from cloudflare.types.radar.http.locations import TLSVersionGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestTLSVersion: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tls_version = client.radar.http.locations.tls_version.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: tls_version = client.radar.http.locations.tls_version.get( @@ -57,7 +55,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.tls_version.with_raw_response.get( @@ -69,7 +66,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tls_version = response.parse() assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.tls_version.with_streaming_response.get( @@ -87,7 +83,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTLSVersion: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.locations.tls_version.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.locations.tls_version.get( @@ -126,7 +120,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.tls_version.with_raw_response.get( @@ -138,7 +131,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tls_version = await response.parse() assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.tls_version.with_streaming_response.get( diff --git a/tests/api_resources/radar/http/test_ases.py b/tests/api_resources/radar/http/test_ases.py index 51b99a48a50..8e22658cac3 100644 --- a/tests/api_resources/radar/http/test_ases.py +++ b/tests/api_resources/radar/http/test_ases.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.ase_get_response import AseGetResponse +from cloudflare.types.radar.http import AseGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestAses: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ase = client.radar.http.ases.get() assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ase = client.radar.http.ases.get( @@ -55,7 +53,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.with_raw_response.get() @@ -65,7 +62,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ase = response.parse() assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.with_streaming_response.get() as response: @@ -81,13 +77,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncAses: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ase = await async_client.radar.http.ases.get() assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ase = await async_client.radar.http.ases.get( @@ -118,7 +112,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.with_raw_response.get() @@ -128,7 +121,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ase = await response.parse() assert_matches_type(AseGetResponse, ase, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.with_streaming_response.get() as response: diff --git a/tests/api_resources/radar/http/test_locations.py b/tests/api_resources/radar/http/test_locations.py index 32c696738f8..7f992255f7c 100644 --- a/tests/api_resources/radar/http/test_locations.py +++ b/tests/api_resources/radar/http/test_locations.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.location_get_response import LocationGetResponse +from cloudflare.types.radar.http import LocationGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestLocations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: location = client.radar.http.locations.get() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: location = client.radar.http.locations.get( @@ -55,7 +53,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.with_raw_response.get() @@ -65,7 +62,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.with_streaming_response.get() as response: @@ -81,13 +77,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncLocations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.http.locations.get() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.http.locations.get( @@ -118,7 +112,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.with_raw_response.get() @@ -128,7 +121,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.with_streaming_response.get() as response: diff --git a/tests/api_resources/radar/http/test_summary.py b/tests/api_resources/radar/http/test_summary.py index ff51e8f27a1..fa84618dafe 100644 --- a/tests/api_resources/radar/http/test_summary.py +++ b/tests/api_resources/radar/http/test_summary.py @@ -10,13 +10,16 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.summary_os_response import SummaryOSResponse -from cloudflare.types.radar.http.summary_bot_class_response import SummaryBotClassResponse -from cloudflare.types.radar.http.summary_ip_version_response import SummaryIPVersionResponse -from cloudflare.types.radar.http.summary_device_type_response import SummaryDeviceTypeResponse -from cloudflare.types.radar.http.summary_tls_version_response import SummaryTLSVersionResponse -from cloudflare.types.radar.http.summary_http_version_response import SummaryHTTPVersionResponse -from cloudflare.types.radar.http.summary_http_protocol_response import SummaryHTTPProtocolResponse +from cloudflare.types.radar.http import ( + SummaryOSResponse, + SummaryBotClassResponse, + SummaryIPVersionResponse, + SummaryDeviceTypeResponse, + SummaryTLSVersionResponse, + SummaryHTTPVersionResponse, + SummaryPostQuantumResponse, + SummaryHTTPProtocolResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,13 +27,11 @@ class TestSummary: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_bot_class(self, client: Cloudflare) -> None: summary = client.radar.http.summary.bot_class() assert_matches_type(SummaryBotClassResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_bot_class_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.http.summary.bot_class( @@ -59,7 +60,6 @@ def test_method_bot_class_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryBotClassResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_bot_class(self, client: Cloudflare) -> None: response = client.radar.http.summary.with_raw_response.bot_class() @@ -69,7 +69,6 @@ def test_raw_response_bot_class(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryBotClassResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_bot_class(self, client: Cloudflare) -> None: with client.radar.http.summary.with_streaming_response.bot_class() as response: @@ -81,13 +80,11 @@ def test_streaming_response_bot_class(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_device_type(self, client: Cloudflare) -> None: summary = client.radar.http.summary.device_type() assert_matches_type(SummaryDeviceTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_device_type_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.http.summary.device_type( @@ -116,7 +113,6 @@ def test_method_device_type_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryDeviceTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_device_type(self, client: Cloudflare) -> None: response = client.radar.http.summary.with_raw_response.device_type() @@ -126,7 +122,6 @@ def test_raw_response_device_type(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryDeviceTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_device_type(self, client: Cloudflare) -> None: with client.radar.http.summary.with_streaming_response.device_type() as response: @@ -138,13 +133,11 @@ def test_streaming_response_device_type(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_http_protocol(self, client: Cloudflare) -> None: summary = client.radar.http.summary.http_protocol() assert_matches_type(SummaryHTTPProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_http_protocol_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.http.summary.http_protocol( @@ -173,7 +166,6 @@ def test_method_http_protocol_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryHTTPProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_http_protocol(self, client: Cloudflare) -> None: response = client.radar.http.summary.with_raw_response.http_protocol() @@ -183,7 +175,6 @@ def test_raw_response_http_protocol(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryHTTPProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_http_protocol(self, client: Cloudflare) -> None: with client.radar.http.summary.with_streaming_response.http_protocol() as response: @@ -195,13 +186,11 @@ def test_streaming_response_http_protocol(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_http_version(self, client: Cloudflare) -> None: summary = client.radar.http.summary.http_version() assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.http.summary.http_version( @@ -230,7 +219,6 @@ def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_http_version(self, client: Cloudflare) -> None: response = client.radar.http.summary.with_raw_response.http_version() @@ -240,7 +228,6 @@ def test_raw_response_http_version(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_http_version(self, client: Cloudflare) -> None: with client.radar.http.summary.with_streaming_response.http_version() as response: @@ -252,13 +239,11 @@ def test_streaming_response_http_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: summary = client.radar.http.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.http.summary.ip_version( @@ -287,7 +272,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.http.summary.with_raw_response.ip_version() @@ -297,7 +281,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.http.summary.with_streaming_response.ip_version() as response: @@ -309,13 +292,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_os(self, client: Cloudflare) -> None: summary = client.radar.http.summary.os() assert_matches_type(SummaryOSResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_os_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.http.summary.os( @@ -344,7 +325,6 @@ def test_method_os_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryOSResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_os(self, client: Cloudflare) -> None: response = client.radar.http.summary.with_raw_response.os() @@ -354,7 +334,6 @@ def test_raw_response_os(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryOSResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_os(self, client: Cloudflare) -> None: with client.radar.http.summary.with_streaming_response.os() as response: @@ -366,13 +345,65 @@ def test_streaming_response_os(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + def test_method_post_quantum(self, client: Cloudflare) -> None: + summary = client.radar.http.summary.post_quantum() + assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"]) + + @parametrize + def test_method_post_quantum_with_all_params(self, client: Cloudflare) -> None: + summary = client.radar.http.summary.post_quantum( + asn=["string", "string", "string"], + bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], + continent=["string", "string", "string"], + date_end=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + date_range=["1d", "2d", "7d"], + date_start=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + device_type=["DESKTOP", "MOBILE", "OTHER"], + format="JSON", + http_protocol=["HTTP", "HTTPS"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], + location=["string", "string", "string"], + name=["string", "string", "string"], + os=["WINDOWS", "MACOSX", "IOS"], + tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"], + ) + assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"]) + + @parametrize + def test_raw_response_post_quantum(self, client: Cloudflare) -> None: + response = client.radar.http.summary.with_raw_response.post_quantum() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + summary = response.parse() + assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"]) + + @parametrize + def test_streaming_response_post_quantum(self, client: Cloudflare) -> None: + with client.radar.http.summary.with_streaming_response.post_quantum() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + summary = response.parse() + assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize def test_method_tls_version(self, client: Cloudflare) -> None: summary = client.radar.http.summary.tls_version() assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: summary = client.radar.http.summary.tls_version( @@ -401,7 +432,6 @@ def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_tls_version(self, client: Cloudflare) -> None: response = client.radar.http.summary.with_raw_response.tls_version() @@ -411,7 +441,6 @@ def test_raw_response_tls_version(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_tls_version(self, client: Cloudflare) -> None: with client.radar.http.summary.with_streaming_response.tls_version() as response: @@ -427,13 +456,11 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncSummary: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.bot_class() assert_matches_type(SummaryBotClassResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_bot_class_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.bot_class( @@ -462,7 +489,6 @@ async def test_method_bot_class_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(SummaryBotClassResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_bot_class(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.summary.with_raw_response.bot_class() @@ -472,7 +498,6 @@ async def test_raw_response_bot_class(self, async_client: AsyncCloudflare) -> No summary = await response.parse() assert_matches_type(SummaryBotClassResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_bot_class(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.summary.with_streaming_response.bot_class() as response: @@ -484,13 +509,11 @@ async def test_streaming_response_bot_class(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_device_type(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.device_type() assert_matches_type(SummaryDeviceTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_device_type_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.device_type( @@ -519,7 +542,6 @@ async def test_method_device_type_with_all_params(self, async_client: AsyncCloud ) assert_matches_type(SummaryDeviceTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_device_type(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.summary.with_raw_response.device_type() @@ -529,7 +551,6 @@ async def test_raw_response_device_type(self, async_client: AsyncCloudflare) -> summary = await response.parse() assert_matches_type(SummaryDeviceTypeResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_device_type(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.summary.with_streaming_response.device_type() as response: @@ -541,13 +562,11 @@ async def test_streaming_response_device_type(self, async_client: AsyncCloudflar assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_http_protocol(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.http_protocol() assert_matches_type(SummaryHTTPProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_http_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.http_protocol( @@ -576,7 +595,6 @@ async def test_method_http_protocol_with_all_params(self, async_client: AsyncClo ) assert_matches_type(SummaryHTTPProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_http_protocol(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.summary.with_raw_response.http_protocol() @@ -586,7 +604,6 @@ async def test_raw_response_http_protocol(self, async_client: AsyncCloudflare) - summary = await response.parse() assert_matches_type(SummaryHTTPProtocolResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_http_protocol(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.summary.with_streaming_response.http_protocol() as response: @@ -598,13 +615,11 @@ async def test_streaming_response_http_protocol(self, async_client: AsyncCloudfl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_http_version(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.http_version() assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_http_version_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.http_version( @@ -633,7 +648,6 @@ async def test_method_http_version_with_all_params(self, async_client: AsyncClou ) assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_http_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.summary.with_raw_response.http_version() @@ -643,7 +657,6 @@ async def test_raw_response_http_version(self, async_client: AsyncCloudflare) -> summary = await response.parse() assert_matches_type(SummaryHTTPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_http_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.summary.with_streaming_response.http_version() as response: @@ -655,13 +668,11 @@ async def test_streaming_response_http_version(self, async_client: AsyncCloudfla assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.ip_version() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.ip_version( @@ -690,7 +701,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.summary.with_raw_response.ip_version() @@ -700,7 +710,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N summary = await response.parse() assert_matches_type(SummaryIPVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.summary.with_streaming_response.ip_version() as response: @@ -712,13 +721,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_os(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.os() assert_matches_type(SummaryOSResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_os_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.os( @@ -747,7 +754,6 @@ async def test_method_os_with_all_params(self, async_client: AsyncCloudflare) -> ) assert_matches_type(SummaryOSResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_os(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.summary.with_raw_response.os() @@ -757,7 +763,6 @@ async def test_raw_response_os(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryOSResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_os(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.summary.with_streaming_response.os() as response: @@ -769,13 +774,65 @@ async def test_streaming_response_os(self, async_client: AsyncCloudflare) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + async def test_method_post_quantum(self, async_client: AsyncCloudflare) -> None: + summary = await async_client.radar.http.summary.post_quantum() + assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"]) + + @parametrize + async def test_method_post_quantum_with_all_params(self, async_client: AsyncCloudflare) -> None: + summary = await async_client.radar.http.summary.post_quantum( + asn=["string", "string", "string"], + bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], + continent=["string", "string", "string"], + date_end=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + date_range=["1d", "2d", "7d"], + date_start=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + device_type=["DESKTOP", "MOBILE", "OTHER"], + format="JSON", + http_protocol=["HTTP", "HTTPS"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], + location=["string", "string", "string"], + name=["string", "string", "string"], + os=["WINDOWS", "MACOSX", "IOS"], + tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"], + ) + assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"]) + + @parametrize + async def test_raw_response_post_quantum(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.http.summary.with_raw_response.post_quantum() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + summary = await response.parse() + assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"]) + + @parametrize + async def test_streaming_response_post_quantum(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.http.summary.with_streaming_response.post_quantum() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + summary = await response.parse() + assert_matches_type(SummaryPostQuantumResponse, summary, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize async def test_method_tls_version(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.tls_version() assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_tls_version_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.radar.http.summary.tls_version( @@ -804,7 +861,6 @@ async def test_method_tls_version_with_all_params(self, async_client: AsyncCloud ) assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_tls_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.summary.with_raw_response.tls_version() @@ -814,7 +870,6 @@ async def test_raw_response_tls_version(self, async_client: AsyncCloudflare) -> summary = await response.parse() assert_matches_type(SummaryTLSVersionResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_tls_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.summary.with_streaming_response.tls_version() as response: diff --git a/tests/api_resources/radar/http/test_timeseries_groups.py b/tests/api_resources/radar/http/test_timeseries_groups.py index eeb307b56ec..0371f008171 100644 --- a/tests/api_resources/radar/http/test_timeseries_groups.py +++ b/tests/api_resources/radar/http/test_timeseries_groups.py @@ -10,15 +10,18 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.timeseries_group_os_response import TimeseriesGroupOSResponse -from cloudflare.types.radar.http.timeseries_group_browser_response import TimeseriesGroupBrowserResponse -from cloudflare.types.radar.http.timeseries_group_bot_class_response import TimeseriesGroupBotClassResponse -from cloudflare.types.radar.http.timeseries_group_ip_version_response import TimeseriesGroupIPVersionResponse -from cloudflare.types.radar.http.timeseries_group_device_type_response import TimeseriesGroupDeviceTypeResponse -from cloudflare.types.radar.http.timeseries_group_tls_version_response import TimeseriesGroupTLSVersionResponse -from cloudflare.types.radar.http.timeseries_group_http_version_response import TimeseriesGroupHTTPVersionResponse -from cloudflare.types.radar.http.timeseries_group_http_protocol_response import TimeseriesGroupHTTPProtocolResponse -from cloudflare.types.radar.http.timeseries_group_browser_family_response import TimeseriesGroupBrowserFamilyResponse +from cloudflare.types.radar.http import ( + TimeseriesGroupOSResponse, + TimeseriesGroupBrowserResponse, + TimeseriesGroupBotClassResponse, + TimeseriesGroupIPVersionResponse, + TimeseriesGroupDeviceTypeResponse, + TimeseriesGroupTLSVersionResponse, + TimeseriesGroupHTTPVersionResponse, + TimeseriesGroupPostQuantumResponse, + TimeseriesGroupHTTPProtocolResponse, + TimeseriesGroupBrowserFamilyResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,13 +29,11 @@ class TestTimeseriesGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_bot_class(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.bot_class() assert_matches_type(TimeseriesGroupBotClassResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_bot_class_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.bot_class( @@ -62,7 +63,6 @@ def test_method_bot_class_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupBotClassResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_bot_class(self, client: Cloudflare) -> None: response = client.radar.http.timeseries_groups.with_raw_response.bot_class() @@ -72,7 +72,6 @@ def test_raw_response_bot_class(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupBotClassResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_bot_class(self, client: Cloudflare) -> None: with client.radar.http.timeseries_groups.with_streaming_response.bot_class() as response: @@ -84,13 +83,11 @@ def test_streaming_response_bot_class(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_browser(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.browser() assert_matches_type(TimeseriesGroupBrowserResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_browser_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.browser( @@ -122,7 +119,6 @@ def test_method_browser_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupBrowserResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_browser(self, client: Cloudflare) -> None: response = client.radar.http.timeseries_groups.with_raw_response.browser() @@ -132,7 +128,6 @@ def test_raw_response_browser(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupBrowserResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_browser(self, client: Cloudflare) -> None: with client.radar.http.timeseries_groups.with_streaming_response.browser() as response: @@ -144,13 +139,11 @@ def test_streaming_response_browser(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_browser_family(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.browser_family() assert_matches_type(TimeseriesGroupBrowserFamilyResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_browser_family_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.browser_family( @@ -181,7 +174,6 @@ def test_method_browser_family_with_all_params(self, client: Cloudflare) -> None ) assert_matches_type(TimeseriesGroupBrowserFamilyResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_browser_family(self, client: Cloudflare) -> None: response = client.radar.http.timeseries_groups.with_raw_response.browser_family() @@ -191,7 +183,6 @@ def test_raw_response_browser_family(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupBrowserFamilyResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_browser_family(self, client: Cloudflare) -> None: with client.radar.http.timeseries_groups.with_streaming_response.browser_family() as response: @@ -203,13 +194,11 @@ def test_streaming_response_browser_family(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_device_type(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.device_type() assert_matches_type(TimeseriesGroupDeviceTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_device_type_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.device_type( @@ -239,7 +228,6 @@ def test_method_device_type_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupDeviceTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_device_type(self, client: Cloudflare) -> None: response = client.radar.http.timeseries_groups.with_raw_response.device_type() @@ -249,7 +237,6 @@ def test_raw_response_device_type(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupDeviceTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_device_type(self, client: Cloudflare) -> None: with client.radar.http.timeseries_groups.with_streaming_response.device_type() as response: @@ -261,13 +248,11 @@ def test_streaming_response_device_type(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_http_protocol(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.http_protocol() assert_matches_type(TimeseriesGroupHTTPProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_http_protocol_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.http_protocol( @@ -297,7 +282,6 @@ def test_method_http_protocol_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupHTTPProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_http_protocol(self, client: Cloudflare) -> None: response = client.radar.http.timeseries_groups.with_raw_response.http_protocol() @@ -307,7 +291,6 @@ def test_raw_response_http_protocol(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupHTTPProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_http_protocol(self, client: Cloudflare) -> None: with client.radar.http.timeseries_groups.with_streaming_response.http_protocol() as response: @@ -319,13 +302,11 @@ def test_streaming_response_http_protocol(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_http_version(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.http_version() assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.http_version( @@ -355,7 +336,6 @@ def test_method_http_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_http_version(self, client: Cloudflare) -> None: response = client.radar.http.timeseries_groups.with_raw_response.http_version() @@ -365,7 +345,6 @@ def test_raw_response_http_version(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_http_version(self, client: Cloudflare) -> None: with client.radar.http.timeseries_groups.with_streaming_response.http_version() as response: @@ -377,13 +356,11 @@ def test_streaming_response_http_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.ip_version( @@ -413,7 +390,6 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.http.timeseries_groups.with_raw_response.ip_version() @@ -423,7 +399,6 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.http.timeseries_groups.with_streaming_response.ip_version() as response: @@ -435,13 +410,11 @@ def test_streaming_response_ip_version(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_os(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.os() assert_matches_type(TimeseriesGroupOSResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_os_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.os( @@ -471,7 +444,6 @@ def test_method_os_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupOSResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_os(self, client: Cloudflare) -> None: response = client.radar.http.timeseries_groups.with_raw_response.os() @@ -481,7 +453,6 @@ def test_raw_response_os(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupOSResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_os(self, client: Cloudflare) -> None: with client.radar.http.timeseries_groups.with_streaming_response.os() as response: @@ -493,13 +464,66 @@ def test_streaming_response_os(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + def test_method_post_quantum(self, client: Cloudflare) -> None: + timeseries_group = client.radar.http.timeseries_groups.post_quantum() + assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"]) + + @parametrize + def test_method_post_quantum_with_all_params(self, client: Cloudflare) -> None: + timeseries_group = client.radar.http.timeseries_groups.post_quantum( + agg_interval="1h", + asn=["string", "string", "string"], + bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], + continent=["string", "string", "string"], + date_end=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + date_range=["1d", "2d", "7d"], + date_start=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + device_type=["DESKTOP", "MOBILE", "OTHER"], + format="JSON", + http_protocol=["HTTP", "HTTPS"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], + location=["string", "string", "string"], + name=["string", "string", "string"], + os=["WINDOWS", "MACOSX", "IOS"], + tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"], + ) + assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"]) + + @parametrize + def test_raw_response_post_quantum(self, client: Cloudflare) -> None: + response = client.radar.http.timeseries_groups.with_raw_response.post_quantum() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + timeseries_group = response.parse() + assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"]) + + @parametrize + def test_streaming_response_post_quantum(self, client: Cloudflare) -> None: + with client.radar.http.timeseries_groups.with_streaming_response.post_quantum() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + timeseries_group = response.parse() + assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize def test_method_tls_version(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.tls_version() assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: timeseries_group = client.radar.http.timeseries_groups.tls_version( @@ -529,7 +553,6 @@ def test_method_tls_version_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_tls_version(self, client: Cloudflare) -> None: response = client.radar.http.timeseries_groups.with_raw_response.tls_version() @@ -539,7 +562,6 @@ def test_raw_response_tls_version(self, client: Cloudflare) -> None: timeseries_group = response.parse() assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_tls_version(self, client: Cloudflare) -> None: with client.radar.http.timeseries_groups.with_streaming_response.tls_version() as response: @@ -555,13 +577,11 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.bot_class() assert_matches_type(TimeseriesGroupBotClassResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_bot_class_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.bot_class( @@ -591,7 +611,6 @@ async def test_method_bot_class_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(TimeseriesGroupBotClassResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_bot_class(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.timeseries_groups.with_raw_response.bot_class() @@ -601,7 +620,6 @@ async def test_raw_response_bot_class(self, async_client: AsyncCloudflare) -> No timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupBotClassResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_bot_class(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.timeseries_groups.with_streaming_response.bot_class() as response: @@ -613,13 +631,11 @@ async def test_streaming_response_bot_class(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_browser(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.browser() assert_matches_type(TimeseriesGroupBrowserResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_browser_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.browser( @@ -651,7 +667,6 @@ async def test_method_browser_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(TimeseriesGroupBrowserResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_browser(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.timeseries_groups.with_raw_response.browser() @@ -661,7 +676,6 @@ async def test_raw_response_browser(self, async_client: AsyncCloudflare) -> None timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupBrowserResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_browser(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.timeseries_groups.with_streaming_response.browser() as response: @@ -673,13 +687,11 @@ async def test_streaming_response_browser(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_browser_family(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.browser_family() assert_matches_type(TimeseriesGroupBrowserFamilyResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_browser_family_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.browser_family( @@ -710,7 +722,6 @@ async def test_method_browser_family_with_all_params(self, async_client: AsyncCl ) assert_matches_type(TimeseriesGroupBrowserFamilyResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_browser_family(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.timeseries_groups.with_raw_response.browser_family() @@ -720,7 +731,6 @@ async def test_raw_response_browser_family(self, async_client: AsyncCloudflare) timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupBrowserFamilyResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_browser_family(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.timeseries_groups.with_streaming_response.browser_family() as response: @@ -732,13 +742,11 @@ async def test_streaming_response_browser_family(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_device_type(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.device_type() assert_matches_type(TimeseriesGroupDeviceTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_device_type_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.device_type( @@ -768,7 +776,6 @@ async def test_method_device_type_with_all_params(self, async_client: AsyncCloud ) assert_matches_type(TimeseriesGroupDeviceTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_device_type(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.timeseries_groups.with_raw_response.device_type() @@ -778,7 +785,6 @@ async def test_raw_response_device_type(self, async_client: AsyncCloudflare) -> timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupDeviceTypeResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_device_type(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.timeseries_groups.with_streaming_response.device_type() as response: @@ -790,13 +796,11 @@ async def test_streaming_response_device_type(self, async_client: AsyncCloudflar assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_http_protocol(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.http_protocol() assert_matches_type(TimeseriesGroupHTTPProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_http_protocol_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.http_protocol( @@ -826,7 +830,6 @@ async def test_method_http_protocol_with_all_params(self, async_client: AsyncClo ) assert_matches_type(TimeseriesGroupHTTPProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_http_protocol(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.timeseries_groups.with_raw_response.http_protocol() @@ -836,7 +839,6 @@ async def test_raw_response_http_protocol(self, async_client: AsyncCloudflare) - timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupHTTPProtocolResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_http_protocol(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.timeseries_groups.with_streaming_response.http_protocol() as response: @@ -848,13 +850,11 @@ async def test_streaming_response_http_protocol(self, async_client: AsyncCloudfl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_http_version(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.http_version() assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_http_version_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.http_version( @@ -884,7 +884,6 @@ async def test_method_http_version_with_all_params(self, async_client: AsyncClou ) assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_http_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.timeseries_groups.with_raw_response.http_version() @@ -894,7 +893,6 @@ async def test_raw_response_http_version(self, async_client: AsyncCloudflare) -> timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupHTTPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_http_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.timeseries_groups.with_streaming_response.http_version() as response: @@ -906,13 +904,11 @@ async def test_streaming_response_http_version(self, async_client: AsyncCloudfla assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.ip_version() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.ip_version( @@ -942,7 +938,6 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.timeseries_groups.with_raw_response.ip_version() @@ -952,7 +947,6 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupIPVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.timeseries_groups.with_streaming_response.ip_version() as response: @@ -964,13 +958,11 @@ async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_os(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.os() assert_matches_type(TimeseriesGroupOSResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_os_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.os( @@ -1000,7 +992,6 @@ async def test_method_os_with_all_params(self, async_client: AsyncCloudflare) -> ) assert_matches_type(TimeseriesGroupOSResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_os(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.timeseries_groups.with_raw_response.os() @@ -1010,7 +1001,6 @@ async def test_raw_response_os(self, async_client: AsyncCloudflare) -> None: timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupOSResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_os(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.timeseries_groups.with_streaming_response.os() as response: @@ -1022,13 +1012,66 @@ async def test_streaming_response_os(self, async_client: AsyncCloudflare) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @parametrize + async def test_method_post_quantum(self, async_client: AsyncCloudflare) -> None: + timeseries_group = await async_client.radar.http.timeseries_groups.post_quantum() + assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"]) + + @parametrize + async def test_method_post_quantum_with_all_params(self, async_client: AsyncCloudflare) -> None: + timeseries_group = await async_client.radar.http.timeseries_groups.post_quantum( + agg_interval="1h", + asn=["string", "string", "string"], + bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], + continent=["string", "string", "string"], + date_end=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + date_range=["1d", "2d", "7d"], + date_start=[ + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + parse_datetime("2019-12-27T18:11:19.117Z"), + ], + device_type=["DESKTOP", "MOBILE", "OTHER"], + format="JSON", + http_protocol=["HTTP", "HTTPS"], + http_version=["HTTPv1", "HTTPv2", "HTTPv3"], + ip_version=["IPv4", "IPv6"], + location=["string", "string", "string"], + name=["string", "string", "string"], + os=["WINDOWS", "MACOSX", "IOS"], + tls_version=["TLSv1_0", "TLSv1_1", "TLSv1_2"], + ) + assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"]) + + @parametrize + async def test_raw_response_post_quantum(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.http.timeseries_groups.with_raw_response.post_quantum() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + timeseries_group = await response.parse() + assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"]) + + @parametrize + async def test_streaming_response_post_quantum(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.http.timeseries_groups.with_streaming_response.post_quantum() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + timeseries_group = await response.parse() + assert_matches_type(TimeseriesGroupPostQuantumResponse, timeseries_group, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize async def test_method_tls_version(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.tls_version() assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_tls_version_with_all_params(self, async_client: AsyncCloudflare) -> None: timeseries_group = await async_client.radar.http.timeseries_groups.tls_version( @@ -1058,7 +1101,6 @@ async def test_method_tls_version_with_all_params(self, async_client: AsyncCloud ) assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_tls_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.timeseries_groups.with_raw_response.tls_version() @@ -1068,7 +1110,6 @@ async def test_raw_response_tls_version(self, async_client: AsyncCloudflare) -> timeseries_group = await response.parse() assert_matches_type(TimeseriesGroupTLSVersionResponse, timeseries_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_tls_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.timeseries_groups.with_streaming_response.tls_version() as response: diff --git a/tests/api_resources/radar/http/test_top.py b/tests/api_resources/radar/http/test_top.py index 3b356cc5326..4cac74c10b8 100644 --- a/tests/api_resources/radar/http/test_top.py +++ b/tests/api_resources/radar/http/test_top.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.http.top_browsers_response import TopBrowsersResponse -from cloudflare.types.radar.http.top_browser_families_response import TopBrowserFamiliesResponse +from cloudflare.types.radar.http import ( + TopBrowsersResponse, + TopBrowserFamiliesResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +21,11 @@ class TestTop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_browser_families(self, client: Cloudflare) -> None: top = client.radar.http.top.browser_families() assert_matches_type(TopBrowserFamiliesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_browser_families_with_all_params(self, client: Cloudflare) -> None: top = client.radar.http.top.browser_families( @@ -56,7 +56,6 @@ def test_method_browser_families_with_all_params(self, client: Cloudflare) -> No ) assert_matches_type(TopBrowserFamiliesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_browser_families(self, client: Cloudflare) -> None: response = client.radar.http.top.with_raw_response.browser_families() @@ -66,7 +65,6 @@ def test_raw_response_browser_families(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopBrowserFamiliesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_browser_families(self, client: Cloudflare) -> None: with client.radar.http.top.with_streaming_response.browser_families() as response: @@ -78,13 +76,11 @@ def test_streaming_response_browser_families(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_browsers(self, client: Cloudflare) -> None: top = client.radar.http.top.browsers() assert_matches_type(TopBrowsersResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_browsers_with_all_params(self, client: Cloudflare) -> None: top = client.radar.http.top.browsers( @@ -115,7 +111,6 @@ def test_method_browsers_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopBrowsersResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_browsers(self, client: Cloudflare) -> None: response = client.radar.http.top.with_raw_response.browsers() @@ -125,7 +120,6 @@ def test_raw_response_browsers(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopBrowsersResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_browsers(self, client: Cloudflare) -> None: with client.radar.http.top.with_streaming_response.browsers() as response: @@ -141,13 +135,11 @@ def test_streaming_response_browsers(self, client: Cloudflare) -> None: class TestAsyncTop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_browser_families(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.http.top.browser_families() assert_matches_type(TopBrowserFamiliesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_browser_families_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.http.top.browser_families( @@ -178,7 +170,6 @@ async def test_method_browser_families_with_all_params(self, async_client: Async ) assert_matches_type(TopBrowserFamiliesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_browser_families(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.top.with_raw_response.browser_families() @@ -188,7 +179,6 @@ async def test_raw_response_browser_families(self, async_client: AsyncCloudflare top = await response.parse() assert_matches_type(TopBrowserFamiliesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_browser_families(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.top.with_streaming_response.browser_families() as response: @@ -200,13 +190,11 @@ async def test_streaming_response_browser_families(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_browsers(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.http.top.browsers() assert_matches_type(TopBrowsersResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_browsers_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.http.top.browsers( @@ -237,7 +225,6 @@ async def test_method_browsers_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(TopBrowsersResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_browsers(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.top.with_raw_response.browsers() @@ -247,7 +234,6 @@ async def test_raw_response_browsers(self, async_client: AsyncCloudflare) -> Non top = await response.parse() assert_matches_type(TopBrowsersResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_browsers(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.top.with_streaming_response.browsers() as response: diff --git a/tests/api_resources/radar/netflows/test_top.py b/tests/api_resources/radar/netflows/test_top.py index a0476609222..becdf39761a 100644 --- a/tests/api_resources/radar/netflows/test_top.py +++ b/tests/api_resources/radar/netflows/test_top.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.netflows.top_ases_response import TopAsesResponse -from cloudflare.types.radar.netflows.top_locations_response import TopLocationsResponse +from cloudflare.types.radar.netflows import TopAsesResponse, TopLocationsResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +18,11 @@ class TestTop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_ases(self, client: Cloudflare) -> None: top = client.radar.netflows.top.ases() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ases_with_all_params(self, client: Cloudflare) -> None: top = client.radar.netflows.top.ases( @@ -49,7 +46,6 @@ def test_method_ases_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ases(self, client: Cloudflare) -> None: response = client.radar.netflows.top.with_raw_response.ases() @@ -59,7 +55,6 @@ def test_raw_response_ases(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ases(self, client: Cloudflare) -> None: with client.radar.netflows.top.with_streaming_response.ases() as response: @@ -71,13 +66,11 @@ def test_streaming_response_ases(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_locations(self, client: Cloudflare) -> None: top = client.radar.netflows.top.locations() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_locations_with_all_params(self, client: Cloudflare) -> None: top = client.radar.netflows.top.locations( @@ -101,7 +94,6 @@ def test_method_locations_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_locations(self, client: Cloudflare) -> None: response = client.radar.netflows.top.with_raw_response.locations() @@ -111,7 +103,6 @@ def test_raw_response_locations(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_locations(self, client: Cloudflare) -> None: with client.radar.netflows.top.with_streaming_response.locations() as response: @@ -127,13 +118,11 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.netflows.top.ases() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.netflows.top.ases( @@ -157,7 +146,6 @@ async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ases(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.netflows.top.with_raw_response.ases() @@ -167,7 +155,6 @@ async def test_raw_response_ases(self, async_client: AsyncCloudflare) -> None: top = await response.parse() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ases(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.netflows.top.with_streaming_response.ases() as response: @@ -179,13 +166,11 @@ async def test_streaming_response_ases(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_locations(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.netflows.top.locations() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_locations_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.netflows.top.locations( @@ -209,7 +194,6 @@ async def test_method_locations_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.netflows.top.with_raw_response.locations() @@ -219,7 +203,6 @@ async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> No top = await response.parse() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_locations(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.netflows.top.with_streaming_response.locations() as response: diff --git a/tests/api_resources/radar/quality/speed/test_top.py b/tests/api_resources/radar/quality/speed/test_top.py index ed60dd3d125..1ddd81fa72b 100644 --- a/tests/api_resources/radar/quality/speed/test_top.py +++ b/tests/api_resources/radar/quality/speed/test_top.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.quality.speed.top_ases_response import TopAsesResponse -from cloudflare.types.radar.quality.speed.top_locations_response import TopLocationsResponse +from cloudflare.types.radar.quality.speed import ( + TopAsesResponse, + TopLocationsResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +21,11 @@ class TestTop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_ases(self, client: Cloudflare) -> None: top = client.radar.quality.speed.top.ases() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_ases_with_all_params(self, client: Cloudflare) -> None: top = client.radar.quality.speed.top.ases( @@ -45,7 +45,6 @@ def test_method_ases_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_ases(self, client: Cloudflare) -> None: response = client.radar.quality.speed.top.with_raw_response.ases() @@ -55,7 +54,6 @@ def test_raw_response_ases(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_ases(self, client: Cloudflare) -> None: with client.radar.quality.speed.top.with_streaming_response.ases() as response: @@ -67,13 +65,11 @@ def test_streaming_response_ases(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_locations(self, client: Cloudflare) -> None: top = client.radar.quality.speed.top.locations() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_locations_with_all_params(self, client: Cloudflare) -> None: top = client.radar.quality.speed.top.locations( @@ -93,7 +89,6 @@ def test_method_locations_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_locations(self, client: Cloudflare) -> None: response = client.radar.quality.speed.top.with_raw_response.locations() @@ -103,7 +98,6 @@ def test_raw_response_locations(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_locations(self, client: Cloudflare) -> None: with client.radar.quality.speed.top.with_streaming_response.locations() as response: @@ -119,13 +113,11 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.quality.speed.top.ases() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.quality.speed.top.ases( @@ -145,7 +137,6 @@ async def test_method_ases_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_ases(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.quality.speed.top.with_raw_response.ases() @@ -155,7 +146,6 @@ async def test_raw_response_ases(self, async_client: AsyncCloudflare) -> None: top = await response.parse() assert_matches_type(TopAsesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_ases(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.quality.speed.top.with_streaming_response.ases() as response: @@ -167,13 +157,11 @@ async def test_streaming_response_ases(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_locations(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.quality.speed.top.locations() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_locations_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.quality.speed.top.locations( @@ -193,7 +181,6 @@ async def test_method_locations_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.quality.speed.top.with_raw_response.locations() @@ -203,7 +190,6 @@ async def test_raw_response_locations(self, async_client: AsyncCloudflare) -> No top = await response.parse() assert_matches_type(TopLocationsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_locations(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.quality.speed.top.with_streaming_response.locations() as response: diff --git a/tests/api_resources/radar/quality/test_iqi.py b/tests/api_resources/radar/quality/test_iqi.py index dc22a1944d5..307c2f43884 100644 --- a/tests/api_resources/radar/quality/test_iqi.py +++ b/tests/api_resources/radar/quality/test_iqi.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.quality.iqi_summary_response import IQISummaryResponse -from cloudflare.types.radar.quality.iqi_timeseries_groups_response import IQITimeseriesGroupsResponse +from cloudflare.types.radar.quality import ( + IQISummaryResponse, + IQITimeseriesGroupsResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestIQI: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_summary(self, client: Cloudflare) -> None: iqi = client.radar.quality.iqi.summary( @@ -27,7 +28,6 @@ def test_method_summary(self, client: Cloudflare) -> None: ) assert_matches_type(IQISummaryResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_summary_with_all_params(self, client: Cloudflare) -> None: iqi = client.radar.quality.iqi.summary( @@ -51,7 +51,6 @@ def test_method_summary_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(IQISummaryResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_summary(self, client: Cloudflare) -> None: response = client.radar.quality.iqi.with_raw_response.summary( @@ -63,7 +62,6 @@ def test_raw_response_summary(self, client: Cloudflare) -> None: iqi = response.parse() assert_matches_type(IQISummaryResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_summary(self, client: Cloudflare) -> None: with client.radar.quality.iqi.with_streaming_response.summary( @@ -77,7 +75,6 @@ def test_streaming_response_summary(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_timeseries_groups(self, client: Cloudflare) -> None: iqi = client.radar.quality.iqi.timeseries_groups( @@ -85,7 +82,6 @@ def test_method_timeseries_groups(self, client: Cloudflare) -> None: ) assert_matches_type(IQITimeseriesGroupsResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None: iqi = client.radar.quality.iqi.timeseries_groups( @@ -111,7 +107,6 @@ def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> N ) assert_matches_type(IQITimeseriesGroupsResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: response = client.radar.quality.iqi.with_raw_response.timeseries_groups( @@ -123,7 +118,6 @@ def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: iqi = response.parse() assert_matches_type(IQITimeseriesGroupsResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: with client.radar.quality.iqi.with_streaming_response.timeseries_groups( @@ -141,7 +135,6 @@ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: class TestAsyncIQI: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_summary(self, async_client: AsyncCloudflare) -> None: iqi = await async_client.radar.quality.iqi.summary( @@ -149,7 +142,6 @@ async def test_method_summary(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IQISummaryResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None: iqi = await async_client.radar.quality.iqi.summary( @@ -173,7 +165,6 @@ async def test_method_summary_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(IQISummaryResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.quality.iqi.with_raw_response.summary( @@ -185,7 +176,6 @@ async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None iqi = await response.parse() assert_matches_type(IQISummaryResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.quality.iqi.with_streaming_response.summary( @@ -199,7 +189,6 @@ async def test_streaming_response_summary(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: iqi = await async_client.radar.quality.iqi.timeseries_groups( @@ -207,7 +196,6 @@ async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> ) assert_matches_type(IQITimeseriesGroupsResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None: iqi = await async_client.radar.quality.iqi.timeseries_groups( @@ -233,7 +221,6 @@ async def test_method_timeseries_groups_with_all_params(self, async_client: Asyn ) assert_matches_type(IQITimeseriesGroupsResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.quality.iqi.with_raw_response.timeseries_groups( @@ -245,7 +232,6 @@ async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflar iqi = await response.parse() assert_matches_type(IQITimeseriesGroupsResponse, iqi, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.quality.iqi.with_streaming_response.timeseries_groups( diff --git a/tests/api_resources/radar/quality/test_speed.py b/tests/api_resources/radar/quality/test_speed.py index 3019b6d3a8b..7ee3ce0bd64 100644 --- a/tests/api_resources/radar/quality/test_speed.py +++ b/tests/api_resources/radar/quality/test_speed.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.quality.speed_summary_response import SpeedSummaryResponse -from cloudflare.types.radar.quality.speed_histogram_response import SpeedHistogramResponse +from cloudflare.types.radar.quality import ( + SpeedSummaryResponse, + SpeedHistogramResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +21,11 @@ class TestSpeed: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_histogram(self, client: Cloudflare) -> None: speed = client.radar.quality.speed.histogram() assert_matches_type(SpeedHistogramResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_histogram_with_all_params(self, client: Cloudflare) -> None: speed = client.radar.quality.speed.histogram( @@ -44,7 +44,6 @@ def test_method_histogram_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SpeedHistogramResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_histogram(self, client: Cloudflare) -> None: response = client.radar.quality.speed.with_raw_response.histogram() @@ -54,7 +53,6 @@ def test_raw_response_histogram(self, client: Cloudflare) -> None: speed = response.parse() assert_matches_type(SpeedHistogramResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_histogram(self, client: Cloudflare) -> None: with client.radar.quality.speed.with_streaming_response.histogram() as response: @@ -66,13 +64,11 @@ def test_streaming_response_histogram(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_summary(self, client: Cloudflare) -> None: speed = client.radar.quality.speed.summary() assert_matches_type(SpeedSummaryResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_summary_with_all_params(self, client: Cloudflare) -> None: speed = client.radar.quality.speed.summary( @@ -89,7 +85,6 @@ def test_method_summary_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SpeedSummaryResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_summary(self, client: Cloudflare) -> None: response = client.radar.quality.speed.with_raw_response.summary() @@ -99,7 +94,6 @@ def test_raw_response_summary(self, client: Cloudflare) -> None: speed = response.parse() assert_matches_type(SpeedSummaryResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_summary(self, client: Cloudflare) -> None: with client.radar.quality.speed.with_streaming_response.summary() as response: @@ -115,13 +109,11 @@ def test_streaming_response_summary(self, client: Cloudflare) -> None: class TestAsyncSpeed: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_histogram(self, async_client: AsyncCloudflare) -> None: speed = await async_client.radar.quality.speed.histogram() assert_matches_type(SpeedHistogramResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_histogram_with_all_params(self, async_client: AsyncCloudflare) -> None: speed = await async_client.radar.quality.speed.histogram( @@ -140,7 +132,6 @@ async def test_method_histogram_with_all_params(self, async_client: AsyncCloudfl ) assert_matches_type(SpeedHistogramResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_histogram(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.quality.speed.with_raw_response.histogram() @@ -150,7 +141,6 @@ async def test_raw_response_histogram(self, async_client: AsyncCloudflare) -> No speed = await response.parse() assert_matches_type(SpeedHistogramResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_histogram(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.quality.speed.with_streaming_response.histogram() as response: @@ -162,13 +152,11 @@ async def test_streaming_response_histogram(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_summary(self, async_client: AsyncCloudflare) -> None: speed = await async_client.radar.quality.speed.summary() assert_matches_type(SpeedSummaryResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None: speed = await async_client.radar.quality.speed.summary( @@ -185,7 +173,6 @@ async def test_method_summary_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(SpeedSummaryResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.quality.speed.with_raw_response.summary() @@ -195,7 +182,6 @@ async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None speed = await response.parse() assert_matches_type(SpeedSummaryResponse, speed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.quality.speed.with_streaming_response.summary() as response: diff --git a/tests/api_resources/radar/ranking/test_domain.py b/tests/api_resources/radar/ranking/test_domain.py index cbaa37decfd..780aa445d02 100644 --- a/tests/api_resources/radar/ranking/test_domain.py +++ b/tests/api_resources/radar/ranking/test_domain.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.radar.ranking.domain_get_response import DomainGetResponse +from cloudflare.types.radar.ranking import DomainGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestDomain: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.radar.ranking.domain.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(DomainGetResponse, domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: domain = client.radar.ranking.domain.get( @@ -38,7 +36,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(DomainGetResponse, domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.ranking.domain.with_raw_response.get( @@ -50,7 +47,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(DomainGetResponse, domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.ranking.domain.with_streaming_response.get( @@ -64,7 +60,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain` but received ''"): @@ -76,7 +71,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomain: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.radar.ranking.domain.get( @@ -84,7 +78,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DomainGetResponse, domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.radar.ranking.domain.get( @@ -97,7 +90,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(DomainGetResponse, domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.ranking.domain.with_raw_response.get( @@ -109,7 +101,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(DomainGetResponse, domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.ranking.domain.with_streaming_response.get( @@ -123,7 +114,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain` but received ''"): diff --git a/tests/api_resources/radar/test_as112.py b/tests/api_resources/radar/test_as112.py index 47ee30050e5..27c2a2c1fba 100644 --- a/tests/api_resources/radar/test_as112.py +++ b/tests/api_resources/radar/test_as112.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.as112_timeseries_response import AS112TimeseriesResponse +from cloudflare.types.radar import AS112TimeseriesResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestAS112: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_timeseries(self, client: Cloudflare) -> None: as112 = client.radar.as112.timeseries() assert_matches_type(AS112TimeseriesResponse, as112, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: as112 = client.radar.as112.timeseries( @@ -48,7 +46,6 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(AS112TimeseriesResponse, as112, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_timeseries(self, client: Cloudflare) -> None: response = client.radar.as112.with_raw_response.timeseries() @@ -58,7 +55,6 @@ def test_raw_response_timeseries(self, client: Cloudflare) -> None: as112 = response.parse() assert_matches_type(AS112TimeseriesResponse, as112, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_timeseries(self, client: Cloudflare) -> None: with client.radar.as112.with_streaming_response.timeseries() as response: @@ -74,13 +70,11 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncAS112: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: as112 = await async_client.radar.as112.timeseries() assert_matches_type(AS112TimeseriesResponse, as112, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None: as112 = await async_client.radar.as112.timeseries( @@ -104,7 +98,6 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(AS112TimeseriesResponse, as112, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.with_raw_response.timeseries() @@ -114,7 +107,6 @@ async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> N as112 = await response.parse() assert_matches_type(AS112TimeseriesResponse, as112, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_timeseries(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.with_streaming_response.timeseries() as response: diff --git a/tests/api_resources/radar/test_bgp.py b/tests/api_resources/radar/test_bgp.py index c86c2e4db70..b896b31f649 100644 --- a/tests/api_resources/radar/test_bgp.py +++ b/tests/api_resources/radar/test_bgp.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.bgp_timeseries_response import BGPTimeseriesResponse +from cloudflare.types.radar import BGPTimeseriesResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestBGP: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_timeseries(self, client: Cloudflare) -> None: bgp = client.radar.bgp.timeseries() assert_matches_type(BGPTimeseriesResponse, bgp, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: bgp = client.radar.bgp.timeseries( @@ -48,7 +46,6 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(BGPTimeseriesResponse, bgp, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_timeseries(self, client: Cloudflare) -> None: response = client.radar.bgp.with_raw_response.timeseries() @@ -58,7 +55,6 @@ def test_raw_response_timeseries(self, client: Cloudflare) -> None: bgp = response.parse() assert_matches_type(BGPTimeseriesResponse, bgp, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_timeseries(self, client: Cloudflare) -> None: with client.radar.bgp.with_streaming_response.timeseries() as response: @@ -74,13 +70,11 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncBGP: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: bgp = await async_client.radar.bgp.timeseries() assert_matches_type(BGPTimeseriesResponse, bgp, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None: bgp = await async_client.radar.bgp.timeseries( @@ -104,7 +98,6 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(BGPTimeseriesResponse, bgp, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.bgp.with_raw_response.timeseries() @@ -114,7 +107,6 @@ async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> N bgp = await response.parse() assert_matches_type(BGPTimeseriesResponse, bgp, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_timeseries(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.bgp.with_streaming_response.timeseries() as response: diff --git a/tests/api_resources/radar/test_connection_tampering.py b/tests/api_resources/radar/test_connection_tampering.py index c91e8f1312b..37d3f5a9195 100644 --- a/tests/api_resources/radar/test_connection_tampering.py +++ b/tests/api_resources/radar/test_connection_tampering.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.connection_tampering_summary_response import ConnectionTamperingSummaryResponse -from cloudflare.types.radar.connection_tampering_timeseries_groups_response import ( +from cloudflare.types.radar import ( + ConnectionTamperingSummaryResponse, ConnectionTamperingTimeseriesGroupsResponse, ) @@ -21,13 +21,11 @@ class TestConnectionTampering: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_summary(self, client: Cloudflare) -> None: connection_tampering = client.radar.connection_tampering.summary() assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_summary_with_all_params(self, client: Cloudflare) -> None: connection_tampering = client.radar.connection_tampering.summary( @@ -50,7 +48,6 @@ def test_method_summary_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_summary(self, client: Cloudflare) -> None: response = client.radar.connection_tampering.with_raw_response.summary() @@ -60,7 +57,6 @@ def test_raw_response_summary(self, client: Cloudflare) -> None: connection_tampering = response.parse() assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_summary(self, client: Cloudflare) -> None: with client.radar.connection_tampering.with_streaming_response.summary() as response: @@ -72,13 +68,11 @@ def test_streaming_response_summary(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_timeseries_groups(self, client: Cloudflare) -> None: connection_tampering = client.radar.connection_tampering.timeseries_groups() assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None: connection_tampering = client.radar.connection_tampering.timeseries_groups( @@ -102,7 +96,6 @@ def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> N ) assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: response = client.radar.connection_tampering.with_raw_response.timeseries_groups() @@ -112,7 +105,6 @@ def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: connection_tampering = response.parse() assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: with client.radar.connection_tampering.with_streaming_response.timeseries_groups() as response: @@ -128,13 +120,11 @@ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: class TestAsyncConnectionTampering: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_summary(self, async_client: AsyncCloudflare) -> None: connection_tampering = await async_client.radar.connection_tampering.summary() assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None: connection_tampering = await async_client.radar.connection_tampering.summary( @@ -157,7 +147,6 @@ async def test_method_summary_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.connection_tampering.with_raw_response.summary() @@ -167,7 +156,6 @@ async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None connection_tampering = await response.parse() assert_matches_type(ConnectionTamperingSummaryResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.connection_tampering.with_streaming_response.summary() as response: @@ -179,13 +167,11 @@ async def test_streaming_response_summary(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: connection_tampering = await async_client.radar.connection_tampering.timeseries_groups() assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None: connection_tampering = await async_client.radar.connection_tampering.timeseries_groups( @@ -209,7 +195,6 @@ async def test_method_timeseries_groups_with_all_params(self, async_client: Asyn ) assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.connection_tampering.with_raw_response.timeseries_groups() @@ -219,7 +204,6 @@ async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflar connection_tampering = await response.parse() assert_matches_type(ConnectionTamperingTimeseriesGroupsResponse, connection_tampering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.connection_tampering.with_streaming_response.timeseries_groups() as response: diff --git a/tests/api_resources/radar/test_datasets.py b/tests/api_resources/radar/test_datasets.py index 291fd3b8c9d..f2cc9be2ae5 100644 --- a/tests/api_resources/radar/test_datasets.py +++ b/tests/api_resources/radar/test_datasets.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.radar.dataset_list_response import DatasetListResponse -from cloudflare.types.radar.dataset_download_response import DatasetDownloadResponse +from cloudflare.types.radar import ( + DatasetListResponse, + DatasetDownloadResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +20,11 @@ class TestDatasets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: dataset = client.radar.datasets.list() assert_matches_type(DatasetListResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: dataset = client.radar.datasets.list( @@ -35,7 +35,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(DatasetListResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.radar.datasets.with_raw_response.list() @@ -45,7 +44,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(DatasetListResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.radar.datasets.with_streaming_response.list() as response: @@ -57,7 +55,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_download(self, client: Cloudflare) -> None: dataset = client.radar.datasets.download( @@ -65,7 +62,6 @@ def test_method_download(self, client: Cloudflare) -> None: ) assert_matches_type(DatasetDownloadResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_download_with_all_params(self, client: Cloudflare) -> None: dataset = client.radar.datasets.download( @@ -74,7 +70,6 @@ def test_method_download_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(DatasetDownloadResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_download(self, client: Cloudflare) -> None: response = client.radar.datasets.with_raw_response.download( @@ -86,7 +81,6 @@ def test_raw_response_download(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(DatasetDownloadResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_download(self, client: Cloudflare) -> None: with client.radar.datasets.with_streaming_response.download( @@ -100,7 +94,6 @@ def test_streaming_response_download(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: dataset = client.radar.datasets.get( @@ -108,7 +101,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(str, dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: dataset = client.radar.datasets.get( @@ -117,7 +109,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(str, dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.datasets.with_raw_response.get( @@ -129,7 +120,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(str, dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.datasets.with_streaming_response.get( @@ -143,7 +133,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `alias` but received ''"): @@ -155,13 +144,11 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDatasets: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.radar.datasets.list() assert_matches_type(DatasetListResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.radar.datasets.list( @@ -172,7 +159,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(DatasetListResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.datasets.with_raw_response.list() @@ -182,7 +168,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(DatasetListResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.datasets.with_streaming_response.list() as response: @@ -194,7 +179,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_download(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.radar.datasets.download( @@ -202,7 +186,6 @@ async def test_method_download(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatasetDownloadResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_download_with_all_params(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.radar.datasets.download( @@ -211,7 +194,6 @@ async def test_method_download_with_all_params(self, async_client: AsyncCloudfla ) assert_matches_type(DatasetDownloadResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_download(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.datasets.with_raw_response.download( @@ -223,7 +205,6 @@ async def test_raw_response_download(self, async_client: AsyncCloudflare) -> Non dataset = await response.parse() assert_matches_type(DatasetDownloadResponse, dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_download(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.datasets.with_streaming_response.download( @@ -237,7 +218,6 @@ async def test_streaming_response_download(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.radar.datasets.get( @@ -245,7 +225,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.radar.datasets.get( @@ -254,7 +233,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(str, dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.datasets.with_raw_response.get( @@ -266,7 +244,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(str, dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.datasets.with_streaming_response.get( @@ -280,7 +257,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `alias` but received ''"): diff --git a/tests/api_resources/radar/test_entities.py b/tests/api_resources/radar/test_entities.py index 656495e08a7..a9a5a170bf0 100644 --- a/tests/api_resources/radar/test_entities.py +++ b/tests/api_resources/radar/test_entities.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.radar.entity_get_response import EntityGetResponse +from cloudflare.types.radar import EntityGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestEntities: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: entity = client.radar.entities.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(EntityGetResponse, entity, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: entity = client.radar.entities.get( @@ -34,7 +32,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(EntityGetResponse, entity, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.entities.with_raw_response.get( @@ -46,7 +43,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: entity = response.parse() assert_matches_type(EntityGetResponse, entity, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.entities.with_streaming_response.get( @@ -64,7 +60,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncEntities: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: entity = await async_client.radar.entities.get( @@ -72,7 +67,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(EntityGetResponse, entity, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: entity = await async_client.radar.entities.get( @@ -81,7 +75,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(EntityGetResponse, entity, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.with_raw_response.get( @@ -93,7 +86,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: entity = await response.parse() assert_matches_type(EntityGetResponse, entity, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.with_streaming_response.get( diff --git a/tests/api_resources/radar/test_netflows.py b/tests/api_resources/radar/test_netflows.py index fc8550d43b1..1446060257f 100644 --- a/tests/api_resources/radar/test_netflows.py +++ b/tests/api_resources/radar/test_netflows.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.netflow_timeseries_response import NetflowTimeseriesResponse +from cloudflare.types.radar import NetflowTimeseriesResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestNetflows: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_timeseries(self, client: Cloudflare) -> None: netflow = client.radar.netflows.timeseries() assert_matches_type(NetflowTimeseriesResponse, netflow, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: netflow = client.radar.netflows.timeseries( @@ -50,7 +48,6 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(NetflowTimeseriesResponse, netflow, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_timeseries(self, client: Cloudflare) -> None: response = client.radar.netflows.with_raw_response.timeseries() @@ -60,7 +57,6 @@ def test_raw_response_timeseries(self, client: Cloudflare) -> None: netflow = response.parse() assert_matches_type(NetflowTimeseriesResponse, netflow, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_timeseries(self, client: Cloudflare) -> None: with client.radar.netflows.with_streaming_response.timeseries() as response: @@ -76,13 +72,11 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncNetflows: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: netflow = await async_client.radar.netflows.timeseries() assert_matches_type(NetflowTimeseriesResponse, netflow, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None: netflow = await async_client.radar.netflows.timeseries( @@ -108,7 +102,6 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(NetflowTimeseriesResponse, netflow, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.netflows.with_raw_response.timeseries() @@ -118,7 +111,6 @@ async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> N netflow = await response.parse() assert_matches_type(NetflowTimeseriesResponse, netflow, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_timeseries(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.netflows.with_streaming_response.timeseries() as response: diff --git a/tests/api_resources/radar/test_ranking.py b/tests/api_resources/radar/test_ranking.py index a2fed566e61..61a4def2328 100644 --- a/tests/api_resources/radar/test_ranking.py +++ b/tests/api_resources/radar/test_ranking.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.ranking_top_response import RankingTopResponse -from cloudflare.types.radar.ranking_timeseries_groups_response import RankingTimeseriesGroupsResponse +from cloudflare.types.radar import ( + RankingTopResponse, + RankingTimeseriesGroupsResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +21,11 @@ class TestRanking: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_groups(self, client: Cloudflare) -> None: ranking = client.radar.ranking.timeseries_groups() assert_matches_type(RankingTimeseriesGroupsResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None: ranking = client.radar.ranking.timeseries_groups( @@ -49,7 +49,6 @@ def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> N ) assert_matches_type(RankingTimeseriesGroupsResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: response = client.radar.ranking.with_raw_response.timeseries_groups() @@ -59,7 +58,6 @@ def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: ranking = response.parse() assert_matches_type(RankingTimeseriesGroupsResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: with client.radar.ranking.with_streaming_response.timeseries_groups() as response: @@ -71,13 +69,11 @@ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_top(self, client: Cloudflare) -> None: ranking = client.radar.ranking.top() assert_matches_type(RankingTopResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_top_with_all_params(self, client: Cloudflare) -> None: ranking = client.radar.ranking.top( @@ -90,7 +86,6 @@ def test_method_top_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RankingTopResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_top(self, client: Cloudflare) -> None: response = client.radar.ranking.with_raw_response.top() @@ -100,7 +95,6 @@ def test_raw_response_top(self, client: Cloudflare) -> None: ranking = response.parse() assert_matches_type(RankingTopResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_top(self, client: Cloudflare) -> None: with client.radar.ranking.with_streaming_response.top() as response: @@ -116,13 +110,11 @@ def test_streaming_response_top(self, client: Cloudflare) -> None: class TestAsyncRanking: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: ranking = await async_client.radar.ranking.timeseries_groups() assert_matches_type(RankingTimeseriesGroupsResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None: ranking = await async_client.radar.ranking.timeseries_groups( @@ -146,7 +138,6 @@ async def test_method_timeseries_groups_with_all_params(self, async_client: Asyn ) assert_matches_type(RankingTimeseriesGroupsResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.ranking.with_raw_response.timeseries_groups() @@ -156,7 +147,6 @@ async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflar ranking = await response.parse() assert_matches_type(RankingTimeseriesGroupsResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.ranking.with_streaming_response.timeseries_groups() as response: @@ -168,13 +158,11 @@ async def test_streaming_response_timeseries_groups(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_top(self, async_client: AsyncCloudflare) -> None: ranking = await async_client.radar.ranking.top() assert_matches_type(RankingTopResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_top_with_all_params(self, async_client: AsyncCloudflare) -> None: ranking = await async_client.radar.ranking.top( @@ -187,7 +175,6 @@ async def test_method_top_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(RankingTopResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_top(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.ranking.with_raw_response.top() @@ -197,7 +184,6 @@ async def test_raw_response_top(self, async_client: AsyncCloudflare) -> None: ranking = await response.parse() assert_matches_type(RankingTopResponse, ranking, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_top(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.ranking.with_streaming_response.top() as response: diff --git a/tests/api_resources/radar/test_search.py b/tests/api_resources/radar/test_search.py index 2a3270d0761..5185e12e4c3 100644 --- a/tests/api_resources/radar/test_search.py +++ b/tests/api_resources/radar/test_search.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.radar.search_global_response import SearchGlobalResponse +from cloudflare.types.radar import SearchGlobalResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSearch: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_global(self, client: Cloudflare) -> None: search = client.radar.search.global_( @@ -25,7 +24,6 @@ def test_method_global(self, client: Cloudflare) -> None: ) assert_matches_type(SearchGlobalResponse, search, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_global_with_all_params(self, client: Cloudflare) -> None: search = client.radar.search.global_( @@ -38,7 +36,6 @@ def test_method_global_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SearchGlobalResponse, search, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_global(self, client: Cloudflare) -> None: response = client.radar.search.with_raw_response.global_( @@ -50,7 +47,6 @@ def test_raw_response_global(self, client: Cloudflare) -> None: search = response.parse() assert_matches_type(SearchGlobalResponse, search, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_global(self, client: Cloudflare) -> None: with client.radar.search.with_streaming_response.global_( @@ -68,7 +64,6 @@ def test_streaming_response_global(self, client: Cloudflare) -> None: class TestAsyncSearch: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_global(self, async_client: AsyncCloudflare) -> None: search = await async_client.radar.search.global_( @@ -76,7 +71,6 @@ async def test_method_global(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SearchGlobalResponse, search, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_global_with_all_params(self, async_client: AsyncCloudflare) -> None: search = await async_client.radar.search.global_( @@ -89,7 +83,6 @@ async def test_method_global_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(SearchGlobalResponse, search, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_global(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.search.with_raw_response.global_( @@ -101,7 +94,6 @@ async def test_raw_response_global(self, async_client: AsyncCloudflare) -> None: search = await response.parse() assert_matches_type(SearchGlobalResponse, search, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_global(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.search.with_streaming_response.global_( diff --git a/tests/api_resources/radar/test_traffic_anomalies.py b/tests/api_resources/radar/test_traffic_anomalies.py index e4b6ac48ed1..7e92c76fe39 100644 --- a/tests/api_resources/radar/test_traffic_anomalies.py +++ b/tests/api_resources/radar/test_traffic_anomalies.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.traffic_anomaly_get_response import TrafficAnomalyGetResponse +from cloudflare.types.radar import TrafficAnomalyGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,17 +18,15 @@ class TestTrafficAnomalies: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: traffic_anomaly = client.radar.traffic_anomalies.get() assert_matches_type(TrafficAnomalyGetResponse, traffic_anomaly, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: traffic_anomaly = client.radar.traffic_anomalies.get( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), @@ -40,7 +38,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TrafficAnomalyGetResponse, traffic_anomaly, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.traffic_anomalies.with_raw_response.get() @@ -50,7 +47,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: traffic_anomaly = response.parse() assert_matches_type(TrafficAnomalyGetResponse, traffic_anomaly, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.traffic_anomalies.with_streaming_response.get() as response: @@ -66,17 +62,15 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTrafficAnomalies: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: traffic_anomaly = await async_client.radar.traffic_anomalies.get() assert_matches_type(TrafficAnomalyGetResponse, traffic_anomaly, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: traffic_anomaly = await async_client.radar.traffic_anomalies.get( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), @@ -88,7 +82,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(TrafficAnomalyGetResponse, traffic_anomaly, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.traffic_anomalies.with_raw_response.get() @@ -98,7 +91,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: traffic_anomaly = await response.parse() assert_matches_type(TrafficAnomalyGetResponse, traffic_anomaly, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.traffic_anomalies.with_streaming_response.get() as response: diff --git a/tests/api_resources/radar/traffic_anomalies/test_locations.py b/tests/api_resources/radar/traffic_anomalies/test_locations.py index db7461986c4..005738ac3e2 100644 --- a/tests/api_resources/radar/traffic_anomalies/test_locations.py +++ b/tests/api_resources/radar/traffic_anomalies/test_locations.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.traffic_anomalies.location_get_response import LocationGetResponse +from cloudflare.types.radar.traffic_anomalies import LocationGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +18,11 @@ class TestLocations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: location = client.radar.traffic_anomalies.locations.get() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: location = client.radar.traffic_anomalies.locations.get( @@ -37,7 +35,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.traffic_anomalies.locations.with_raw_response.get() @@ -47,7 +44,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.traffic_anomalies.locations.with_streaming_response.get() as response: @@ -63,13 +59,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncLocations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.traffic_anomalies.locations.get() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.traffic_anomalies.locations.get( @@ -82,7 +76,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.traffic_anomalies.locations.with_raw_response.get() @@ -92,7 +85,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(LocationGetResponse, location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.traffic_anomalies.locations.with_streaming_response.get() as response: diff --git a/tests/api_resources/radar/verified_bots/test_top.py b/tests/api_resources/radar/verified_bots/test_top.py index 76b20f090c3..bfb0e175fc2 100644 --- a/tests/api_resources/radar/verified_bots/test_top.py +++ b/tests/api_resources/radar/verified_bots/test_top.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.radar.verified_bots.top_bots_response import TopBotsResponse -from cloudflare.types.radar.verified_bots.top_categories_response import TopCategoriesResponse +from cloudflare.types.radar.verified_bots import ( + TopBotsResponse, + TopCategoriesResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +21,11 @@ class TestTop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_bots(self, client: Cloudflare) -> None: top = client.radar.verified_bots.top.bots() assert_matches_type(TopBotsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_bots_with_all_params(self, client: Cloudflare) -> None: top = client.radar.verified_bots.top.bots( @@ -49,7 +49,6 @@ def test_method_bots_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopBotsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_bots(self, client: Cloudflare) -> None: response = client.radar.verified_bots.top.with_raw_response.bots() @@ -59,7 +58,6 @@ def test_raw_response_bots(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopBotsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_bots(self, client: Cloudflare) -> None: with client.radar.verified_bots.top.with_streaming_response.bots() as response: @@ -71,13 +69,11 @@ def test_streaming_response_bots(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_categories(self, client: Cloudflare) -> None: top = client.radar.verified_bots.top.categories() assert_matches_type(TopCategoriesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_categories_with_all_params(self, client: Cloudflare) -> None: top = client.radar.verified_bots.top.categories( @@ -101,7 +97,6 @@ def test_method_categories_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TopCategoriesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_categories(self, client: Cloudflare) -> None: response = client.radar.verified_bots.top.with_raw_response.categories() @@ -111,7 +106,6 @@ def test_raw_response_categories(self, client: Cloudflare) -> None: top = response.parse() assert_matches_type(TopCategoriesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_categories(self, client: Cloudflare) -> None: with client.radar.verified_bots.top.with_streaming_response.categories() as response: @@ -127,13 +121,11 @@ def test_streaming_response_categories(self, client: Cloudflare) -> None: class TestAsyncTop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_bots(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.verified_bots.top.bots() assert_matches_type(TopBotsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_bots_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.verified_bots.top.bots( @@ -157,7 +149,6 @@ async def test_method_bots_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TopBotsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_bots(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.verified_bots.top.with_raw_response.bots() @@ -167,7 +158,6 @@ async def test_raw_response_bots(self, async_client: AsyncCloudflare) -> None: top = await response.parse() assert_matches_type(TopBotsResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_bots(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.verified_bots.top.with_streaming_response.bots() as response: @@ -179,13 +169,11 @@ async def test_streaming_response_bots(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_categories(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.verified_bots.top.categories() assert_matches_type(TopCategoriesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_categories_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.verified_bots.top.categories( @@ -209,7 +197,6 @@ async def test_method_categories_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(TopCategoriesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_categories(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.verified_bots.top.with_raw_response.categories() @@ -219,7 +206,6 @@ async def test_raw_response_categories(self, async_client: AsyncCloudflare) -> N top = await response.parse() assert_matches_type(TopCategoriesResponse, top, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_categories(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.verified_bots.top.with_streaming_response.categories() as response: diff --git a/tests/api_resources/registrar/test_domains.py b/tests/api_resources/registrar/test_domains.py index a405f94ec25..5c0d686188c 100644 --- a/tests/api_resources/registrar/test_domains.py +++ b/tests/api_resources/registrar/test_domains.py @@ -10,9 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.registrar.domain import Domain -from cloudflare.types.registrar.domain_get_response import DomainGetResponse -from cloudflare.types.registrar.domain_update_response import DomainUpdateResponse +from cloudflare.types.registrar import Domain, DomainGetResponse, DomainUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +18,6 @@ class TestDomains: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: domain = client.registrar.domains.update( @@ -29,7 +26,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: domain = client.registrar.domains.update( @@ -41,7 +37,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.registrar.domains.with_raw_response.update( @@ -54,7 +49,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.registrar.domains.with_streaming_response.update( @@ -69,7 +63,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -84,7 +77,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: domain = client.registrar.domains.list( @@ -92,7 +84,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.registrar.domains.with_raw_response.list( @@ -104,7 +95,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(SyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.registrar.domains.with_streaming_response.list( @@ -118,7 +108,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -126,7 +115,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.registrar.domains.get( @@ -135,7 +123,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.registrar.domains.with_raw_response.get( @@ -148,7 +135,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.registrar.domains.with_streaming_response.get( @@ -163,7 +149,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -182,7 +167,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.update( @@ -191,7 +175,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.update( @@ -203,7 +186,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.registrar.domains.with_raw_response.update( @@ -216,7 +198,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.registrar.domains.with_streaming_response.update( @@ -231,7 +212,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -246,7 +226,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.list( @@ -254,7 +233,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.registrar.domains.with_raw_response.list( @@ -266,7 +244,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(AsyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.registrar.domains.with_streaming_response.list( @@ -280,7 +257,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -288,7 +264,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.get( @@ -297,7 +272,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.registrar.domains.with_raw_response.get( @@ -310,7 +284,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.registrar.domains.with_streaming_response.get( @@ -325,7 +298,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/request_tracers/test_traces.py b/tests/api_resources/request_tracers/test_traces.py index b62bb594f36..ce807ccc33d 100644 --- a/tests/api_resources/request_tracers/test_traces.py +++ b/tests/api_resources/request_tracers/test_traces.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.request_tracers.trace_create_response import TraceCreateResponse +from cloudflare.types.request_tracers import TraceCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestTraces: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: trace = client.request_tracers.traces.create( @@ -27,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TraceCreateResponse], trace, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: trace = client.request_tracers.traces.create( @@ -69,7 +67,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TraceCreateResponse], trace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.request_tracers.traces.with_raw_response.create( @@ -83,7 +80,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: trace = response.parse() assert_matches_type(Optional[TraceCreateResponse], trace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.request_tracers.traces.with_streaming_response.create( @@ -99,7 +95,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -113,7 +108,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTraces: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: trace = await async_client.request_tracers.traces.create( @@ -123,7 +117,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TraceCreateResponse], trace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: trace = await async_client.request_tracers.traces.create( @@ -165,7 +158,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[TraceCreateResponse], trace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.request_tracers.traces.with_raw_response.create( @@ -179,7 +171,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: trace = await response.parse() assert_matches_type(Optional[TraceCreateResponse], trace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.request_tracers.traces.with_streaming_response.create( @@ -195,7 +186,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/rules/lists/test_bulk_operations.py b/tests/api_resources/rules/lists/test_bulk_operations.py index c692c4c21a2..fa3248c9b0f 100644 --- a/tests/api_resources/rules/lists/test_bulk_operations.py +++ b/tests/api_resources/rules/lists/test_bulk_operations.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rules.lists.bulk_operation_get_response import BulkOperationGetResponse +from cloudflare.types.rules.lists import BulkOperationGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestBulkOperations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bulk_operation = client.rules.lists.bulk_operations.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BulkOperationGetResponse], bulk_operation, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rules.lists.bulk_operations.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: bulk_operation = response.parse() assert_matches_type(Optional[BulkOperationGetResponse], bulk_operation, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rules.lists.bulk_operations.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBulkOperations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bulk_operation = await async_client.rules.lists.bulk_operations.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BulkOperationGetResponse], bulk_operation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.bulk_operations.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: bulk_operation = await response.parse() assert_matches_type(Optional[BulkOperationGetResponse], bulk_operation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.bulk_operations.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/rules/lists/test_items.py b/tests/api_resources/rules/lists/test_items.py index 7b5888b8e83..6a2e0fab264 100644 --- a/tests/api_resources/rules/lists/test_items.py +++ b/tests/api_resources/rules/lists/test_items.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncCursorPagination, AsyncCursorPagination -from cloudflare.types.rules.lists.item_get_response import ItemGetResponse -from cloudflare.types.rules.lists.item_create_response import ItemCreateResponse -from cloudflare.types.rules.lists.item_delete_response import ItemDeleteResponse -from cloudflare.types.rules.lists.item_update_response import ItemUpdateResponse +from cloudflare.types.rules.lists import ( + ItemGetResponse, + ItemCreateResponse, + ItemDeleteResponse, + ItemUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestItems: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: item = client.rules.lists.items.create( @@ -31,7 +32,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ItemCreateResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.create( @@ -45,7 +45,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: item = response.parse() assert_matches_type(Optional[ItemCreateResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.create( @@ -61,7 +60,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -78,7 +76,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: item = client.rules.lists.items.update( @@ -88,7 +85,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ItemUpdateResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.update( @@ -102,7 +98,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: item = response.parse() assert_matches_type(Optional[ItemUpdateResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.update( @@ -118,7 +113,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -135,7 +129,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: item = client.rules.lists.items.list( @@ -144,7 +137,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncCursorPagination[object], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: item = client.rules.lists.items.list( @@ -156,7 +148,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncCursorPagination[object], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.list( @@ -169,7 +160,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: item = response.parse() assert_matches_type(SyncCursorPagination[object], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.list( @@ -184,7 +174,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -199,7 +188,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: item = client.rules.lists.items.delete( @@ -208,17 +196,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) - @pytest.mark.skip() - @parametrize - def test_method_delete_with_all_params(self, client: Cloudflare) -> None: - item = client.rules.lists.items.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - items=[{"id": "34b12448945f11eaa1b71c4d701ab86e"}], - ) - assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) - - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.delete( @@ -231,7 +208,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: item = response.parse() assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.delete( @@ -246,7 +222,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -261,7 +236,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: item = client.rules.lists.items.get( @@ -271,7 +245,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ItemGetResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.get( @@ -285,7 +258,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: item = response.parse() assert_matches_type(Optional[ItemGetResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.get( @@ -301,7 +273,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -329,7 +300,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncItems: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.create( @@ -339,7 +309,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ItemCreateResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.create( @@ -353,7 +322,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: item = await response.parse() assert_matches_type(Optional[ItemCreateResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.create( @@ -369,7 +337,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -386,7 +353,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.update( @@ -396,7 +362,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ItemUpdateResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.update( @@ -410,7 +375,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: item = await response.parse() assert_matches_type(Optional[ItemUpdateResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.update( @@ -426,7 +390,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -443,7 +406,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.list( @@ -452,7 +414,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncCursorPagination[object], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.list( @@ -464,7 +425,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncCursorPagination[object], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.list( @@ -477,7 +437,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: item = await response.parse() assert_matches_type(AsyncCursorPagination[object], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.list( @@ -492,7 +451,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -507,7 +465,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.delete( @@ -516,17 +473,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) - @pytest.mark.skip() - @parametrize - async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: - item = await async_client.rules.lists.items.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - items=[{"id": "34b12448945f11eaa1b71c4d701ab86e"}], - ) - assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) - - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.delete( @@ -539,7 +485,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: item = await response.parse() assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.delete( @@ -554,7 +499,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -569,7 +513,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.get( @@ -579,7 +522,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ItemGetResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.get( @@ -593,7 +535,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: item = await response.parse() assert_matches_type(Optional[ItemGetResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.get( @@ -609,7 +550,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/rules/test_lists.py b/tests/api_resources/rules/test_lists.py index 928a53d89c3..b42d1525efc 100644 --- a/tests/api_resources/rules/test_lists.py +++ b/tests/api_resources/rules/test_lists.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.rules.lists_list import ListsList -from cloudflare.types.rules.list_delete_response import ListDeleteResponse +from cloudflare.types.rules import ListsList, ListDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,28 +18,28 @@ class TestLists: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: - list = client.rules.lists.create( + list_ = client.rules.lists.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", kind="ip", name="list1", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: - list = client.rules.lists.create( + list_ = client.rules.lists.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", kind="ip", name="list1", description="This is a note", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.create( @@ -51,10 +50,10 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.create( @@ -65,12 +64,12 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -80,26 +79,26 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="list1", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: - list = client.rules.lists.update( + list_ = client.rules.lists.update( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: - list = client.rules.lists.update( + list_ = client.rules.lists.update( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is a note", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.update( @@ -109,10 +108,10 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.update( @@ -122,12 +121,12 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -142,15 +141,13 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: - list = client.rules.lists.list( + list_ = client.rules.lists.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncSinglePage[ListsList], list, path=["response"]) + assert_matches_type(SyncSinglePage[ListsList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.list( @@ -159,10 +156,9 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(SyncSinglePage[ListsList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(SyncSinglePage[ListsList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.list( @@ -171,12 +167,11 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(SyncSinglePage[ListsList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(SyncSinglePage[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -184,73 +179,64 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: - list = client.rules.lists.delete( + list_ = client.rules.lists.delete( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.delete( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.delete( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rules.lists.with_raw_response.delete( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: - list = client.rules.lists.get( + list_ = client.rules.lists.get( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.get( @@ -260,10 +246,10 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.get( @@ -273,12 +259,12 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -297,28 +283,28 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLists: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: - list = await async_client.rules.lists.create( + list_ = await async_client.rules.lists.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", kind="ip", name="list1", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: - list = await async_client.rules.lists.create( + list_ = await async_client.rules.lists.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", kind="ip", name="list1", description="This is a note", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.create( @@ -329,10 +315,10 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.create( @@ -343,12 +329,12 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -358,26 +344,26 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="list1", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: - list = await async_client.rules.lists.update( + list_ = await async_client.rules.lists.update( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - list = await async_client.rules.lists.update( + list_ = await async_client.rules.lists.update( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is a note", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.update( @@ -387,10 +373,10 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.update( @@ -400,12 +386,12 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -420,15 +406,13 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: - list = await async_client.rules.lists.list( + list_ = await async_client.rules.lists.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncSinglePage[ListsList], list, path=["response"]) + assert_matches_type(AsyncSinglePage[ListsList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.list( @@ -437,10 +421,9 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(AsyncSinglePage[ListsList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(AsyncSinglePage[ListsList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.list( @@ -449,12 +432,11 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(AsyncSinglePage[ListsList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(AsyncSinglePage[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -462,73 +444,64 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - list = await async_client.rules.lists.delete( + list_ = await async_client.rules.lists.delete( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.delete( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.delete( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rules.lists.with_raw_response.delete( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: - list = await async_client.rules.lists.get( + list_ = await async_client.rules.lists.get( "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListsList], list, path=["response"]) + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.get( @@ -538,10 +511,10 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.get( @@ -551,12 +524,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListsList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/rulesets/phases/test_versions.py b/tests/api_resources/rulesets/phases/test_versions.py index e8db8adaf1e..7c88a7ef7f8 100644 --- a/tests/api_resources/rulesets/phases/test_versions.py +++ b/tests/api_resources/rulesets/phases/test_versions.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.rulesets.ruleset import Ruleset -from cloudflare.types.rulesets.phases.version_get_response import VersionGetResponse +from cloudflare.types.rulesets import Ruleset +from cloudflare.types.rulesets.phases import VersionGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,33 +19,30 @@ class TestVersions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.phases.versions.with_raw_response.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -53,13 +50,12 @@ def test_raw_response_list(self, client: Cloudflare) -> None: version = response.parse() assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.phases.versions.with_streaming_response.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,53 +65,48 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.phases.versions.with_raw_response.list( "http_request_firewall_custom", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.versions.with_raw_response.list( "http_request_firewall_custom", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.get( "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.get( "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.phases.versions.with_raw_response.get( "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -123,14 +114,13 @@ def test_raw_response_get(self, client: Cloudflare) -> None: version = response.parse() assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.phases.versions.with_streaming_response.get( "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,7 +130,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -148,7 +138,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -156,7 +145,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -164,40 +152,36 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="", ) class TestAsyncVersions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.versions.with_raw_response.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -205,13 +189,12 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: version = await response.parse() assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.versions.with_streaming_response.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,53 +204,48 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.list( "http_request_firewall_custom", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.list( "http_request_firewall_custom", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.get( "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.get( "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.versions.with_raw_response.get( "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -275,14 +253,13 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: version = await response.parse() assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.versions.with_streaming_response.get( "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -292,7 +269,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -300,7 +277,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -308,7 +284,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -316,5 +291,4 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/rulesets/test_phases.py b/tests/api_resources/rulesets/test_phases.py index 043b1b5e3b4..40462f29ea8 100644 --- a/tests/api_resources/rulesets/test_phases.py +++ b/tests/api_resources/rulesets/test_phases.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rulesets.phase_get_response import PhaseGetResponse -from cloudflare.types.rulesets.phase_update_response import PhaseUpdateResponse +from cloudflare.types.rulesets import PhaseGetResponse, PhaseUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,18 +17,17 @@ class TestPhases: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: phase = client.rulesets.phases.update( "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: phase = client.rulesets.phases.update( @@ -85,7 +83,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -93,14 +90,13 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rulesets.phases.with_raw_response.update( "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -108,14 +104,13 @@ def test_raw_response_update(self, client: Cloudflare) -> None: phase = response.parse() assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rulesets.phases.with_streaming_response.update( "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -125,7 +120,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -133,7 +128,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -141,36 +135,32 @@ def test_path_params_update(self, client: Cloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: phase = client.rulesets.phases.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: phase = client.rulesets.phases.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.phases.with_raw_response.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -178,13 +168,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: phase = response.parse() assert_matches_type(PhaseGetResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.phases.with_streaming_response.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -194,39 +183,36 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.phases.with_raw_response.get( "http_request_firewall_custom", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.with_raw_response.get( "http_request_firewall_custom", account_id="string", - zone_id="", ) class TestAsyncPhases: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.update( "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.update( @@ -282,7 +268,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -290,14 +275,13 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.with_raw_response.update( "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -305,14 +289,13 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: phase = await response.parse() assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.with_streaming_response.update( "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -322,7 +305,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -330,7 +313,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -338,36 +320,32 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.with_raw_response.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -375,13 +353,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: phase = await response.parse() assert_matches_type(PhaseGetResponse, phase, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.with_streaming_response.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -391,19 +368,17 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.phases.with_raw_response.get( "http_request_firewall_custom", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.with_raw_response.get( "http_request_firewall_custom", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py index f8d39340c0b..390e99ca22f 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rulesets.rule_edit_response import RuleEditResponse -from cloudflare.types.rulesets.rule_create_response import RuleCreateResponse -from cloudflare.types.rulesets.rule_delete_response import RuleDeleteResponse +from cloudflare.types.rulesets import ( + RuleEditResponse, + RuleCreateResponse, + RuleDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,23 +21,21 @@ class TestRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -53,13 +53,12 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -67,13 +66,12 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -83,47 +81,42 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -135,13 +128,12 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -149,13 +141,12 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -165,47 +156,42 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -217,13 +203,12 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -231,13 +216,12 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -247,47 +231,42 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -324,13 +303,12 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -338,13 +316,12 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -354,47 +331,42 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -406,13 +378,12 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -420,13 +391,12 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -436,47 +406,42 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -488,13 +453,12 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -502,13 +466,12 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -518,47 +481,42 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -570,13 +528,12 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -584,13 +541,12 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -600,47 +556,42 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -662,13 +613,12 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -676,13 +626,12 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -692,47 +641,42 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -755,13 +699,12 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -769,13 +712,12 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -785,47 +727,42 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -844,13 +781,12 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -858,13 +794,12 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -874,47 +809,42 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -926,13 +856,12 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -940,13 +869,12 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -956,47 +884,42 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -1012,13 +935,12 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1026,13 +948,12 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1042,47 +963,42 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -1114,13 +1030,12 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1128,13 +1043,12 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1144,47 +1058,42 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -1202,13 +1111,12 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1216,13 +1124,12 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1232,47 +1139,42 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -1362,13 +1264,12 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1376,13 +1277,12 @@ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1392,60 +1292,54 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.rulesets.rules.delete( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: rule = client.rulesets.rules.delete( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.delete( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1453,14 +1347,13 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleDeleteResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.delete( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1470,7 +1363,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -1478,7 +1371,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1486,7 +1378,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1494,7 +1385,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1502,28 +1392,25 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -1541,14 +1428,13 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1556,14 +1442,13 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1573,7 +1458,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -1581,7 +1466,6 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1589,7 +1473,6 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1597,7 +1480,6 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1605,28 +1487,25 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -1638,14 +1517,13 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1653,14 +1531,13 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1670,7 +1547,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -1678,7 +1555,6 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1686,7 +1562,6 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1694,7 +1569,6 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1702,28 +1576,25 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -1735,14 +1606,13 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1750,14 +1620,13 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1767,7 +1636,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -1775,7 +1644,6 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1783,7 +1651,6 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1791,7 +1658,6 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1799,28 +1665,25 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -1857,14 +1720,13 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1872,14 +1734,13 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1889,7 +1750,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -1897,7 +1758,6 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1905,7 +1765,6 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1913,7 +1772,6 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1921,28 +1779,25 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -1954,14 +1809,13 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1969,14 +1823,13 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1986,7 +1839,7 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -1994,7 +1847,6 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2002,7 +1854,6 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2010,7 +1861,6 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2018,28 +1868,25 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -2051,14 +1898,13 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2066,14 +1912,13 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2083,7 +1928,7 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -2091,7 +1936,6 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2099,7 +1943,6 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2107,7 +1950,6 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2115,28 +1957,25 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -2148,14 +1987,13 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2163,14 +2001,13 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2180,7 +2017,7 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -2188,7 +2025,6 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2196,7 +2032,6 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2204,7 +2039,6 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2212,28 +2046,25 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -2255,14 +2086,13 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2270,14 +2100,13 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2287,7 +2116,7 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -2295,7 +2124,6 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2303,7 +2131,6 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2311,7 +2138,6 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2319,28 +2145,25 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -2363,14 +2186,13 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2378,14 +2200,13 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2395,7 +2216,7 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -2403,7 +2224,6 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2411,7 +2231,6 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2419,7 +2238,6 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2427,28 +2245,25 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -2467,14 +2282,13 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2482,14 +2296,13 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2499,7 +2312,7 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -2507,7 +2320,6 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2515,7 +2327,6 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2523,7 +2334,6 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2531,28 +2341,25 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -2564,14 +2371,13 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2579,14 +2385,13 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2596,7 +2401,7 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -2604,7 +2409,6 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2612,7 +2416,6 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2620,7 +2423,6 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2628,28 +2430,25 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -2665,14 +2464,13 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2680,14 +2478,13 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2697,7 +2494,7 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -2705,7 +2502,6 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2713,7 +2509,6 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2721,7 +2516,6 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2729,28 +2523,25 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -2782,14 +2573,13 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2797,14 +2587,13 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2814,7 +2603,7 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -2822,7 +2611,6 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2830,7 +2618,6 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2838,7 +2625,6 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2846,28 +2632,25 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -2885,14 +2668,13 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2900,14 +2682,13 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2917,7 +2698,7 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -2925,7 +2706,6 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2933,7 +2713,6 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2941,7 +2720,6 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2949,28 +2727,25 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -3060,14 +2835,13 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3075,14 +2849,13 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3092,7 +2865,7 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -3100,7 +2873,6 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -3108,7 +2880,6 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3116,7 +2887,6 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3124,30 +2894,27 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) class TestAsyncRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -3165,13 +2932,12 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3179,13 +2945,12 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3195,47 +2960,42 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -3247,13 +3007,12 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3261,13 +3020,12 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3277,47 +3035,42 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -3329,13 +3082,12 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3343,13 +3095,12 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3359,47 +3110,42 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -3436,13 +3182,12 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3450,13 +3195,12 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3466,47 +3210,42 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -3518,13 +3257,12 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3532,13 +3270,12 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3548,47 +3285,42 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -3600,13 +3332,12 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3614,13 +3345,12 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3630,47 +3360,42 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -3682,13 +3407,12 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3696,13 +3420,12 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3712,47 +3435,42 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -3774,13 +3492,12 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3788,13 +3505,12 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3804,47 +3520,42 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -3867,13 +3578,12 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3881,13 +3591,12 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3897,47 +3606,42 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -3956,13 +3660,12 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3970,13 +3673,12 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3986,47 +3688,42 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -4038,13 +3735,12 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4052,13 +3748,12 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4068,47 +3763,42 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -4124,13 +3814,12 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4138,13 +3827,12 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4154,47 +3842,42 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -4226,13 +3909,12 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4240,13 +3922,12 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4256,47 +3937,42 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -4314,13 +3990,12 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4328,13 +4003,12 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4344,47 +4018,42 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -4474,13 +4143,12 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4488,13 +4156,12 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudfla rule = await response.parse() assert_matches_type(RuleCreateResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4504,60 +4171,54 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.delete( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.delete( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.delete( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4565,14 +4226,13 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(RuleDeleteResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.delete( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4582,7 +4242,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -4590,7 +4250,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -4598,7 +4257,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4606,7 +4264,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4614,28 +4271,25 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -4653,14 +4307,13 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4668,14 +4321,13 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4685,7 +4337,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -4693,7 +4345,6 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -4701,7 +4352,6 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4709,7 +4359,6 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4717,28 +4366,25 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -4750,14 +4396,13 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4765,14 +4410,13 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4782,7 +4426,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -4790,7 +4434,6 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -4798,7 +4441,6 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4806,7 +4448,6 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4814,28 +4455,25 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -4847,14 +4485,13 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4862,14 +4499,13 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4879,7 +4515,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -4887,7 +4523,6 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -4895,7 +4530,6 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4903,7 +4537,6 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4911,28 +4544,25 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -4969,14 +4599,13 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4984,14 +4613,13 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5001,7 +4629,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5009,7 +4637,6 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5017,7 +4644,6 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5025,7 +4651,6 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5033,28 +4658,25 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -5066,14 +4688,13 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5081,14 +4702,13 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5098,7 +4718,7 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5106,7 +4726,6 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5114,7 +4733,6 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5122,7 +4740,6 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5130,28 +4747,25 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -5163,14 +4777,13 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5178,14 +4791,13 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5195,7 +4807,7 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5203,7 +4815,6 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5211,7 +4822,6 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5219,7 +4829,6 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5227,28 +4836,25 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -5260,14 +4866,13 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5275,14 +4880,13 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5292,7 +4896,7 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5300,7 +4904,6 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5308,7 +4911,6 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5316,7 +4918,6 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5324,28 +4925,25 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -5367,14 +4965,13 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5382,14 +4979,13 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5399,7 +4995,7 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5407,7 +5003,6 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5415,7 +5010,6 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5423,7 +5017,6 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5431,28 +5024,25 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -5475,14 +5065,13 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5490,14 +5079,13 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5507,7 +5095,7 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5515,7 +5103,6 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5523,7 +5110,6 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5531,7 +5117,6 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5539,28 +5124,25 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -5579,14 +5161,13 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5594,14 +5175,13 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5611,7 +5191,7 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5619,7 +5199,6 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5627,7 +5206,6 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5635,7 +5213,6 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5643,28 +5220,25 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -5676,14 +5250,13 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5691,14 +5264,13 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5708,7 +5280,7 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5716,7 +5288,6 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5724,7 +5295,6 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5732,7 +5302,6 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5740,28 +5309,25 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -5777,14 +5343,13 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5792,14 +5357,13 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5809,7 +5373,7 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5817,7 +5381,6 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5825,7 +5388,6 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5833,7 +5395,6 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5841,28 +5402,25 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -5894,14 +5452,13 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5909,14 +5466,13 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5926,7 +5482,7 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -5934,7 +5490,6 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5942,7 +5497,6 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5950,7 +5504,6 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5958,28 +5511,25 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -5997,14 +5547,13 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -6012,14 +5561,13 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6029,7 +5577,7 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -6037,7 +5585,6 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -6045,7 +5592,6 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -6053,7 +5599,6 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6061,28 +5606,25 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -6172,14 +5714,13 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async ) assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -6187,14 +5728,13 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare rule = await response.parse() assert_matches_type(RuleEditResponse, rule, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6204,7 +5744,7 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -6212,7 +5752,6 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -6220,7 +5759,6 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -6228,7 +5766,6 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6236,5 +5773,4 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/rulesets/test_versions.py b/tests/api_resources/rulesets/test_versions.py index 10a620f81c8..1fd08c4b629 100644 --- a/tests/api_resources/rulesets/test_versions.py +++ b/tests/api_resources/rulesets/test_versions.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.rulesets.ruleset import Ruleset -from cloudflare.types.rulesets.version_get_response import VersionGetResponse +from cloudflare.types.rulesets import Ruleset, VersionGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,33 +18,30 @@ class TestVersions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: version = client.rulesets.versions.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -53,13 +49,12 @@ def test_raw_response_list(self, client: Cloudflare) -> None: version = response.parse() assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,60 +64,54 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.versions.with_raw_response.list( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.versions.with_raw_response.list( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.versions.with_raw_response.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: version = client.rulesets.versions.delete( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert version is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.delete( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert version is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.delete( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -130,14 +119,13 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: version = response.parse() assert version is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.delete( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -147,7 +135,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -155,7 +143,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "1", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -163,7 +150,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -171,7 +157,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -179,39 +164,35 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: version = client.rulesets.versions.get( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.get( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.get( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -219,14 +200,13 @@ def test_raw_response_get(self, client: Cloudflare) -> None: version = response.parse() assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.get( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -236,7 +216,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -244,7 +224,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -252,7 +231,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -260,7 +238,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -268,40 +245,36 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) class TestAsyncVersions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.with_raw_response.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -309,13 +282,12 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: version = await response.parse() assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.with_streaming_response.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -325,60 +297,54 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.versions.with_raw_response.list( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.versions.with_raw_response.list( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.versions.with_raw_response.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.delete( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert version is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.delete( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert version is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.with_raw_response.delete( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -386,14 +352,13 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: version = await response.parse() assert version is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.with_streaming_response.delete( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -403,7 +368,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -411,7 +376,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -419,7 +383,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -427,7 +390,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -435,39 +397,35 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.get( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.get( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.with_raw_response.get( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -475,14 +433,13 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: version = await response.parse() assert_matches_type(VersionGetResponse, version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.with_streaming_response.get( "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -492,7 +449,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -500,7 +457,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -508,7 +464,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -516,7 +471,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -524,5 +478,4 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/rulesets/versions/test_by_tag.py b/tests/api_resources/rulesets/versions/test_by_tag.py index 029f0e86bcd..6122739a88f 100644 --- a/tests/api_resources/rulesets/versions/test_by_tag.py +++ b/tests/api_resources/rulesets/versions/test_by_tag.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rulesets.versions.by_tag_get_response import ByTagGetResponse +from cloudflare.types.rulesets.versions import ByTagGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestByTag: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: by_tag = client.rulesets.versions.by_tag.get( @@ -28,7 +27,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.versions.by_tag.with_raw_response.get( @@ -43,7 +41,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: by_tag = response.parse() assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.versions.by_tag.with_streaming_response.get( @@ -60,7 +57,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -99,7 +95,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncByTag: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: by_tag = await async_client.rulesets.versions.by_tag.get( @@ -110,7 +105,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.by_tag.with_raw_response.get( @@ -125,7 +119,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: by_tag = await response.parse() assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.by_tag.with_streaming_response.get( @@ -142,7 +135,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/rum/test_rules.py b/tests/api_resources/rum/test_rules.py index 42de0030a31..41a20cc0ee4 100644 --- a/tests/api_resources/rum/test_rules.py +++ b/tests/api_resources/rum/test_rules.py @@ -9,9 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rum.rum_rule import RUMRule -from cloudflare.types.rum.rule_list_response import RuleListResponse -from cloudflare.types.rum.rule_delete_response import RuleDeleteResponse +from cloudflare.types.rum import RUMRule, RuleListResponse, RuleDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +17,6 @@ class TestRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.rum.rules.create( @@ -28,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.rum.rules.create( @@ -41,7 +37,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.create( @@ -54,7 +49,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.create( @@ -69,7 +63,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -84,7 +77,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.rum.rules.update( @@ -94,7 +86,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.rum.rules.update( @@ -108,7 +99,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.update( @@ -122,7 +112,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.update( @@ -138,7 +127,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -162,7 +150,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.rum.rules.list( @@ -171,7 +158,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.list( @@ -184,7 +170,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.list( @@ -199,7 +184,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -214,7 +198,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.rum.rules.delete( @@ -224,7 +207,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.delete( @@ -238,7 +220,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.delete( @@ -254,7 +235,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -282,7 +262,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.create( @@ -291,7 +270,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.create( @@ -304,7 +282,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.create( @@ -317,7 +294,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.create( @@ -332,7 +308,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -347,7 +322,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.update( @@ -357,7 +331,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.update( @@ -371,7 +344,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.update( @@ -385,7 +357,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RUMRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.update( @@ -401,7 +372,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -425,7 +395,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.list( @@ -434,7 +403,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.list( @@ -447,7 +415,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.list( @@ -462,7 +429,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -477,7 +443,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.delete( @@ -487,7 +452,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.delete( @@ -501,7 +465,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.delete( @@ -517,7 +480,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/rum/test_site_info.py b/tests/api_resources/rum/test_site_info.py index 44282f4fff2..2e72e44a04e 100644 --- a/tests/api_resources/rum/test_site_info.py +++ b/tests/api_resources/rum/test_site_info.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types.rum import ( + Site, + SiteInfoDeleteResponse, +) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.rum.site import Site -from cloudflare.types.rum.site_info_delete_response import SiteInfoDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestSiteInfo: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: site_info = client.rum.site_info.create( @@ -27,7 +28,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: site_info = client.rum.site_info.create( @@ -38,7 +38,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.create( @@ -50,7 +49,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: site_info = response.parse() assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.create( @@ -64,7 +62,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -72,7 +69,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: site_info = client.rum.site_info.update( @@ -81,7 +77,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: site_info = client.rum.site_info.update( @@ -93,7 +88,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.update( @@ -106,7 +100,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: site_info = response.parse() assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.update( @@ -121,7 +114,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -136,7 +128,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: site_info = client.rum.site_info.list( @@ -144,7 +135,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: site_info = client.rum.site_info.list( @@ -155,7 +145,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.list( @@ -167,7 +156,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: site_info = response.parse() assert_matches_type(SyncV4PagePaginationArray[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.list( @@ -181,7 +169,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -189,7 +176,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: site_info = client.rum.site_info.delete( @@ -198,7 +184,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SiteInfoDeleteResponse], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.delete( @@ -211,7 +196,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: site_info = response.parse() assert_matches_type(Optional[SiteInfoDeleteResponse], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.delete( @@ -226,7 +210,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -241,7 +224,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: site_info = client.rum.site_info.get( @@ -250,7 +232,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.get( @@ -263,7 +244,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: site_info = response.parse() assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.get( @@ -278,7 +258,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -297,7 +276,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSiteInfo: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.create( @@ -305,7 +283,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.create( @@ -316,7 +293,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.create( @@ -328,7 +304,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: site_info = await response.parse() assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.create( @@ -342,7 +317,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -350,7 +324,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.update( @@ -359,7 +332,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.update( @@ -371,7 +343,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.update( @@ -384,7 +355,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: site_info = await response.parse() assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.update( @@ -399,7 +369,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -414,7 +383,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.list( @@ -422,7 +390,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.list( @@ -433,7 +400,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.list( @@ -445,7 +411,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: site_info = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.list( @@ -459,7 +424,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -467,7 +431,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.delete( @@ -476,7 +439,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SiteInfoDeleteResponse], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.delete( @@ -489,7 +451,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: site_info = await response.parse() assert_matches_type(Optional[SiteInfoDeleteResponse], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.delete( @@ -504,7 +465,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -519,7 +479,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.get( @@ -528,7 +487,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.get( @@ -541,7 +499,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: site_info = await response.parse() assert_matches_type(Optional[Site], site_info, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.get( @@ -556,7 +513,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/secondary_dns/outgoing/test_status.py b/tests/api_resources/secondary_dns/outgoing/test_status.py index a669d9b1d58..98ced5177aa 100644 --- a/tests/api_resources/secondary_dns/outgoing/test_status.py +++ b/tests/api_resources/secondary_dns/outgoing/test_status.py @@ -16,7 +16,6 @@ class TestStatus: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: status = client.secondary_dns.outgoing.status.get( @@ -24,7 +23,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(str, status, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.outgoing.status.with_raw_response.get( @@ -36,7 +34,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: status = response.parse() assert_matches_type(str, status, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.outgoing.status.with_streaming_response.get( @@ -50,7 +47,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -62,7 +58,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStatus: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: status = await async_client.secondary_dns.outgoing.status.get( @@ -70,7 +65,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.outgoing.status.with_raw_response.get( @@ -82,7 +76,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: status = await response.parse() assert_matches_type(str, status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.outgoing.status.with_streaming_response.get( @@ -96,7 +89,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/secondary_dns/test_acls.py b/tests/api_resources/secondary_dns/test_acls.py index 3ad485b79c3..6723d4ab22d 100644 --- a/tests/api_resources/secondary_dns/test_acls.py +++ b/tests/api_resources/secondary_dns/test_acls.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.secondary_dns.acl import ACL -from cloudflare.types.secondary_dns.acl_delete_response import ACLDeleteResponse +from cloudflare.types.secondary_dns import ACL, ACLDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,7 @@ class TestACLs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.create( @@ -28,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.create( @@ -41,7 +40,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.create( @@ -56,7 +55,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -65,7 +64,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.update( @@ -76,7 +74,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.update( @@ -91,7 +88,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.update( @@ -108,7 +104,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -127,7 +122,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="my-acl-1", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.list( @@ -135,7 +129,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.list( @@ -147,7 +140,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(SyncSinglePage[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.list( @@ -161,7 +153,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -169,23 +160,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert response.is_closed is True @@ -193,13 +180,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -209,24 +194,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.acls.with_raw_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.secondary_dns.acls.with_raw_response.delete( "", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.get( @@ -235,7 +216,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.get( @@ -248,7 +228,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: acl = response.parse() assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.get( @@ -263,7 +242,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -282,7 +260,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncACLs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.create( @@ -291,7 +269,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.create( @@ -304,7 +282,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.create( @@ -319,7 +297,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -328,7 +306,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.update( @@ -339,7 +316,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.update( @@ -354,7 +330,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.update( @@ -371,7 +346,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -390,7 +364,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="my-acl-1", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.list( @@ -398,7 +371,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.list( @@ -410,7 +382,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(AsyncSinglePage[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.list( @@ -424,7 +395,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -432,23 +402,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert response.is_closed is True @@ -456,13 +422,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -472,24 +436,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.delete( "", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.get( @@ -498,7 +458,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.get( @@ -511,7 +470,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: acl = await response.parse() assert_matches_type(Optional[ACL], acl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.get( @@ -526,7 +484,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/secondary_dns/test_force_axfr.py b/tests/api_resources/secondary_dns/test_force_axfr.py index dee1012a5a1..2e0d975d424 100644 --- a/tests/api_resources/secondary_dns/test_force_axfr.py +++ b/tests/api_resources/secondary_dns/test_force_axfr.py @@ -16,7 +16,6 @@ class TestForceAXFR: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: force_axfr = client.secondary_dns.force_axfr.create( @@ -25,7 +24,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(str, force_axfr, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.secondary_dns.force_axfr.with_raw_response.create( @@ -38,7 +36,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: force_axfr = response.parse() assert_matches_type(str, force_axfr, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.secondary_dns.force_axfr.with_streaming_response.create( @@ -53,7 +50,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -66,7 +62,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncForceAXFR: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: force_axfr = await async_client.secondary_dns.force_axfr.create( @@ -75,7 +70,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, force_axfr, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.force_axfr.with_raw_response.create( @@ -88,7 +82,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: force_axfr = await response.parse() assert_matches_type(str, force_axfr, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.force_axfr.with_streaming_response.create( @@ -103,7 +96,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/secondary_dns/test_incoming.py b/tests/api_resources/secondary_dns/test_incoming.py index 849ca7e321a..f5dfb88362c 100644 --- a/tests/api_resources/secondary_dns/test_incoming.py +++ b/tests/api_resources/secondary_dns/test_incoming.py @@ -9,10 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.secondary_dns.incoming_get_response import IncomingGetResponse -from cloudflare.types.secondary_dns.incoming_create_response import IncomingCreateResponse -from cloudflare.types.secondary_dns.incoming_delete_response import IncomingDeleteResponse -from cloudflare.types.secondary_dns.incoming_update_response import IncomingUpdateResponse +from cloudflare.types.secondary_dns import ( + IncomingGetResponse, + IncomingCreateResponse, + IncomingDeleteResponse, + IncomingUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestIncoming: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: incoming = client.secondary_dns.incoming.create( @@ -31,7 +32,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.secondary_dns.incoming.with_raw_response.create( @@ -46,7 +46,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: incoming = response.parse() assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.secondary_dns.incoming.with_streaming_response.create( @@ -63,7 +62,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -74,7 +72,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: incoming = client.secondary_dns.incoming.update( @@ -85,7 +82,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.incoming.with_raw_response.update( @@ -100,7 +96,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: incoming = response.parse() assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.incoming.with_streaming_response.update( @@ -117,7 +112,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -128,21 +122,17 @@ def test_path_params_update(self, client: Cloudflare) -> None: peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: incoming = client.secondary_dns.incoming.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.incoming.with_raw_response.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) assert response.is_closed is True @@ -150,12 +140,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: incoming = response.parse() assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.incoming.with_streaming_response.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -165,16 +153,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.secondary_dns.incoming.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: incoming = client.secondary_dns.incoming.get( @@ -182,7 +167,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.incoming.with_raw_response.get( @@ -194,7 +178,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: incoming = response.parse() assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.incoming.with_streaming_response.get( @@ -208,7 +191,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -220,7 +202,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIncoming: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: incoming = await async_client.secondary_dns.incoming.create( @@ -231,7 +212,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.incoming.with_raw_response.create( @@ -246,7 +226,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: incoming = await response.parse() assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.incoming.with_streaming_response.create( @@ -263,7 +242,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -274,7 +252,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: incoming = await async_client.secondary_dns.incoming.update( @@ -285,7 +262,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.incoming.with_raw_response.update( @@ -300,7 +276,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: incoming = await response.parse() assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.incoming.with_streaming_response.update( @@ -317,7 +292,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -328,21 +302,17 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: incoming = await async_client.secondary_dns.incoming.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.incoming.with_raw_response.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) assert response.is_closed is True @@ -350,12 +320,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: incoming = await response.parse() assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.incoming.with_streaming_response.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -365,16 +333,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.secondary_dns.incoming.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: incoming = await async_client.secondary_dns.incoming.get( @@ -382,7 +347,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.incoming.with_raw_response.get( @@ -394,7 +358,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: incoming = await response.parse() assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.incoming.with_streaming_response.get( @@ -408,7 +371,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/secondary_dns/test_outgoing.py b/tests/api_resources/secondary_dns/test_outgoing.py index 161b2a57386..8e9a1d8e9e2 100644 --- a/tests/api_resources/secondary_dns/test_outgoing.py +++ b/tests/api_resources/secondary_dns/test_outgoing.py @@ -9,10 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.secondary_dns.outgoing_get_response import OutgoingGetResponse -from cloudflare.types.secondary_dns.outgoing_create_response import OutgoingCreateResponse -from cloudflare.types.secondary_dns.outgoing_delete_response import OutgoingDeleteResponse -from cloudflare.types.secondary_dns.outgoing_update_response import OutgoingUpdateResponse +from cloudflare.types.secondary_dns import ( + OutgoingGetResponse, + OutgoingCreateResponse, + OutgoingDeleteResponse, + OutgoingUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestOutgoing: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: outgoing = client.secondary_dns.outgoing.create( @@ -30,7 +31,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.secondary_dns.outgoing.with_raw_response.create( @@ -44,7 +44,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: outgoing = response.parse() assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.secondary_dns.outgoing.with_streaming_response.create( @@ -60,7 +59,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -70,7 +68,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: outgoing = client.secondary_dns.outgoing.update( @@ -80,7 +77,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.outgoing.with_raw_response.update( @@ -94,7 +90,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: outgoing = response.parse() assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.outgoing.with_streaming_response.update( @@ -110,7 +105,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -120,21 +114,17 @@ def test_path_params_update(self, client: Cloudflare) -> None: peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: outgoing = client.secondary_dns.outgoing.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.outgoing.with_raw_response.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) assert response.is_closed is True @@ -142,12 +132,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: outgoing = response.parse() assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.outgoing.with_streaming_response.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -157,16 +145,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.secondary_dns.outgoing.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_disable(self, client: Cloudflare) -> None: outgoing = client.secondary_dns.outgoing.disable( @@ -175,7 +160,6 @@ def test_method_disable(self, client: Cloudflare) -> None: ) assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_disable(self, client: Cloudflare) -> None: response = client.secondary_dns.outgoing.with_raw_response.disable( @@ -188,7 +172,6 @@ def test_raw_response_disable(self, client: Cloudflare) -> None: outgoing = response.parse() assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_disable(self, client: Cloudflare) -> None: with client.secondary_dns.outgoing.with_streaming_response.disable( @@ -203,7 +186,6 @@ def test_streaming_response_disable(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_disable(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -212,7 +194,6 @@ def test_path_params_disable(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_enable(self, client: Cloudflare) -> None: outgoing = client.secondary_dns.outgoing.enable( @@ -221,7 +202,6 @@ def test_method_enable(self, client: Cloudflare) -> None: ) assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_enable(self, client: Cloudflare) -> None: response = client.secondary_dns.outgoing.with_raw_response.enable( @@ -234,7 +214,6 @@ def test_raw_response_enable(self, client: Cloudflare) -> None: outgoing = response.parse() assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_enable(self, client: Cloudflare) -> None: with client.secondary_dns.outgoing.with_streaming_response.enable( @@ -249,7 +228,6 @@ def test_streaming_response_enable(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_enable(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -258,7 +236,6 @@ def test_path_params_enable(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_force_notify(self, client: Cloudflare) -> None: outgoing = client.secondary_dns.outgoing.force_notify( @@ -267,7 +244,6 @@ def test_method_force_notify(self, client: Cloudflare) -> None: ) assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_force_notify(self, client: Cloudflare) -> None: response = client.secondary_dns.outgoing.with_raw_response.force_notify( @@ -280,7 +256,6 @@ def test_raw_response_force_notify(self, client: Cloudflare) -> None: outgoing = response.parse() assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_force_notify(self, client: Cloudflare) -> None: with client.secondary_dns.outgoing.with_streaming_response.force_notify( @@ -295,7 +270,6 @@ def test_streaming_response_force_notify(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_force_notify(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -304,7 +278,6 @@ def test_path_params_force_notify(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: outgoing = client.secondary_dns.outgoing.get( @@ -312,7 +285,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.outgoing.with_raw_response.get( @@ -324,7 +296,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: outgoing = response.parse() assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.outgoing.with_streaming_response.get( @@ -338,7 +309,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -350,7 +320,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOutgoing: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: outgoing = await async_client.secondary_dns.outgoing.create( @@ -360,7 +329,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.outgoing.with_raw_response.create( @@ -374,7 +342,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: outgoing = await response.parse() assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.outgoing.with_streaming_response.create( @@ -390,7 +357,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -400,7 +366,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: outgoing = await async_client.secondary_dns.outgoing.update( @@ -410,7 +375,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.outgoing.with_raw_response.update( @@ -424,7 +388,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: outgoing = await response.parse() assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.outgoing.with_streaming_response.update( @@ -440,7 +403,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -450,21 +412,17 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: outgoing = await async_client.secondary_dns.outgoing.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.outgoing.with_raw_response.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) assert response.is_closed is True @@ -472,12 +430,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: outgoing = await response.parse() assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.outgoing.with_streaming_response.delete( zone_id="269d8f4853475ca241c4e730be286b20", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -487,16 +443,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.secondary_dns.outgoing.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_disable(self, async_client: AsyncCloudflare) -> None: outgoing = await async_client.secondary_dns.outgoing.disable( @@ -505,7 +458,6 @@ async def test_method_disable(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.outgoing.with_raw_response.disable( @@ -518,7 +470,6 @@ async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None outgoing = await response.parse() assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_disable(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.outgoing.with_streaming_response.disable( @@ -533,7 +484,6 @@ async def test_streaming_response_disable(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_disable(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -542,7 +492,6 @@ async def test_path_params_disable(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_enable(self, async_client: AsyncCloudflare) -> None: outgoing = await async_client.secondary_dns.outgoing.enable( @@ -551,7 +500,6 @@ async def test_method_enable(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.outgoing.with_raw_response.enable( @@ -564,7 +512,6 @@ async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None: outgoing = await response.parse() assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.outgoing.with_streaming_response.enable( @@ -579,7 +526,6 @@ async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_enable(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -588,7 +534,6 @@ async def test_path_params_enable(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_force_notify(self, async_client: AsyncCloudflare) -> None: outgoing = await async_client.secondary_dns.outgoing.force_notify( @@ -597,7 +542,6 @@ async def test_method_force_notify(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_force_notify(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.outgoing.with_raw_response.force_notify( @@ -610,7 +554,6 @@ async def test_raw_response_force_notify(self, async_client: AsyncCloudflare) -> outgoing = await response.parse() assert_matches_type(str, outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_force_notify(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.outgoing.with_streaming_response.force_notify( @@ -625,7 +568,6 @@ async def test_streaming_response_force_notify(self, async_client: AsyncCloudfla assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_force_notify(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -634,7 +576,6 @@ async def test_path_params_force_notify(self, async_client: AsyncCloudflare) -> body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: outgoing = await async_client.secondary_dns.outgoing.get( @@ -642,7 +583,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.outgoing.with_raw_response.get( @@ -654,7 +594,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: outgoing = await response.parse() assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.outgoing.with_streaming_response.get( @@ -668,7 +607,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/secondary_dns/test_peers.py b/tests/api_resources/secondary_dns/test_peers.py index 5b42901b1a2..9129014f7bd 100644 --- a/tests/api_resources/secondary_dns/test_peers.py +++ b/tests/api_resources/secondary_dns/test_peers.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.secondary_dns.peer import Peer -from cloudflare.types.secondary_dns.peer_delete_response import PeerDeleteResponse +from cloudflare.types.secondary_dns import Peer, PeerDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,7 @@ class TestPeers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.create( @@ -28,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.create( @@ -41,7 +40,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: peer = response.parse() assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.create( @@ -56,7 +55,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -65,7 +64,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.update( @@ -75,7 +73,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.update( @@ -89,7 +86,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.update( @@ -103,7 +99,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: peer = response.parse() assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.update( @@ -119,7 +114,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -136,7 +130,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="my-peer-1", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.list( @@ -144,7 +137,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.list( @@ -156,7 +148,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: peer = response.parse() assert_matches_type(SyncSinglePage[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.list( @@ -170,7 +161,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -178,23 +168,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert response.is_closed is True @@ -202,13 +188,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: peer = response.parse() assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -218,24 +202,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.peers.with_raw_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): client.secondary_dns.peers.with_raw_response.delete( "", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.get( @@ -244,7 +224,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.get( @@ -257,7 +236,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: peer = response.parse() assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.get( @@ -272,7 +250,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -291,7 +268,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPeers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.create( @@ -300,7 +277,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.create( @@ -313,7 +290,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: peer = await response.parse() assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.create( @@ -328,7 +305,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -337,7 +314,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.update( @@ -347,7 +323,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.update( @@ -361,7 +336,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.update( @@ -375,7 +349,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: peer = await response.parse() assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.update( @@ -391,7 +364,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -408,7 +380,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="my-peer-1", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.list( @@ -416,7 +387,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.list( @@ -428,7 +398,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: peer = await response.parse() assert_matches_type(AsyncSinglePage[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.list( @@ -442,7 +411,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -450,23 +418,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert response.is_closed is True @@ -474,13 +438,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: peer = await response.parse() assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -490,24 +452,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.delete( "23ff594956f20c2a721606e94745a8aa", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.delete( "", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.get( @@ -516,7 +474,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.get( @@ -529,7 +486,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: peer = await response.parse() assert_matches_type(Optional[Peer], peer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.get( @@ -544,7 +500,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/secondary_dns/test_tsigs.py b/tests/api_resources/secondary_dns/test_tsigs.py index 95e6828e389..cfc48b5b25e 100644 --- a/tests/api_resources/secondary_dns/test_tsigs.py +++ b/tests/api_resources/secondary_dns/test_tsigs.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.secondary_dns.tsig import TSIG -from cloudflare.types.secondary_dns.tsig_delete_response import TSIGDeleteResponse +from cloudflare.types.secondary_dns import TSIG, TSIGDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestTSIGs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.create( @@ -30,7 +28,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.create( @@ -45,7 +42,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: tsig = response.parse() assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.create( @@ -62,7 +58,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +68,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.update( @@ -85,7 +79,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.update( @@ -101,7 +94,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: tsig = response.parse() assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.update( @@ -119,7 +111,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -140,7 +131,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.list( @@ -148,7 +138,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.list( @@ -160,7 +149,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: tsig = response.parse() assert_matches_type(SyncSinglePage[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.list( @@ -174,7 +162,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -182,23 +169,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.delete( "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.delete( "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert response.is_closed is True @@ -206,13 +189,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: tsig = response.parse() assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.delete( "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -222,24 +203,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.delete( "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.delete( "", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.get( @@ -248,7 +225,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.get( @@ -261,7 +237,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tsig = response.parse() assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.get( @@ -276,7 +251,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -295,7 +269,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTSIGs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.create( @@ -306,7 +279,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.create( @@ -321,7 +293,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: tsig = await response.parse() assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.create( @@ -338,7 +309,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -349,7 +319,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.update( @@ -361,7 +330,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.update( @@ -377,7 +345,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: tsig = await response.parse() assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.update( @@ -395,7 +362,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -416,7 +382,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.list( @@ -424,7 +389,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.list( @@ -436,7 +400,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: tsig = await response.parse() assert_matches_type(AsyncSinglePage[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.list( @@ -450,7 +413,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -458,23 +420,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.delete( "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.delete( "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) assert response.is_closed is True @@ -482,13 +440,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: tsig = await response.parse() assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.delete( "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -498,24 +454,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.delete( "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.delete( "", account_id="01a7362d577a6c3019a474fd6f485823", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.get( @@ -524,7 +476,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.get( @@ -537,7 +488,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tsig = await response.parse() assert_matches_type(Optional[TSIG], tsig, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.get( @@ -552,7 +502,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/snippets/test_content.py b/tests/api_resources/snippets/test_content.py index cbb90cef7ff..752e1d2e2a5 100644 --- a/tests/api_resources/snippets/test_content.py +++ b/tests/api_resources/snippets/test_content.py @@ -23,7 +23,7 @@ class TestContent: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -32,14 +32,14 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: ) content = client.snippets.content.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed assert content.json() == {"foo": "bar"} assert cast(Any, content.is_closed) is True assert isinstance(content, BinaryAPIResponse) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -49,7 +49,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N content = client.snippets.content.with_raw_response.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed is True @@ -57,7 +57,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N assert content.json() == {"foo": "bar"} assert isinstance(content, BinaryAPIResponse) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -66,7 +66,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter ) with client.snippets.content.with_streaming_response.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed assert content.http_request.headers.get("X-Stainless-Lang") == "python" @@ -77,27 +77,27 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter assert cast(Any, content.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize @pytest.mark.respx(base_url=base_url) def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.content.with_raw_response.get( "snippet_name_01", - zone_identifier="", + zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.content.with_raw_response.get( "", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) class TestAsyncContent: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -106,14 +106,14 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR ) content = await async_client.snippets.content.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed assert await content.json() == {"foo": "bar"} assert cast(Any, content.is_closed) is True assert isinstance(content, AsyncBinaryAPIResponse) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -123,7 +123,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: content = await async_client.snippets.content.with_raw_response.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed is True @@ -131,7 +131,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: assert await content.json() == {"foo": "bar"} assert isinstance(content, AsyncBinaryAPIResponse) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -140,7 +140,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx ) async with async_client.snippets.content.with_streaming_response.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed assert content.http_request.headers.get("X-Stainless-Lang") == "python" @@ -151,18 +151,18 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx assert cast(Any, content.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize @pytest.mark.respx(base_url=base_url) async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.content.with_raw_response.get( "snippet_name_01", - zone_identifier="", + zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.content.with_raw_response.get( "", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/snippets/test_rules.py b/tests/api_resources/snippets/test_rules.py index 0a54c1b008c..83e021043b6 100644 --- a/tests/api_resources/snippets/test_rules.py +++ b/tests/api_resources/snippets/test_rules.py @@ -3,15 +3,14 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.snippets.rule_list_response import RuleListResponse -from cloudflare.types.snippets.rule_update_response import RuleUpdateResponse +from cloudflare.types.snippets import RuleListResponse, RuleUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,19 +18,17 @@ class TestRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.snippets.rules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.snippets.rules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", rules=[ { "description": "Rule description", @@ -53,55 +50,50 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, ], ) - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.snippets.rules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.snippets.rules.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.rules.with_raw_response.update( - "", + zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.snippets.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.snippets.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -109,11 +101,10 @@ def test_raw_response_list(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(SyncSinglePage[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.snippets.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -123,31 +114,28 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.rules.with_raw_response.list( - "", + zone_id="", ) class TestAsyncRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.snippets.rules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.snippets.rules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", rules=[ { "description": "Rule description", @@ -169,55 +157,50 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, ], ) - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.rules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.rules.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.rules.with_raw_response.update( - "", + zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.snippets.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -225,11 +208,10 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(AsyncSinglePage[RuleListResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -239,10 +221,9 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.rules.with_raw_response.list( - "", + zone_id="", ) diff --git a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py index 93e2b964a2a..fa152873a47 100644 --- a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py +++ b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.spectrum.analytics.aggregates.current_get_response import CurrentGetResponse +from cloudflare.types.spectrum.analytics.aggregates import CurrentGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestCurrents: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: current = client.spectrum.analytics.aggregates.currents.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(CurrentGetResponse, current, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: current = client.spectrum.analytics.aggregates.currents.get( @@ -36,7 +34,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(CurrentGetResponse, current, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.analytics.aggregates.currents.with_raw_response.get( @@ -48,7 +45,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: current = response.parse() assert_matches_type(CurrentGetResponse, current, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.analytics.aggregates.currents.with_streaming_response.get( @@ -62,7 +58,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -74,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCurrents: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: current = await async_client.spectrum.analytics.aggregates.currents.get( @@ -82,7 +76,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CurrentGetResponse, current, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: current = await async_client.spectrum.analytics.aggregates.currents.get( @@ -93,7 +86,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(CurrentGetResponse, current, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.analytics.aggregates.currents.with_raw_response.get( @@ -105,7 +97,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: current = await response.parse() assert_matches_type(CurrentGetResponse, current, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.analytics.aggregates.currents.with_streaming_response.get( @@ -119,7 +110,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): diff --git a/tests/api_resources/spectrum/analytics/events/test_bytimes.py b/tests/api_resources/spectrum/analytics/events/test_bytimes.py index 969bfefbfd0..57a939363a2 100644 --- a/tests/api_resources/spectrum/analytics/events/test_bytimes.py +++ b/tests/api_resources/spectrum/analytics/events/test_bytimes.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.spectrum.analytics.events.bytime_get_response import BytimeGetResponse +from cloudflare.types.spectrum.analytics.events import BytimeGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestBytimes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bytime = client.spectrum.analytics.events.bytimes.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bytime = client.spectrum.analytics.events.bytimes.get( @@ -41,7 +39,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.analytics.events.bytimes.with_raw_response.get( @@ -53,7 +50,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: bytime = response.parse() assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.analytics.events.bytimes.with_streaming_response.get( @@ -67,7 +63,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -79,7 +74,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBytimes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.spectrum.analytics.events.bytimes.get( @@ -87,7 +81,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.spectrum.analytics.events.bytimes.get( @@ -102,7 +95,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.analytics.events.bytimes.with_raw_response.get( @@ -114,7 +106,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: bytime = await response.parse() assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.analytics.events.bytimes.with_streaming_response.get( @@ -128,7 +119,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): diff --git a/tests/api_resources/spectrum/analytics/events/test_summaries.py b/tests/api_resources/spectrum/analytics/events/test_summaries.py index 9b81d31b467..abccd1640c3 100644 --- a/tests/api_resources/spectrum/analytics/events/test_summaries.py +++ b/tests/api_resources/spectrum/analytics/events/test_summaries.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.spectrum.analytics.events.summary_get_response import SummaryGetResponse +from cloudflare.types.spectrum.analytics.events import SummaryGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestSummaries: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: summary = client.spectrum.analytics.events.summaries.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: summary = client.spectrum.analytics.events.summaries.get( @@ -40,7 +38,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.analytics.events.summaries.with_raw_response.get( @@ -52,7 +49,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.analytics.events.summaries.with_streaming_response.get( @@ -66,7 +62,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -78,7 +73,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSummaries: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: summary = await async_client.spectrum.analytics.events.summaries.get( @@ -86,7 +80,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.spectrum.analytics.events.summaries.get( @@ -100,7 +93,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.analytics.events.summaries.with_raw_response.get( @@ -112,7 +104,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.analytics.events.summaries.with_streaming_response.get( @@ -126,7 +117,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): diff --git a/tests/api_resources/spectrum/test_apps.py b/tests/api_resources/spectrum/test_apps.py index ebd8c1e2746..cdd400dea70 100644 --- a/tests/api_resources/spectrum/test_apps.py +++ b/tests/api_resources/spectrum/test_apps.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.spectrum.app_get_response import AppGetResponse -from cloudflare.types.spectrum.app_create_response import AppCreateResponse -from cloudflare.types.spectrum.app_delete_response import AppDeleteResponse -from cloudflare.types.spectrum.app_update_response import AppUpdateResponse +from cloudflare.types.spectrum import ( + AppGetResponse, + AppCreateResponse, + AppDeleteResponse, + AppUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestApps: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: app = client.spectrum.apps.create( @@ -33,7 +34,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AppCreateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: app = client.spectrum.apps.create( @@ -61,7 +61,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AppCreateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.create( @@ -77,7 +76,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: app = response.parse() assert_matches_type(Optional[AppCreateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.create( @@ -95,7 +93,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -107,7 +104,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: protocol="tcp/22", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: app = client.spectrum.apps.update( @@ -120,7 +116,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AppUpdateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: app = client.spectrum.apps.update( @@ -149,7 +144,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AppUpdateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.update( @@ -166,7 +160,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: app = response.parse() assert_matches_type(Optional[AppUpdateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.update( @@ -185,7 +178,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -208,7 +200,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: protocol="tcp/22", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: app = client.spectrum.apps.list( @@ -216,7 +207,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[object], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: app = client.spectrum.apps.list( @@ -228,7 +218,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[object], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.list( @@ -240,7 +229,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: app = response.parse() assert_matches_type(SyncV4PagePaginationArray[object], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.list( @@ -254,7 +242,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -262,23 +249,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: app = client.spectrum.apps.delete( "ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -286,13 +269,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: app = response.parse() assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.delete( "ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -302,24 +283,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", zone="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.spectrum.apps.with_raw_response.delete( "", zone="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: app = client.spectrum.apps.get( @@ -328,7 +305,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(AppGetResponse, app, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.get( @@ -341,7 +317,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: app = response.parse() assert_matches_type(AppGetResponse, app, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.get( @@ -356,7 +331,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -375,7 +349,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncApps: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.create( @@ -387,7 +360,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AppCreateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.create( @@ -415,7 +387,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[AppCreateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.create( @@ -431,7 +402,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: app = await response.parse() assert_matches_type(Optional[AppCreateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.create( @@ -449,7 +419,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -461,7 +430,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: protocol="tcp/22", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.update( @@ -474,7 +442,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AppUpdateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.update( @@ -503,7 +470,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[AppUpdateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.update( @@ -520,7 +486,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: app = await response.parse() assert_matches_type(Optional[AppUpdateResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.update( @@ -539,7 +504,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -562,7 +526,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: protocol="tcp/22", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.list( @@ -570,7 +533,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[object], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.list( @@ -582,7 +544,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[object], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.list( @@ -594,7 +555,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: app = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[object], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.list( @@ -608,7 +568,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): @@ -616,23 +575,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.delete( "ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -640,13 +595,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: app = await response.parse() assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.delete( "ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -656,24 +609,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", zone="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.spectrum.apps.with_raw_response.delete( "", zone="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.get( @@ -682,7 +631,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AppGetResponse, app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.get( @@ -695,7 +643,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: app = await response.parse() assert_matches_type(AppGetResponse, app, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.get( @@ -710,7 +657,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): diff --git a/tests/api_resources/speed/pages/__init__.py b/tests/api_resources/speed/pages/__init__.py new file mode 100644 index 00000000000..fd8019a9a1a --- /dev/null +++ b/tests/api_resources/speed/pages/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/speed/test_tests.py b/tests/api_resources/speed/pages/test_tests.py similarity index 80% rename from tests/api_resources/speed/test_tests.py rename to tests/api_resources/speed/pages/test_tests.py index 6ee2a270944..5d768ba427c 100644 --- a/tests/api_resources/speed/test_tests.py +++ b/tests/api_resources/speed/pages/test_tests.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.speed.test import Test -from cloudflare.types.speed.test_list_response import TestListResponse -from cloudflare.types.speed.test_delete_response import TestDeleteResponse +from cloudflare.types.speed.pages import ( + Test, + TestListResponse, + TestDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,29 +21,26 @@ class TestTests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: - test = client.speed.tests.create( + test = client.speed.pages.tests.create( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: - test = client.speed.tests.create( + test = client.speed.pages.tests.create( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: - response = client.speed.tests.with_raw_response.create( + response = client.speed.pages.tests.with_raw_response.create( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -51,10 +50,9 @@ def test_raw_response_create(self, client: Cloudflare) -> None: test = response.parse() assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: - with client.speed.tests.with_streaming_response.create( + with client.speed.pages.tests.with_streaming_response.create( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -66,34 +64,31 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.speed.tests.with_raw_response.create( + client.speed.pages.tests.with_raw_response.create( "example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - client.speed.tests.with_raw_response.create( + client.speed.pages.tests.with_raw_response.create( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: - test = client.speed.tests.list( + test = client.speed.pages.tests.list( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(TestListResponse, test, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: - test = client.speed.tests.list( + test = client.speed.pages.tests.list( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page=1, @@ -102,10 +97,9 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TestListResponse, test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: - response = client.speed.tests.with_raw_response.list( + response = client.speed.pages.tests.with_raw_response.list( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -115,10 +109,9 @@ def test_raw_response_list(self, client: Cloudflare) -> None: test = response.parse() assert_matches_type(TestListResponse, test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: - with client.speed.tests.with_streaming_response.list( + with client.speed.pages.tests.with_streaming_response.list( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -130,44 +123,40 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.speed.tests.with_raw_response.list( + client.speed.pages.tests.with_raw_response.list( "example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - client.speed.tests.with_raw_response.list( + client.speed.pages.tests.with_raw_response.list( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: - test = client.speed.tests.delete( + test = client.speed.pages.tests.delete( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: - test = client.speed.tests.delete( + test = client.speed.pages.tests.delete( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: - response = client.speed.tests.with_raw_response.delete( + response = client.speed.pages.tests.with_raw_response.delete( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -177,10 +166,9 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: test = response.parse() assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: - with client.speed.tests.with_streaming_response.delete( + with client.speed.pages.tests.with_streaming_response.delete( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -192,35 +180,32 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.speed.tests.with_raw_response.delete( + client.speed.pages.tests.with_raw_response.delete( "example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - client.speed.tests.with_raw_response.delete( + client.speed.pages.tests.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: - test = client.speed.tests.get( + test = client.speed.pages.tests.get( "string", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.speed.tests.with_raw_response.get( + response = client.speed.pages.tests.with_raw_response.get( "string", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", @@ -231,10 +216,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: test = response.parse() assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.speed.tests.with_streaming_response.get( + with client.speed.pages.tests.with_streaming_response.get( "string", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", @@ -247,25 +231,24 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.speed.tests.with_raw_response.get( + client.speed.pages.tests.with_raw_response.get( "string", zone_id="", url="example.com", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - client.speed.tests.with_raw_response.get( + client.speed.pages.tests.with_raw_response.get( "string", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): - client.speed.tests.with_raw_response.get( + client.speed.pages.tests.with_raw_response.get( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", @@ -275,29 +258,26 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: - test = await async_client.speed.tests.create( + test = await async_client.speed.pages.tests.create( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: - test = await async_client.speed.tests.create( + test = await async_client.speed.pages.tests.create( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: - response = await async_client.speed.tests.with_raw_response.create( + response = await async_client.speed.pages.tests.with_raw_response.create( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -307,10 +287,9 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: test = await response.parse() assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: - async with async_client.speed.tests.with_streaming_response.create( + async with async_client.speed.pages.tests.with_streaming_response.create( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -322,34 +301,31 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.speed.tests.with_raw_response.create( + await async_client.speed.pages.tests.with_raw_response.create( "example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - await async_client.speed.tests.with_raw_response.create( + await async_client.speed.pages.tests.with_raw_response.create( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: - test = await async_client.speed.tests.list( + test = await async_client.speed.pages.tests.list( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(TestListResponse, test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: - test = await async_client.speed.tests.list( + test = await async_client.speed.pages.tests.list( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page=1, @@ -358,10 +334,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TestListResponse, test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: - response = await async_client.speed.tests.with_raw_response.list( + response = await async_client.speed.pages.tests.with_raw_response.list( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -371,10 +346,9 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: test = await response.parse() assert_matches_type(TestListResponse, test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: - async with async_client.speed.tests.with_streaming_response.list( + async with async_client.speed.pages.tests.with_streaming_response.list( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -386,44 +360,40 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.speed.tests.with_raw_response.list( + await async_client.speed.pages.tests.with_raw_response.list( "example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - await async_client.speed.tests.with_raw_response.list( + await async_client.speed.pages.tests.with_raw_response.list( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - test = await async_client.speed.tests.delete( + test = await async_client.speed.pages.tests.delete( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: - test = await async_client.speed.tests.delete( + test = await async_client.speed.pages.tests.delete( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: - response = await async_client.speed.tests.with_raw_response.delete( + response = await async_client.speed.pages.tests.with_raw_response.delete( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -433,10 +403,9 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: test = await response.parse() assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: - async with async_client.speed.tests.with_streaming_response.delete( + async with async_client.speed.pages.tests.with_streaming_response.delete( "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -448,35 +417,32 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.speed.tests.with_raw_response.delete( + await async_client.speed.pages.tests.with_raw_response.delete( "example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - await async_client.speed.tests.with_raw_response.delete( + await async_client.speed.pages.tests.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: - test = await async_client.speed.tests.get( + test = await async_client.speed.pages.tests.get( "string", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.speed.tests.with_raw_response.get( + response = await async_client.speed.pages.tests.with_raw_response.get( "string", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", @@ -487,10 +453,9 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: test = await response.parse() assert_matches_type(Optional[Test], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.speed.tests.with_streaming_response.get( + async with async_client.speed.pages.tests.with_streaming_response.get( "string", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", @@ -503,25 +468,24 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.speed.tests.with_raw_response.get( + await async_client.speed.pages.tests.with_raw_response.get( "string", zone_id="", url="example.com", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - await async_client.speed.tests.with_raw_response.get( + await async_client.speed.pages.tests.with_raw_response.get( "string", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): - await async_client.speed.tests.with_raw_response.get( + await async_client.speed.pages.tests.with_raw_response.get( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", diff --git a/tests/api_resources/speed/test_availabilities.py b/tests/api_resources/speed/test_availabilities.py index 47b6e89cc3d..59d87a22852 100644 --- a/tests/api_resources/speed/test_availabilities.py +++ b/tests/api_resources/speed/test_availabilities.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.speed.availability import Availability +from cloudflare.types.speed import Availability base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAvailabilities: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: availability = client.speed.availabilities.list( @@ -25,7 +24,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Availability], availability, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.speed.availabilities.with_raw_response.list( @@ -37,7 +35,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: availability = response.parse() assert_matches_type(Optional[Availability], availability, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.speed.availabilities.with_streaming_response.list( @@ -51,7 +48,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAvailabilities: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: availability = await async_client.speed.availabilities.list( @@ -71,7 +66,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Availability], availability, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.availabilities.with_raw_response.list( @@ -83,7 +77,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: availability = await response.parse() assert_matches_type(Optional[Availability], availability, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.availabilities.with_streaming_response.list( @@ -97,7 +90,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/speed/test_pages.py b/tests/api_resources/speed/test_pages.py index 6fbcf9fde3b..0d259ddcb4a 100644 --- a/tests/api_resources/speed/test_pages.py +++ b/tests/api_resources/speed/test_pages.py @@ -3,14 +3,15 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.speed.page_list_response import PageListResponse +from cloudflare.types.speed import Trend, PageListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +19,6 @@ class TestPages: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: page = client.speed.pages.list( @@ -26,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[PageListResponse], page, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.speed.pages.with_raw_response.list( @@ -38,7 +37,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: page = response.parse() assert_matches_type(SyncSinglePage[PageListResponse], page, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.speed.pages.with_streaming_response.list( @@ -52,7 +50,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -60,11 +57,102 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_method_trend(self, client: Cloudflare) -> None: + page = client.speed.pages.trend( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) + assert_matches_type(Optional[Trend], page, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_method_trend_with_all_params(self, client: Cloudflare) -> None: + page = client.speed.pages.trend( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + end=parse_datetime("2014-01-01T05:20:00.12345Z"), + ) + assert_matches_type(Optional[Trend], page, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_raw_response_trend(self, client: Cloudflare) -> None: + response = client.speed.pages.with_raw_response.trend( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + page = response.parse() + assert_matches_type(Optional[Trend], page, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_streaming_response_trend(self, client: Cloudflare) -> None: + with client.speed.pages.with_streaming_response.trend( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + page = response.parse() + assert_matches_type(Optional[Trend], page, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_path_params_trend(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.speed.pages.with_raw_response.trend( + "example.com", + zone_id="", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): + client.speed.pages.with_raw_response.trend( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) + class TestAsyncPages: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: page = await async_client.speed.pages.list( @@ -72,7 +160,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[PageListResponse], page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.with_raw_response.list( @@ -84,7 +171,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: page = await response.parse() assert_matches_type(AsyncSinglePage[PageListResponse], page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.with_streaming_response.list( @@ -98,10 +184,101 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.with_raw_response.list( zone_id="", ) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_method_trend(self, async_client: AsyncCloudflare) -> None: + page = await async_client.speed.pages.trend( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) + assert_matches_type(Optional[Trend], page, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_method_trend_with_all_params(self, async_client: AsyncCloudflare) -> None: + page = await async_client.speed.pages.trend( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + end=parse_datetime("2014-01-01T05:20:00.12345Z"), + ) + assert_matches_type(Optional[Trend], page, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_raw_response_trend(self, async_client: AsyncCloudflare) -> None: + response = await async_client.speed.pages.with_raw_response.trend( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + page = await response.parse() + assert_matches_type(Optional[Trend], page, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_streaming_response_trend(self, async_client: AsyncCloudflare) -> None: + async with async_client.speed.pages.with_streaming_response.trend( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + page = await response.parse() + assert_matches_type(Optional[Trend], page, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_path_params_trend(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.speed.pages.with_raw_response.trend( + "example.com", + zone_id="", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): + await async_client.speed.pages.with_raw_response.trend( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + device_type="DESKTOP", + metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", + region="us-central1", + start=parse_datetime("2014-01-01T05:20:00.12345Z"), + tz="string", + ) diff --git a/tests/api_resources/speed/test_schedule.py b/tests/api_resources/speed/test_schedule.py index 4806abe3b57..4a20e89f851 100644 --- a/tests/api_resources/speed/test_schedule.py +++ b/tests/api_resources/speed/test_schedule.py @@ -9,7 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.speed.schedule_create_response import ScheduleCreateResponse +from cloudflare.types.speed import ( + Schedule, + ScheduleCreateResponse, + ScheduleDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +21,6 @@ class TestSchedule: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: schedule = client.speed.schedule.create( @@ -26,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: schedule = client.speed.schedule.create( @@ -36,7 +38,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.speed.schedule.with_raw_response.create( @@ -49,7 +50,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: schedule = response.parse() assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.speed.schedule.with_streaming_response.create( @@ -64,7 +64,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -79,11 +78,124 @@ def test_path_params_create(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + schedule = client.speed.schedule.delete( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) + + @parametrize + def test_method_delete_with_all_params(self, client: Cloudflare) -> None: + schedule = client.speed.schedule.delete( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + region="us-central1", + ) + assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.speed.schedule.with_raw_response.delete( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + schedule = response.parse() + assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.speed.schedule.with_streaming_response.delete( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + schedule = response.parse() + assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.speed.schedule.with_raw_response.delete( + "example.com", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): + client.speed.schedule.with_raw_response.delete( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + schedule = client.speed.schedule.get( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[Schedule], schedule, path=["response"]) + + @parametrize + def test_method_get_with_all_params(self, client: Cloudflare) -> None: + schedule = client.speed.schedule.get( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + region="us-central1", + ) + assert_matches_type(Optional[Schedule], schedule, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.speed.schedule.with_raw_response.get( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + schedule = response.parse() + assert_matches_type(Optional[Schedule], schedule, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.speed.schedule.with_streaming_response.get( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + schedule = response.parse() + assert_matches_type(Optional[Schedule], schedule, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.speed.schedule.with_raw_response.get( + "example.com", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): + client.speed.schedule.with_raw_response.get( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + class TestAsyncSchedule: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.create( @@ -92,7 +204,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.create( @@ -102,7 +213,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.schedule.with_raw_response.create( @@ -115,7 +225,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: schedule = await response.parse() assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.schedule.with_streaming_response.create( @@ -130,7 +239,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -144,3 +252,117 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + schedule = await async_client.speed.schedule.delete( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) + + @parametrize + async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: + schedule = await async_client.speed.schedule.delete( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + region="us-central1", + ) + assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.speed.schedule.with_raw_response.delete( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + schedule = await response.parse() + assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.speed.schedule.with_streaming_response.delete( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + schedule = await response.parse() + assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.speed.schedule.with_raw_response.delete( + "example.com", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): + await async_client.speed.schedule.with_raw_response.delete( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + schedule = await async_client.speed.schedule.get( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[Schedule], schedule, path=["response"]) + + @parametrize + async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: + schedule = await async_client.speed.schedule.get( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + region="us-central1", + ) + assert_matches_type(Optional[Schedule], schedule, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.speed.schedule.with_raw_response.get( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + schedule = await response.parse() + assert_matches_type(Optional[Schedule], schedule, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.speed.schedule.with_streaming_response.get( + "example.com", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + schedule = await response.parse() + assert_matches_type(Optional[Schedule], schedule, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.speed.schedule.with_raw_response.get( + "example.com", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): + await async_client.speed.schedule.with_raw_response.get( + "", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) diff --git a/tests/api_resources/ssl/certificate_packs/test_order.py b/tests/api_resources/ssl/certificate_packs/test_order.py index d50810563ee..3fcccbf64b9 100644 --- a/tests/api_resources/ssl/certificate_packs/test_order.py +++ b/tests/api_resources/ssl/certificate_packs/test_order.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.ssl.certificate_packs.order_create_response import OrderCreateResponse +from cloudflare.types.ssl.certificate_packs import OrderCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestOrder: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: order = client.ssl.certificate_packs.order.create( @@ -28,9 +27,8 @@ def test_method_create(self, client: Cloudflare) -> None: validation_method="txt", validity_days=14, ) - assert_matches_type(OrderCreateResponse, order, path=["response"]) + assert_matches_type(Optional[OrderCreateResponse], order, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: order = client.ssl.certificate_packs.order.create( @@ -42,9 +40,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: validity_days=14, cloudflare_branding=False, ) - assert_matches_type(OrderCreateResponse, order, path=["response"]) + assert_matches_type(Optional[OrderCreateResponse], order, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.order.with_raw_response.create( @@ -59,9 +56,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" order = response.parse() - assert_matches_type(OrderCreateResponse, order, path=["response"]) + assert_matches_type(Optional[OrderCreateResponse], order, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.order.with_streaming_response.create( @@ -76,11 +72,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" order = response.parse() - assert_matches_type(OrderCreateResponse, order, path=["response"]) + assert_matches_type(Optional[OrderCreateResponse], order, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -97,7 +92,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncOrder: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: order = await async_client.ssl.certificate_packs.order.create( @@ -108,9 +102,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: validation_method="txt", validity_days=14, ) - assert_matches_type(OrderCreateResponse, order, path=["response"]) + assert_matches_type(Optional[OrderCreateResponse], order, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: order = await async_client.ssl.certificate_packs.order.create( @@ -122,9 +115,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare validity_days=14, cloudflare_branding=False, ) - assert_matches_type(OrderCreateResponse, order, path=["response"]) + assert_matches_type(Optional[OrderCreateResponse], order, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.order.with_raw_response.create( @@ -139,9 +131,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" order = await response.parse() - assert_matches_type(OrderCreateResponse, order, path=["response"]) + assert_matches_type(Optional[OrderCreateResponse], order, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.order.with_streaming_response.create( @@ -156,11 +147,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" order = await response.parse() - assert_matches_type(OrderCreateResponse, order, path=["response"]) + assert_matches_type(Optional[OrderCreateResponse], order, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/ssl/certificate_packs/test_quota.py b/tests/api_resources/ssl/certificate_packs/test_quota.py index 8d9e3d161a0..0181a4d9e7d 100644 --- a/tests/api_resources/ssl/certificate_packs/test_quota.py +++ b/tests/api_resources/ssl/certificate_packs/test_quota.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.ssl.certificate_packs.quota_get_response import QuotaGetResponse +from cloudflare.types.ssl.certificate_packs import QuotaGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,15 +17,13 @@ class TestQuota: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: quota = client.ssl.certificate_packs.quota.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(QuotaGetResponse, quota, path=["response"]) + assert_matches_type(Optional[QuotaGetResponse], quota, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.quota.with_raw_response.get( @@ -35,9 +33,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" quota = response.parse() - assert_matches_type(QuotaGetResponse, quota, path=["response"]) + assert_matches_type(Optional[QuotaGetResponse], quota, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.quota.with_streaming_response.get( @@ -47,11 +44,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" quota = response.parse() - assert_matches_type(QuotaGetResponse, quota, path=["response"]) + assert_matches_type(Optional[QuotaGetResponse], quota, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,15 +59,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQuota: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: quota = await async_client.ssl.certificate_packs.quota.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(QuotaGetResponse, quota, path=["response"]) + assert_matches_type(Optional[QuotaGetResponse], quota, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.quota.with_raw_response.get( @@ -81,9 +75,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" quota = await response.parse() - assert_matches_type(QuotaGetResponse, quota, path=["response"]) + assert_matches_type(Optional[QuotaGetResponse], quota, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.quota.with_streaming_response.get( @@ -93,11 +86,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" quota = await response.parse() - assert_matches_type(QuotaGetResponse, quota, path=["response"]) + assert_matches_type(Optional[QuotaGetResponse], quota, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/ssl/test_analyze.py b/tests/api_resources/ssl/test_analyze.py index 4eaa1a711c4..5de06d1c3d5 100644 --- a/tests/api_resources/ssl/test_analyze.py +++ b/tests/api_resources/ssl/test_analyze.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.ssl.analyze_create_response import AnalyzeCreateResponse +from cloudflare.types.ssl import AnalyzeCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,15 +17,13 @@ class TestAnalyze: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: analyze = client.ssl.analyze.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AnalyzeCreateResponse, analyze, path=["response"]) + assert_matches_type(Optional[AnalyzeCreateResponse], analyze, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: analyze = client.ssl.analyze.create( @@ -33,9 +31,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: bundle_method="ubiquitous", certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", ) - assert_matches_type(AnalyzeCreateResponse, analyze, path=["response"]) + assert_matches_type(Optional[AnalyzeCreateResponse], analyze, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.ssl.analyze.with_raw_response.create( @@ -45,9 +42,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" analyze = response.parse() - assert_matches_type(AnalyzeCreateResponse, analyze, path=["response"]) + assert_matches_type(Optional[AnalyzeCreateResponse], analyze, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.ssl.analyze.with_streaming_response.create( @@ -57,11 +53,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" analyze = response.parse() - assert_matches_type(AnalyzeCreateResponse, analyze, path=["response"]) + assert_matches_type(Optional[AnalyzeCreateResponse], analyze, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -73,15 +68,13 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncAnalyze: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: analyze = await async_client.ssl.analyze.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AnalyzeCreateResponse, analyze, path=["response"]) + assert_matches_type(Optional[AnalyzeCreateResponse], analyze, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: analyze = await async_client.ssl.analyze.create( @@ -89,9 +82,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare bundle_method="ubiquitous", certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", ) - assert_matches_type(AnalyzeCreateResponse, analyze, path=["response"]) + assert_matches_type(Optional[AnalyzeCreateResponse], analyze, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.analyze.with_raw_response.create( @@ -101,9 +93,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" analyze = await response.parse() - assert_matches_type(AnalyzeCreateResponse, analyze, path=["response"]) + assert_matches_type(Optional[AnalyzeCreateResponse], analyze, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.analyze.with_streaming_response.create( @@ -113,11 +104,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" analyze = await response.parse() - assert_matches_type(AnalyzeCreateResponse, analyze, path=["response"]) + assert_matches_type(Optional[AnalyzeCreateResponse], analyze, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/ssl/test_certificate_packs.py b/tests/api_resources/ssl/test_certificate_packs.py index ae9070a08c5..865b9acef62 100644 --- a/tests/api_resources/ssl/test_certificate_packs.py +++ b/tests/api_resources/ssl/test_certificate_packs.py @@ -3,16 +3,18 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types.ssl import ( + CertificatePackGetResponse, + CertificatePackEditResponse, + CertificatePackDeleteResponse, +) from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.ssl.certificate_pack_get_response import CertificatePackGetResponse -from cloudflare.types.ssl.certificate_pack_edit_response import CertificatePackEditResponse -from cloudflare.types.ssl.certificate_pack_delete_response import CertificatePackDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestCertificatePacks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.list( @@ -28,7 +29,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[object], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.list( @@ -37,7 +37,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[object], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.list( @@ -49,7 +48,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: certificate_pack = response.parse() assert_matches_type(SyncSinglePage[object], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.list( @@ -63,7 +61,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -71,64 +68,54 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(CertificatePackDeleteResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = response.parse() - assert_matches_type(CertificatePackDeleteResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = response.parse() - assert_matches_type(CertificatePackDeleteResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.ssl.certificate_packs.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): client.ssl.certificate_packs.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.edit( @@ -136,9 +123,8 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(CertificatePackEditResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackEditResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.edit( @@ -150,9 +136,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = response.parse() - assert_matches_type(CertificatePackEditResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackEditResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.edit( @@ -164,11 +149,10 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = response.parse() - assert_matches_type(CertificatePackEditResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackEditResponse], certificate_pack, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -185,16 +169,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CertificatePackGetResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.get( @@ -205,9 +187,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = response.parse() - assert_matches_type(CertificatePackGetResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.get( @@ -218,11 +199,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = response.parse() - assert_matches_type(CertificatePackGetResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -241,7 +221,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificatePacks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.list( @@ -249,7 +228,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[object], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.list( @@ -258,7 +236,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[object], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.list( @@ -270,7 +247,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: certificate_pack = await response.parse() assert_matches_type(AsyncSinglePage[object], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.with_streaming_response.list( @@ -284,7 +260,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -292,64 +267,54 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(CertificatePackDeleteResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = await response.parse() - assert_matches_type(CertificatePackDeleteResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = await response.parse() - assert_matches_type(CertificatePackDeleteResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.edit( @@ -357,9 +322,8 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(CertificatePackEditResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackEditResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.edit( @@ -371,9 +335,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = await response.parse() - assert_matches_type(CertificatePackEditResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackEditResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.with_streaming_response.edit( @@ -385,11 +348,10 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = await response.parse() - assert_matches_type(CertificatePackEditResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackEditResponse], certificate_pack, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -406,16 +368,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CertificatePackGetResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.get( @@ -426,9 +386,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = await response.parse() - assert_matches_type(CertificatePackGetResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.with_streaming_response.get( @@ -439,11 +398,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = await response.parse() - assert_matches_type(CertificatePackGetResponse, certificate_pack, path=["response"]) + assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/ssl/test_recommendations.py b/tests/api_resources/ssl/test_recommendations.py index f164d6d5e05..25c8c9c2841 100644 --- a/tests/api_resources/ssl/test_recommendations.py +++ b/tests/api_resources/ssl/test_recommendations.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.ssl.recommendation_get_response import RecommendationGetResponse +from cloudflare.types.ssl import RecommendationGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestRecommendations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: recommendation = client.ssl.recommendations.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ssl.recommendations.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: recommendation = response.parse() assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ssl.recommendations.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRecommendations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: recommendation = await async_client.ssl.recommendations.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.recommendations.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: recommendation = await response.parse() assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.recommendations.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/ssl/test_verification.py b/tests/api_resources/ssl/test_verification.py index aa8d2e07f04..2f83b897384 100644 --- a/tests/api_resources/ssl/test_verification.py +++ b/tests/api_resources/ssl/test_verification.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.ssl.verification_get_response import VerificationGetResponse -from cloudflare.types.ssl.verification_edit_response import VerificationEditResponse +from cloudflare.types.ssl import ( + VerificationGetResponse, + VerificationEditResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestVerification: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: verification = client.ssl.verification.edit( @@ -26,9 +27,8 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) - assert_matches_type(VerificationEditResponse, verification, path=["response"]) + assert_matches_type(Optional[VerificationEditResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.ssl.verification.with_raw_response.edit( @@ -40,9 +40,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" verification = response.parse() - assert_matches_type(VerificationEditResponse, verification, path=["response"]) + assert_matches_type(Optional[VerificationEditResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.ssl.verification.with_streaming_response.edit( @@ -54,11 +53,10 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" verification = response.parse() - assert_matches_type(VerificationEditResponse, verification, path=["response"]) + assert_matches_type(Optional[VerificationEditResponse], verification, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -75,7 +73,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: validation_method="txt", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: verification = client.ssl.verification.get( @@ -83,7 +80,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[VerificationGetResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: verification = client.ssl.verification.get( @@ -92,7 +88,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[VerificationGetResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ssl.verification.with_raw_response.get( @@ -104,7 +99,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: verification = response.parse() assert_matches_type(Optional[VerificationGetResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ssl.verification.with_streaming_response.get( @@ -118,7 +112,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -130,7 +123,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVerification: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: verification = await async_client.ssl.verification.edit( @@ -138,9 +130,8 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) - assert_matches_type(VerificationEditResponse, verification, path=["response"]) + assert_matches_type(Optional[VerificationEditResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.verification.with_raw_response.edit( @@ -152,9 +143,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" verification = await response.parse() - assert_matches_type(VerificationEditResponse, verification, path=["response"]) + assert_matches_type(Optional[VerificationEditResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.verification.with_streaming_response.edit( @@ -166,11 +156,10 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" verification = await response.parse() - assert_matches_type(VerificationEditResponse, verification, path=["response"]) + assert_matches_type(Optional[VerificationEditResponse], verification, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -187,7 +176,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: validation_method="txt", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: verification = await async_client.ssl.verification.get( @@ -195,7 +183,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[VerificationGetResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: verification = await async_client.ssl.verification.get( @@ -204,7 +191,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[VerificationGetResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.verification.with_raw_response.get( @@ -216,7 +202,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: verification = await response.parse() assert_matches_type(Optional[VerificationGetResponse], verification, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.verification.with_streaming_response.get( @@ -230,7 +215,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/ssl/universal/test_settings.py b/tests/api_resources/ssl/universal/test_settings.py index 2d808b06815..a6040dd1411 100644 --- a/tests/api_resources/ssl/universal/test_settings.py +++ b/tests/api_resources/ssl/universal/test_settings.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.ssl.universal.universal_ssl_settings import UniversalSSLSettings +from cloudflare.types.ssl.universal import UniversalSSLSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,24 +17,21 @@ class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.ssl.universal.settings.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.ssl.universal.settings.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.ssl.universal.settings.with_raw_response.edit( @@ -44,9 +41,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.ssl.universal.settings.with_streaming_response.edit( @@ -56,11 +52,10 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -68,15 +63,13 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.ssl.universal.settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ssl.universal.settings.with_raw_response.get( @@ -86,9 +79,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ssl.universal.settings.with_streaming_response.get( @@ -98,11 +90,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -114,24 +105,21 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.ssl.universal.settings.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.ssl.universal.settings.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.universal.settings.with_raw_response.edit( @@ -141,9 +129,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.universal.settings.with_streaming_response.edit( @@ -153,11 +140,10 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -165,15 +151,13 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.ssl.universal.settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.universal.settings.with_raw_response.get( @@ -183,9 +167,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.universal.settings.with_streaming_response.get( @@ -195,11 +178,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(UniversalSSLSettings, setting, path=["response"]) + assert_matches_type(Optional[UniversalSSLSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/storage/test_analytics.py b/tests/api_resources/storage/test_analytics.py index 3b29ccbcaaf..bd9e182261e 100644 --- a/tests/api_resources/storage/test_analytics.py +++ b/tests/api_resources/storage/test_analytics.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.storage.schema import Schema -from cloudflare.types.storage.components import Components +from cloudflare.types.storage import Schema, Components base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestAnalytics: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: analytics = client.storage.analytics.list( @@ -27,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Schema, analytics, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: analytics = client.storage.analytics.list( @@ -44,7 +41,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Schema, analytics, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.storage.analytics.with_raw_response.list( @@ -56,7 +52,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: analytics = response.parse() assert_matches_type(Schema, analytics, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.storage.analytics.with_streaming_response.list( @@ -70,7 +65,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -78,7 +72,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_stored(self, client: Cloudflare) -> None: analytics = client.storage.analytics.stored( @@ -86,7 +79,6 @@ def test_method_stored(self, client: Cloudflare) -> None: ) assert_matches_type(Components, analytics, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_stored_with_all_params(self, client: Cloudflare) -> None: analytics = client.storage.analytics.stored( @@ -103,7 +95,6 @@ def test_method_stored_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Components, analytics, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_stored(self, client: Cloudflare) -> None: response = client.storage.analytics.with_raw_response.stored( @@ -115,7 +106,6 @@ def test_raw_response_stored(self, client: Cloudflare) -> None: analytics = response.parse() assert_matches_type(Components, analytics, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_stored(self, client: Cloudflare) -> None: with client.storage.analytics.with_streaming_response.stored( @@ -129,7 +119,6 @@ def test_streaming_response_stored(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_stored(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -141,7 +130,6 @@ def test_path_params_stored(self, client: Cloudflare) -> None: class TestAsyncAnalytics: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: analytics = await async_client.storage.analytics.list( @@ -149,7 +137,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Schema, analytics, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: analytics = await async_client.storage.analytics.list( @@ -166,7 +153,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Schema, analytics, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.storage.analytics.with_raw_response.list( @@ -178,7 +164,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: analytics = await response.parse() assert_matches_type(Schema, analytics, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.storage.analytics.with_streaming_response.list( @@ -192,7 +177,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -200,7 +184,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_stored(self, async_client: AsyncCloudflare) -> None: analytics = await async_client.storage.analytics.stored( @@ -208,7 +191,6 @@ async def test_method_stored(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Components, analytics, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_stored_with_all_params(self, async_client: AsyncCloudflare) -> None: analytics = await async_client.storage.analytics.stored( @@ -225,7 +207,6 @@ async def test_method_stored_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Components, analytics, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_stored(self, async_client: AsyncCloudflare) -> None: response = await async_client.storage.analytics.with_raw_response.stored( @@ -237,7 +218,6 @@ async def test_raw_response_stored(self, async_client: AsyncCloudflare) -> None: analytics = await response.parse() assert_matches_type(Components, analytics, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_stored(self, async_client: AsyncCloudflare) -> None: async with async_client.storage.analytics.with_streaming_response.stored( @@ -251,7 +231,6 @@ async def test_streaming_response_stored(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_stored(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/captions/language/test_vtt.py b/tests/api_resources/stream/captions/language/test_vtt.py index aeb7c403fee..64b2a97f352 100644 --- a/tests/api_resources/stream/captions/language/test_vtt.py +++ b/tests/api_resources/stream/captions/language/test_vtt.py @@ -16,7 +16,6 @@ class TestVtt: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: vtt = client.stream.captions.language.vtt.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(str, vtt, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.captions.language.vtt.with_raw_response.get( @@ -40,7 +38,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: vtt = response.parse() assert_matches_type(str, vtt, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.captions.language.vtt.with_streaming_response.get( @@ -56,7 +53,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -84,7 +80,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVtt: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: vtt = await async_client.stream.captions.language.vtt.get( @@ -94,7 +89,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, vtt, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.vtt.with_raw_response.get( @@ -108,7 +102,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: vtt = await response.parse() assert_matches_type(str, vtt, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.vtt.with_streaming_response.get( @@ -124,7 +117,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/captions/test_language.py b/tests/api_resources/stream/captions/test_language.py index 21ca8abb7f0..15caab5410b 100644 --- a/tests/api_resources/stream/captions/test_language.py +++ b/tests/api_resources/stream/captions/test_language.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.caption import Caption +from cloudflare.types.stream import Caption base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,7 @@ class TestLanguage: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: language = client.stream.captions.language.update( @@ -28,7 +28,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Caption], language, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.update( @@ -43,7 +43,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: language = response.parse() assert_matches_type(Optional[Caption], language, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.update( @@ -60,7 +60,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -87,25 +87,21 @@ def test_path_params_update(self, client: Cloudflare) -> None: file="@/Users/kyle/Desktop/tr.vtt", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: language = client.stream.captions.language.delete( "tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) assert_matches_type(str, language, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.delete( "tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) assert response.is_closed is True @@ -113,14 +109,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: language = response.parse() assert_matches_type(str, language, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.delete( "tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -130,7 +124,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -138,7 +131,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -146,7 +138,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): @@ -154,10 +145,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: language = client.stream.captions.language.get( @@ -167,7 +156,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Caption], language, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.get( @@ -181,7 +169,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: language = response.parse() assert_matches_type(Optional[Caption], language, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.get( @@ -197,7 +184,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -225,7 +211,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLanguage: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.update( @@ -236,7 +222,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Caption], language, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.update( @@ -251,7 +237,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: language = await response.parse() assert_matches_type(Optional[Caption], language, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.update( @@ -268,7 +254,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -295,25 +281,21 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: file="@/Users/kyle/Desktop/tr.vtt", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.delete( "tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) assert_matches_type(str, language, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.delete( "tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) assert response.is_closed is True @@ -321,14 +303,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: language = await response.parse() assert_matches_type(str, language, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.delete( "tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -338,7 +318,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -346,7 +325,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -354,7 +332,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): @@ -362,10 +339,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.get( @@ -375,7 +350,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Caption], language, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.get( @@ -389,7 +363,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: language = await response.parse() assert_matches_type(Optional[Caption], language, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.get( @@ -405,7 +378,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/live_inputs/test_outputs.py b/tests/api_resources/stream/live_inputs/test_outputs.py index c65c0428bdf..b20c437529f 100644 --- a/tests/api_resources/stream/live_inputs/test_outputs.py +++ b/tests/api_resources/stream/live_inputs/test_outputs.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.stream.live_inputs.output import Output +from cloudflare.types.stream.live_inputs import Output base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestOutputs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.create( @@ -29,7 +28,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.create( @@ -41,7 +39,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.create( @@ -56,7 +53,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: output = response.parse() assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.create( @@ -73,7 +69,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -92,7 +87,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: url="rtmp://a.rtmp.youtube.com/live2", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.update( @@ -103,7 +97,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.update( @@ -118,7 +111,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: output = response.parse() assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.update( @@ -135,7 +127,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -162,7 +153,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: enabled=True, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.list( @@ -171,7 +161,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.list( @@ -184,7 +173,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: output = response.parse() assert_matches_type(SyncSinglePage[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.list( @@ -199,7 +187,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -214,25 +201,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.delete( "baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) assert output is None - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.delete( "baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) assert response.is_closed is True @@ -240,14 +223,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: output = response.parse() assert output is None - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.delete( "baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -257,7 +238,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -265,7 +245,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): @@ -273,7 +252,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): @@ -281,14 +259,12 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) class TestAsyncOutputs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.create( @@ -299,7 +275,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.create( @@ -311,7 +286,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.create( @@ -326,7 +300,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: output = await response.parse() assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.create( @@ -343,7 +316,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -362,7 +334,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: url="rtmp://a.rtmp.youtube.com/live2", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.update( @@ -373,7 +344,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.update( @@ -388,7 +358,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: output = await response.parse() assert_matches_type(Optional[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.update( @@ -405,7 +374,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -432,7 +400,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: enabled=True, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.list( @@ -441,7 +408,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.list( @@ -454,7 +420,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: output = await response.parse() assert_matches_type(AsyncSinglePage[Output], output, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.list( @@ -469,7 +434,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -484,25 +448,21 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.delete( "baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) assert output is None - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.delete( "baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) assert response.is_closed is True @@ -510,14 +470,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: output = await response.parse() assert output is None - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.delete( "baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -527,7 +485,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -535,7 +492,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): @@ -543,7 +499,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): @@ -551,5 +506,4 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", - body={}, ) diff --git a/tests/api_resources/stream/test_audio_tracks.py b/tests/api_resources/stream/test_audio_tracks.py index 891eb6ea9e0..b1af748dc56 100644 --- a/tests/api_resources/stream/test_audio_tracks.py +++ b/tests/api_resources/stream/test_audio_tracks.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.audio import Audio -from cloudflare.types.stream.audio_track_get_response import AudioTrackGetResponse -from cloudflare.types.stream.audio_track_delete_response import AudioTrackDeleteResponse +from cloudflare.types.stream import ( + Audio, + AudioTrackGetResponse, + AudioTrackDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestAudioTracks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.delete( @@ -29,7 +30,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AudioTrackDeleteResponse], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.delete( @@ -43,7 +43,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: audio_track = response.parse() assert_matches_type(Optional[AudioTrackDeleteResponse], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.delete( @@ -59,7 +58,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -83,7 +81,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: identifier="ea95132c15732412d22c1476fa83f27a", ) - @pytest.mark.skip() @parametrize def test_method_copy(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.copy( @@ -93,7 +90,6 @@ def test_method_copy(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_copy_with_all_params(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.copy( @@ -104,7 +100,6 @@ def test_method_copy_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_copy(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.copy( @@ -118,7 +113,6 @@ def test_raw_response_copy(self, client: Cloudflare) -> None: audio_track = response.parse() assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_copy(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.copy( @@ -134,7 +128,6 @@ def test_streaming_response_copy(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_copy(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -151,7 +144,6 @@ def test_path_params_copy(self, client: Cloudflare) -> None: label="director commentary", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.edit( @@ -161,7 +153,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.edit( @@ -173,7 +164,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.edit( @@ -187,7 +177,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: audio_track = response.parse() assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.edit( @@ -203,7 +192,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -227,7 +215,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: identifier="ea95132c15732412d22c1476fa83f27a", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.get( @@ -236,7 +223,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AudioTrackGetResponse], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.get( @@ -249,7 +235,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: audio_track = response.parse() assert_matches_type(Optional[AudioTrackGetResponse], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.get( @@ -264,7 +249,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -283,7 +267,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAudioTracks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.delete( @@ -293,7 +276,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AudioTrackDeleteResponse], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.delete( @@ -307,7 +289,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: audio_track = await response.parse() assert_matches_type(Optional[AudioTrackDeleteResponse], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.delete( @@ -323,7 +304,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -347,7 +327,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: identifier="ea95132c15732412d22c1476fa83f27a", ) - @pytest.mark.skip() @parametrize async def test_method_copy(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.copy( @@ -357,7 +336,6 @@ async def test_method_copy(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_copy_with_all_params(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.copy( @@ -368,7 +346,6 @@ async def test_method_copy_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_copy(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.copy( @@ -382,7 +359,6 @@ async def test_raw_response_copy(self, async_client: AsyncCloudflare) -> None: audio_track = await response.parse() assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_copy(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.copy( @@ -398,7 +374,6 @@ async def test_streaming_response_copy(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_copy(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -415,7 +390,6 @@ async def test_path_params_copy(self, async_client: AsyncCloudflare) -> None: label="director commentary", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.edit( @@ -425,7 +399,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.edit( @@ -437,7 +410,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.edit( @@ -451,7 +423,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: audio_track = await response.parse() assert_matches_type(Optional[Audio], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.edit( @@ -467,7 +438,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -491,7 +461,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: identifier="ea95132c15732412d22c1476fa83f27a", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.get( @@ -500,7 +469,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AudioTrackGetResponse], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.get( @@ -513,7 +481,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: audio_track = await response.parse() assert_matches_type(Optional[AudioTrackGetResponse], audio_track, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.get( @@ -528,7 +495,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_captions.py b/tests/api_resources/stream/test_captions.py index 9afa84a290e..4361d07217d 100644 --- a/tests/api_resources/stream/test_captions.py +++ b/tests/api_resources/stream/test_captions.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.caption_get_response import CaptionGetResponse +from cloudflare.types.stream import CaptionGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestCaptions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: caption = client.stream.captions.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CaptionGetResponse], caption, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.captions.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: caption = response.parse() assert_matches_type(Optional[CaptionGetResponse], caption, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.captions.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCaptions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: caption = await async_client.stream.captions.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CaptionGetResponse], caption, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: caption = await response.parse() assert_matches_type(Optional[CaptionGetResponse], caption, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_clip.py b/tests/api_resources/stream/test_clip.py index 2a96300b3da..c0806600820 100644 --- a/tests/api_resources/stream/test_clip.py +++ b/tests/api_resources/stream/test_clip.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.clip import Clip +from cloudflare.types.stream import Clip base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestClip: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: clip = client.stream.clip.create( @@ -28,7 +27,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Clip], clip, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: clip = client.stream.clip.create( @@ -45,7 +43,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Clip], clip, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.clip.with_raw_response.create( @@ -60,7 +57,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: clip = response.parse() assert_matches_type(Optional[Clip], clip, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.clip.with_streaming_response.create( @@ -77,7 +73,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -92,7 +87,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncClip: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: clip = await async_client.stream.clip.create( @@ -103,7 +97,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Clip], clip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: clip = await async_client.stream.clip.create( @@ -120,7 +113,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Clip], clip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.clip.with_raw_response.create( @@ -135,7 +127,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: clip = await response.parse() assert_matches_type(Optional[Clip], clip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.clip.with_streaming_response.create( @@ -152,7 +143,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_copy.py b/tests/api_resources/stream/test_copy.py index 2aff75a9dea..191a1cc36c3 100644 --- a/tests/api_resources/stream/test_copy.py +++ b/tests/api_resources/stream/test_copy.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.stream.video import Video +from cloudflare.types.stream import Video base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestCopy: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: copy = client.stream.copy.create( @@ -27,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Video], copy, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: copy = client.stream.copy.create( @@ -43,7 +41,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Video], copy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.copy.with_raw_response.create( @@ -56,7 +53,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: copy = response.parse() assert_matches_type(Optional[Video], copy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.copy.with_streaming_response.create( @@ -71,7 +67,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -84,7 +79,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncCopy: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: copy = await async_client.stream.copy.create( @@ -93,7 +87,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Video], copy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: copy = await async_client.stream.copy.create( @@ -109,7 +102,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Video], copy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.copy.with_raw_response.create( @@ -122,7 +114,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: copy = await response.parse() assert_matches_type(Optional[Video], copy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.copy.with_streaming_response.create( @@ -137,7 +128,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_direct_upload.py b/tests/api_resources/stream/test_direct_upload.py index c28073f73e8..7115e89cc14 100644 --- a/tests/api_resources/stream/test_direct_upload.py +++ b/tests/api_resources/stream/test_direct_upload.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.stream.direct_upload_create_response import DirectUploadCreateResponse +from cloudflare.types.stream import DirectUploadCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestDirectUpload: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: direct_upload = client.stream.direct_upload.create( @@ -27,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DirectUploadCreateResponse], direct_upload, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: direct_upload = client.stream.direct_upload.create( @@ -44,7 +42,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DirectUploadCreateResponse], direct_upload, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.direct_upload.with_raw_response.create( @@ -57,7 +54,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: direct_upload = response.parse() assert_matches_type(Optional[DirectUploadCreateResponse], direct_upload, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.direct_upload.with_streaming_response.create( @@ -72,7 +68,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -85,7 +80,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncDirectUpload: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: direct_upload = await async_client.stream.direct_upload.create( @@ -94,7 +88,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DirectUploadCreateResponse], direct_upload, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: direct_upload = await async_client.stream.direct_upload.create( @@ -111,7 +104,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[DirectUploadCreateResponse], direct_upload, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.direct_upload.with_raw_response.create( @@ -124,7 +116,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: direct_upload = await response.parse() assert_matches_type(Optional[DirectUploadCreateResponse], direct_upload, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.direct_upload.with_streaming_response.create( @@ -139,7 +130,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_downloads.py b/tests/api_resources/stream/test_downloads.py index ed715f7aa37..2940e0ff0d6 100644 --- a/tests/api_resources/stream/test_downloads.py +++ b/tests/api_resources/stream/test_downloads.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.download_get_response import DownloadGetResponse -from cloudflare.types.stream.download_create_response import DownloadCreateResponse -from cloudflare.types.stream.download_delete_response import DownloadDeleteResponse +from cloudflare.types.stream import ( + DownloadGetResponse, + DownloadCreateResponse, + DownloadDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestDownloads: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: download = client.stream.downloads.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DownloadCreateResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.downloads.with_raw_response.create( @@ -43,7 +43,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: download = response.parse() assert_matches_type(Optional[DownloadCreateResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.downloads.with_streaming_response.create( @@ -59,7 +58,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -76,7 +74,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: download = client.stream.downloads.delete( @@ -85,7 +82,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DownloadDeleteResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.downloads.with_raw_response.delete( @@ -98,7 +94,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: download = response.parse() assert_matches_type(Optional[DownloadDeleteResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.downloads.with_streaming_response.delete( @@ -113,7 +108,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -128,7 +122,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: download = client.stream.downloads.get( @@ -137,7 +130,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DownloadGetResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.downloads.with_raw_response.get( @@ -150,7 +142,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: download = response.parse() assert_matches_type(Optional[DownloadGetResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.downloads.with_streaming_response.get( @@ -165,7 +156,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -184,7 +174,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownloads: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: download = await async_client.stream.downloads.create( @@ -194,7 +183,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DownloadCreateResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.downloads.with_raw_response.create( @@ -208,7 +196,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: download = await response.parse() assert_matches_type(Optional[DownloadCreateResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.downloads.with_streaming_response.create( @@ -224,7 +211,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -241,7 +227,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: download = await async_client.stream.downloads.delete( @@ -250,7 +235,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DownloadDeleteResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.downloads.with_raw_response.delete( @@ -263,7 +247,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: download = await response.parse() assert_matches_type(Optional[DownloadDeleteResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.downloads.with_streaming_response.delete( @@ -278,7 +261,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -293,7 +275,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: download = await async_client.stream.downloads.get( @@ -302,7 +283,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DownloadGetResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.downloads.with_raw_response.get( @@ -315,7 +295,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: download = await response.parse() assert_matches_type(Optional[DownloadGetResponse], download, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.downloads.with_streaming_response.get( @@ -330,7 +309,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_embed.py b/tests/api_resources/stream/test_embed.py index f96c02841a9..1f7066ff514 100644 --- a/tests/api_resources/stream/test_embed.py +++ b/tests/api_resources/stream/test_embed.py @@ -16,7 +16,6 @@ class TestEmbed: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: embed = client.stream.embed.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(str, embed, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.embed.with_raw_response.get( @@ -38,7 +36,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: embed = response.parse() assert_matches_type(str, embed, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.embed.with_streaming_response.get( @@ -53,7 +50,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -72,7 +68,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEmbed: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: embed = await async_client.stream.embed.get( @@ -81,7 +76,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, embed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.embed.with_raw_response.get( @@ -94,7 +88,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: embed = await response.parse() assert_matches_type(str, embed, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.embed.with_streaming_response.get( @@ -109,7 +102,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_keys.py b/tests/api_resources/stream/test_keys.py index ceaa98aa080..14b7d11cef2 100644 --- a/tests/api_resources/stream/test_keys.py +++ b/tests/api_resources/stream/test_keys.py @@ -9,9 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.keys import Keys -from cloudflare.types.stream.key_get_response import KeyGetResponse -from cloudflare.types.stream.key_delete_response import KeyDeleteResponse +from cloudflare.types.stream import Keys, KeyGetResponse, KeyDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +17,6 @@ class TestKeys: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: key = client.stream.keys.create( @@ -28,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Keys], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.keys.with_raw_response.create( @@ -41,7 +37,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(Optional[Keys], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.keys.with_streaming_response.create( @@ -56,7 +51,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -65,23 +59,19 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: key = client.stream.keys.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[KeyDeleteResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.keys.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -89,13 +79,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(Optional[KeyDeleteResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.keys.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -105,24 +93,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.keys.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.keys.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: key = client.stream.keys.get( @@ -130,7 +114,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[KeyGetResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.keys.with_raw_response.get( @@ -142,7 +125,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(Optional[KeyGetResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.keys.with_streaming_response.get( @@ -156,7 +138,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -168,7 +149,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncKeys: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: key = await async_client.stream.keys.create( @@ -177,7 +157,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Keys], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.keys.with_raw_response.create( @@ -190,7 +169,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(Optional[Keys], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.keys.with_streaming_response.create( @@ -205,7 +183,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -214,23 +191,19 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: key = await async_client.stream.keys.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[KeyDeleteResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.keys.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -238,13 +211,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(Optional[KeyDeleteResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.keys.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -254,24 +225,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.keys.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.keys.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: key = await async_client.stream.keys.get( @@ -279,7 +246,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[KeyGetResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.keys.with_raw_response.get( @@ -291,7 +257,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(Optional[KeyGetResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.keys.with_streaming_response.get( @@ -305,7 +270,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_live_inputs.py b/tests/api_resources/stream/test_live_inputs.py index 9b3f0b4e00b..2e2f8f3e4d1 100644 --- a/tests/api_resources/stream/test_live_inputs.py +++ b/tests/api_resources/stream/test_live_inputs.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.live_input import LiveInput -from cloudflare.types.stream.live_input_list_response import LiveInputListResponse +from cloudflare.types.stream import ( + LiveInput, + LiveInputListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestLiveInputs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.create( @@ -26,7 +27,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.create( @@ -43,7 +43,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.create( @@ -55,7 +54,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: live_input = response.parse() assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.create( @@ -69,7 +67,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -77,7 +74,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.update( @@ -86,7 +82,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.update( @@ -104,7 +99,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.update( @@ -117,7 +111,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: live_input = response.parse() assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.update( @@ -132,7 +125,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -147,7 +139,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.list( @@ -155,7 +146,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LiveInputListResponse], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.list( @@ -164,7 +154,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LiveInputListResponse], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.list( @@ -176,7 +165,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: live_input = response.parse() assert_matches_type(Optional[LiveInputListResponse], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.list( @@ -190,7 +178,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -198,23 +185,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.delete( "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert live_input is None - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.delete( "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -222,13 +205,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: live_input = response.parse() assert live_input is None - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.delete( "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -238,24 +219,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.live_inputs.with_raw_response.delete( "66be4bf738797e01e1fca35a7bdecdcd", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.get( @@ -264,7 +241,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.get( @@ -277,7 +253,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: live_input = response.parse() assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.get( @@ -292,7 +267,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -311,7 +285,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLiveInputs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.create( @@ -319,7 +292,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.create( @@ -336,7 +308,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.create( @@ -348,7 +319,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: live_input = await response.parse() assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.create( @@ -362,7 +332,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -370,7 +339,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.update( @@ -379,7 +347,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.update( @@ -397,7 +364,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.update( @@ -410,7 +376,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: live_input = await response.parse() assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.update( @@ -425,7 +390,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -440,7 +404,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.list( @@ -448,7 +411,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[LiveInputListResponse], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.list( @@ -457,7 +419,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[LiveInputListResponse], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.list( @@ -469,7 +430,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: live_input = await response.parse() assert_matches_type(Optional[LiveInputListResponse], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.list( @@ -483,7 +443,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -491,23 +450,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.delete( "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert live_input is None - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.delete( "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -515,13 +470,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: live_input = await response.parse() assert live_input is None - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.delete( "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -531,24 +484,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.live_inputs.with_raw_response.delete( "66be4bf738797e01e1fca35a7bdecdcd", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.get( @@ -557,7 +506,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.get( @@ -570,7 +518,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: live_input = await response.parse() assert_matches_type(Optional[LiveInput], live_input, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.get( @@ -585,7 +532,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_token.py b/tests/api_resources/stream/test_token.py index 511470e6f7f..0d94826e27c 100644 --- a/tests/api_resources/stream/test_token.py +++ b/tests/api_resources/stream/test_token.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.token_create_response import TokenCreateResponse +from cloudflare.types.stream import TokenCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestToken: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: token = client.stream.token.create( @@ -26,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: token = client.stream.token.create( @@ -60,7 +58,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.token.with_raw_response.create( @@ -73,7 +70,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: token = response.parse() assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.token.with_streaming_response.create( @@ -88,7 +84,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -107,7 +102,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncToken: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: token = await async_client.stream.token.create( @@ -116,7 +110,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: token = await async_client.stream.token.create( @@ -150,7 +143,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.token.with_raw_response.create( @@ -163,7 +155,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: token = await response.parse() assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.token.with_streaming_response.create( @@ -178,7 +169,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_videos.py b/tests/api_resources/stream/test_videos.py index 40da5c76df6..c0ee01a60ff 100644 --- a/tests/api_resources/stream/test_videos.py +++ b/tests/api_resources/stream/test_videos.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.video_storage_usage_response import VideoStorageUsageResponse +from cloudflare.types.stream import VideoStorageUsageResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestVideos: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_storage_usage(self, client: Cloudflare) -> None: video = client.stream.videos.storage_usage( @@ -25,7 +24,6 @@ def test_method_storage_usage(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[VideoStorageUsageResponse], video, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_storage_usage_with_all_params(self, client: Cloudflare) -> None: video = client.stream.videos.storage_usage( @@ -34,7 +32,6 @@ def test_method_storage_usage_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[VideoStorageUsageResponse], video, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_storage_usage(self, client: Cloudflare) -> None: response = client.stream.videos.with_raw_response.storage_usage( @@ -46,7 +43,6 @@ def test_raw_response_storage_usage(self, client: Cloudflare) -> None: video = response.parse() assert_matches_type(Optional[VideoStorageUsageResponse], video, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_storage_usage(self, client: Cloudflare) -> None: with client.stream.videos.with_streaming_response.storage_usage( @@ -60,7 +56,6 @@ def test_streaming_response_storage_usage(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_storage_usage(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -72,7 +67,6 @@ def test_path_params_storage_usage(self, client: Cloudflare) -> None: class TestAsyncVideos: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_storage_usage(self, async_client: AsyncCloudflare) -> None: video = await async_client.stream.videos.storage_usage( @@ -80,7 +74,6 @@ async def test_method_storage_usage(self, async_client: AsyncCloudflare) -> None ) assert_matches_type(Optional[VideoStorageUsageResponse], video, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_storage_usage_with_all_params(self, async_client: AsyncCloudflare) -> None: video = await async_client.stream.videos.storage_usage( @@ -89,7 +82,6 @@ async def test_method_storage_usage_with_all_params(self, async_client: AsyncClo ) assert_matches_type(Optional[VideoStorageUsageResponse], video, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_storage_usage(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.videos.with_raw_response.storage_usage( @@ -101,7 +93,6 @@ async def test_raw_response_storage_usage(self, async_client: AsyncCloudflare) - video = await response.parse() assert_matches_type(Optional[VideoStorageUsageResponse], video, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_storage_usage(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.videos.with_streaming_response.storage_usage( @@ -115,7 +106,6 @@ async def test_streaming_response_storage_usage(self, async_client: AsyncCloudfl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_storage_usage(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_watermarks.py b/tests/api_resources/stream/test_watermarks.py index 98dda7d2eea..78838fa8e9a 100644 --- a/tests/api_resources/stream/test_watermarks.py +++ b/tests/api_resources/stream/test_watermarks.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.stream.watermark import Watermark -from cloudflare.types.stream.watermark_delete_response import WatermarkDeleteResponse +from cloudflare.types.stream import Watermark, WatermarkDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,7 @@ class TestWatermarks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.create( @@ -28,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.create( @@ -42,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.watermarks.with_raw_response.create( @@ -55,7 +54,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: watermark = response.parse() assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.watermarks.with_streaming_response.create( @@ -70,7 +69,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -79,7 +78,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: file="@/Users/rchen/Downloads/watermark.png", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.list( @@ -87,7 +85,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Watermark], watermark, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.stream.watermarks.with_raw_response.list( @@ -99,7 +96,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: watermark = response.parse() assert_matches_type(SyncSinglePage[Watermark], watermark, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.stream.watermarks.with_streaming_response.list( @@ -113,7 +109,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -121,23 +116,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[WatermarkDeleteResponse], watermark, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.watermarks.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -145,13 +136,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: watermark = response.parse() assert_matches_type(Optional[WatermarkDeleteResponse], watermark, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.watermarks.with_streaming_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,24 +150,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.watermarks.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.watermarks.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.get( @@ -187,7 +172,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.watermarks.with_raw_response.get( @@ -200,7 +184,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: watermark = response.parse() assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.watermarks.with_streaming_response.get( @@ -215,7 +198,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -234,7 +216,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWatermarks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.create( @@ -243,7 +225,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.create( @@ -257,7 +239,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.watermarks.with_raw_response.create( @@ -270,7 +252,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: watermark = await response.parse() assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.watermarks.with_streaming_response.create( @@ -285,7 +267,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -294,7 +276,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: file="@/Users/rchen/Downloads/watermark.png", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.list( @@ -302,7 +283,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Watermark], watermark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.watermarks.with_raw_response.list( @@ -314,7 +294,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: watermark = await response.parse() assert_matches_type(AsyncSinglePage[Watermark], watermark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.watermarks.with_streaming_response.list( @@ -328,7 +307,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -336,23 +314,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[WatermarkDeleteResponse], watermark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.watermarks.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -360,13 +334,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: watermark = await response.parse() assert_matches_type(Optional[WatermarkDeleteResponse], watermark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.watermarks.with_streaming_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -376,24 +348,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.watermarks.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.watermarks.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.get( @@ -402,7 +370,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.watermarks.with_raw_response.get( @@ -415,7 +382,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: watermark = await response.parse() assert_matches_type(Optional[Watermark], watermark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.watermarks.with_streaming_response.get( @@ -430,7 +396,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/stream/test_webhooks.py b/tests/api_resources/stream/test_webhooks.py index 1d12486dc4d..c6d1fb2222f 100644 --- a/tests/api_resources/stream/test_webhooks.py +++ b/tests/api_resources/stream/test_webhooks.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.webhook_get_response import WebhookGetResponse -from cloudflare.types.stream.webhook_delete_response import WebhookDeleteResponse -from cloudflare.types.stream.webhook_update_response import WebhookUpdateResponse +from cloudflare.types.stream import ( + WebhookGetResponse, + WebhookDeleteResponse, + WebhookUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestWebhooks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: webhook = client.stream.webhooks.update( @@ -28,7 +29,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[WebhookUpdateResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.webhooks.with_raw_response.update( @@ -41,7 +41,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: webhook = response.parse() assert_matches_type(Optional[WebhookUpdateResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.webhooks.with_streaming_response.update( @@ -56,7 +55,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -65,21 +63,17 @@ def test_path_params_update(self, client: Cloudflare) -> None: notification_url="https://example.com", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: webhook = client.stream.webhooks.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[WebhookDeleteResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.webhooks.with_raw_response.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -87,12 +81,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: webhook = response.parse() assert_matches_type(Optional[WebhookDeleteResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.webhooks.with_streaming_response.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -102,16 +94,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.webhooks.with_raw_response.delete( account_id="", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: webhook = client.stream.webhooks.get( @@ -119,7 +108,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[WebhookGetResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.webhooks.with_raw_response.get( @@ -131,7 +119,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: webhook = response.parse() assert_matches_type(Optional[WebhookGetResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.webhooks.with_streaming_response.get( @@ -145,7 +132,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -157,7 +143,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWebhooks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.stream.webhooks.update( @@ -166,7 +151,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[WebhookUpdateResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.webhooks.with_raw_response.update( @@ -179,7 +163,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: webhook = await response.parse() assert_matches_type(Optional[WebhookUpdateResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.webhooks.with_streaming_response.update( @@ -194,7 +177,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -203,21 +185,17 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: notification_url="https://example.com", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.stream.webhooks.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[WebhookDeleteResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.webhooks.with_raw_response.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -225,12 +203,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: webhook = await response.parse() assert_matches_type(Optional[WebhookDeleteResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.webhooks.with_streaming_response.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -240,16 +216,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.webhooks.with_raw_response.delete( account_id="", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.stream.webhooks.get( @@ -257,7 +230,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[WebhookGetResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.webhooks.with_raw_response.get( @@ -269,7 +241,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: webhook = await response.parse() assert_matches_type(Optional[WebhookGetResponse], webhook, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.webhooks.with_streaming_response.get( @@ -283,7 +254,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 51e98532e61..19d397230d3 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.accounts.account_get_response import AccountGetResponse -from cloudflare.types.accounts.account_update_response import AccountUpdateResponse +from cloudflare.types.accounts import ( + AccountGetResponse, + AccountUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestAccounts: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: account = client.accounts.update( @@ -28,7 +29,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(AccountUpdateResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: account = client.accounts.update( @@ -42,7 +42,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(AccountUpdateResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.accounts.with_raw_response.update( @@ -55,7 +54,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: account = response.parse() assert_matches_type(AccountUpdateResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.accounts.with_streaming_response.update( @@ -70,13 +68,11 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: account = client.accounts.list() assert_matches_type(SyncV4PagePaginationArray[object], account, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: account = client.accounts.list( @@ -87,7 +83,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[object], account, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.accounts.with_raw_response.list() @@ -97,7 +92,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: account = response.parse() assert_matches_type(SyncV4PagePaginationArray[object], account, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.accounts.with_streaming_response.list() as response: @@ -109,7 +103,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: account = client.accounts.get( @@ -117,7 +110,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(AccountGetResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.accounts.with_raw_response.get( @@ -129,7 +121,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: account = response.parse() assert_matches_type(AccountGetResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.accounts.with_streaming_response.get( @@ -147,7 +138,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncAccounts: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: account = await async_client.accounts.update( @@ -156,7 +146,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AccountUpdateResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: account = await async_client.accounts.update( @@ -170,7 +159,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(AccountUpdateResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.with_raw_response.update( @@ -183,7 +171,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: account = await response.parse() assert_matches_type(AccountUpdateResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.with_streaming_response.update( @@ -198,13 +185,11 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: account = await async_client.accounts.list() assert_matches_type(AsyncV4PagePaginationArray[object], account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: account = await async_client.accounts.list( @@ -215,7 +200,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[object], account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.with_raw_response.list() @@ -225,7 +209,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: account = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[object], account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.with_streaming_response.list() as response: @@ -237,7 +220,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: account = await async_client.accounts.get( @@ -245,7 +227,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AccountGetResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.with_raw_response.get( @@ -257,7 +238,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: account = await response.parse() assert_matches_type(AccountGetResponse, account, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.with_streaming_response.get( diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py new file mode 100644 index 00000000000..2ea4b31548c --- /dev/null +++ b/tests/api_resources/test_ai_gateway.py @@ -0,0 +1,643 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray +from cloudflare.types.ai_gateway import ( + AIGatewayGetResponse, + AIGatewayListResponse, + AIGatewayCreateResponse, + AIGatewayDeleteResponse, + AIGatewayUpdateResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestAIGateway: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + ai_gateway = client.ai_gateway.create( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + assert_matches_type(AIGatewayCreateResponse, ai_gateway, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + ai_gateway = client.ai_gateway.create( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + rate_limiting_interval=0, + rate_limiting_limit=0, + rate_limiting_technique="string", + ) + assert_matches_type(AIGatewayCreateResponse, ai_gateway, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.ai_gateway.with_raw_response.create( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = response.parse() + assert_matches_type(AIGatewayCreateResponse, ai_gateway, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.ai_gateway.with_streaming_response.create( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = response.parse() + assert_matches_type(AIGatewayCreateResponse, ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.with_raw_response.create( + account_id="", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + ai_gateway = client.ai_gateway.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + assert_matches_type(AIGatewayUpdateResponse, ai_gateway, path=["response"]) + + @parametrize + def test_method_update_with_all_params(self, client: Cloudflare) -> None: + ai_gateway = client.ai_gateway.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + rate_limiting_interval=0, + rate_limiting_limit=0, + rate_limiting_technique="string", + ) + assert_matches_type(AIGatewayUpdateResponse, ai_gateway, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.ai_gateway.with_raw_response.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = response.parse() + assert_matches_type(AIGatewayUpdateResponse, ai_gateway, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.ai_gateway.with_streaming_response.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = response.parse() + assert_matches_type(AIGatewayUpdateResponse, ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.with_raw_response.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.with_raw_response.update( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + @parametrize + def test_method_list(self, client: Cloudflare) -> None: + ai_gateway = client.ai_gateway.list( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + assert_matches_type(SyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Cloudflare) -> None: + ai_gateway = client.ai_gateway.list( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + order_by="string", + page=1, + per_page=5, + ) + assert_matches_type(SyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Cloudflare) -> None: + response = client.ai_gateway.with_raw_response.list( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = response.parse() + assert_matches_type(SyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Cloudflare) -> None: + with client.ai_gateway.with_streaming_response.list( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = response.parse() + assert_matches_type(SyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_list(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.with_raw_response.list( + account_id="", + ) + + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + ai_gateway = client.ai_gateway.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.ai_gateway.with_raw_response.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = response.parse() + assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.ai_gateway.with_streaming_response.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = response.parse() + assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.with_raw_response.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.with_raw_response.delete( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + ai_gateway = client.ai_gateway.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.ai_gateway.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = response.parse() + assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.ai_gateway.with_streaming_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = response.parse() + assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + +class TestAsyncAIGateway: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + ai_gateway = await async_client.ai_gateway.create( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + assert_matches_type(AIGatewayCreateResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + ai_gateway = await async_client.ai_gateway.create( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + rate_limiting_interval=0, + rate_limiting_limit=0, + rate_limiting_technique="string", + ) + assert_matches_type(AIGatewayCreateResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.with_raw_response.create( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = await response.parse() + assert_matches_type(AIGatewayCreateResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.with_streaming_response.create( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = await response.parse() + assert_matches_type(AIGatewayCreateResponse, ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.with_raw_response.create( + account_id="", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + ai_gateway = await async_client.ai_gateway.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + assert_matches_type(AIGatewayUpdateResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: + ai_gateway = await async_client.ai_gateway.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + rate_limiting_interval=0, + rate_limiting_limit=0, + rate_limiting_technique="string", + ) + assert_matches_type(AIGatewayUpdateResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.with_raw_response.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = await response.parse() + assert_matches_type(AIGatewayUpdateResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.with_streaming_response.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = await response.parse() + assert_matches_type(AIGatewayUpdateResponse, ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.with_raw_response.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.with_raw_response.update( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + cache_invalidate_on_update=True, + cache_ttl=0, + collect_logs=True, + name="string", + slug="string", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncCloudflare) -> None: + ai_gateway = await async_client.ai_gateway.list( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + assert_matches_type(AsyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: + ai_gateway = await async_client.ai_gateway.list( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + order_by="string", + page=1, + per_page=5, + ) + assert_matches_type(AsyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.with_raw_response.list( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = await response.parse() + assert_matches_type(AsyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.with_streaming_response.list( + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = await response.parse() + assert_matches_type(AsyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.with_raw_response.list( + account_id="", + ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + ai_gateway = await async_client.ai_gateway.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.with_raw_response.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = await response.parse() + assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.with_streaming_response.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = await response.parse() + assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.with_raw_response.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.with_raw_response.delete( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + ai_gateway = await async_client.ai_gateway.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ai_gateway = await response.parse() + assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.with_streaming_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ai_gateway = await response.parse() + assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) diff --git a/tests/api_resources/test_audit_logs.py b/tests/api_resources/test_audit_logs.py index 23d4ac0f501..3fec9ccbe53 100644 --- a/tests/api_resources/test_audit_logs.py +++ b/tests/api_resources/test_audit_logs.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.shared.audit_log import AuditLog +from cloudflare.types.shared import AuditLog base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +19,6 @@ class TestAuditLogs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: audit_log = client.audit_logs.list( @@ -27,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: audit_log = client.audit_logs.list( @@ -49,7 +47,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.audit_logs.with_raw_response.list( @@ -61,7 +58,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: audit_log = response.parse() assert_matches_type(SyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.audit_logs.with_streaming_response.list( @@ -75,7 +71,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -87,7 +82,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAuditLogs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: audit_log = await async_client.audit_logs.list( @@ -95,7 +89,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: audit_log = await async_client.audit_logs.list( @@ -117,7 +110,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.audit_logs.with_raw_response.list( @@ -129,7 +121,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: audit_log = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.audit_logs.with_streaming_response.list( @@ -143,7 +134,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_bot_management.py b/tests/api_resources/test_bot_management.py index c5973199ca4..5b9d258bd81 100644 --- a/tests/api_resources/test_bot_management.py +++ b/tests/api_resources/test_bot_management.py @@ -3,14 +3,16 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.bot_management.bot_management_get_response import BotManagementGetResponse -from cloudflare.types.bot_management.bot_management_update_response import BotManagementUpdateResponse +from cloudflare.types.bot_management import ( + BotManagementGetResponse, + BotManagementUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,15 +20,13 @@ class TestBotManagement: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: bot_management = client.bot_management.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: bot_management = client.bot_management.update( @@ -34,9 +34,8 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N enable_js=True, fight_mode=True, ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.bot_management.with_raw_response.update( @@ -46,9 +45,8 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.bot_management.with_streaming_response.update( @@ -58,11 +56,10 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -70,15 +67,13 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: bot_management = client.bot_management.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: bot_management = client.bot_management.update( @@ -89,9 +84,8 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N sbfm_static_resource_protection=True, sbfm_verified_bots="allow", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.bot_management.with_raw_response.update( @@ -101,9 +95,8 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.bot_management.with_streaming_response.update( @@ -113,11 +106,10 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -125,15 +117,13 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: bot_management = client.bot_management.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: bot_management = client.bot_management.update( @@ -145,9 +135,8 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N sbfm_static_resource_protection=True, sbfm_verified_bots="allow", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.bot_management.with_raw_response.update( @@ -157,9 +146,8 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.bot_management.with_streaming_response.update( @@ -169,11 +157,10 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -181,15 +168,13 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: bot_management = client.bot_management.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: bot_management = client.bot_management.update( @@ -198,9 +183,8 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N enable_js=True, suppress_session_score=False, ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.bot_management.with_raw_response.update( @@ -210,9 +194,8 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.bot_management.with_streaming_response.update( @@ -222,11 +205,10 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -234,15 +216,13 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bot_management = client.bot_management.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementGetResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementGetResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.bot_management.with_raw_response.get( @@ -252,9 +232,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementGetResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementGetResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.bot_management.with_streaming_response.get( @@ -264,11 +243,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = response.parse() - assert_matches_type(BotManagementGetResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementGetResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -280,15 +258,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBotManagement: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: bot_management = await async_client.bot_management.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: bot_management = await async_client.bot_management.update( @@ -296,9 +272,8 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn enable_js=True, fight_mode=True, ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.bot_management.with_raw_response.update( @@ -308,9 +283,8 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.bot_management.with_streaming_response.update( @@ -320,11 +294,10 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -332,15 +305,13 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: bot_management = await async_client.bot_management.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: bot_management = await async_client.bot_management.update( @@ -351,9 +322,8 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn sbfm_static_resource_protection=True, sbfm_verified_bots="allow", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.bot_management.with_raw_response.update( @@ -363,9 +333,8 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.bot_management.with_streaming_response.update( @@ -375,11 +344,10 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -387,15 +355,13 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: bot_management = await async_client.bot_management.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: bot_management = await async_client.bot_management.update( @@ -407,9 +373,8 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn sbfm_static_resource_protection=True, sbfm_verified_bots="allow", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.bot_management.with_raw_response.update( @@ -419,9 +384,8 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.bot_management.with_streaming_response.update( @@ -431,11 +395,10 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -443,15 +406,13 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: bot_management = await async_client.bot_management.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: bot_management = await async_client.bot_management.update( @@ -460,9 +421,8 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn enable_js=True, suppress_session_score=False, ) - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.bot_management.with_raw_response.update( @@ -472,9 +432,8 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.bot_management.with_streaming_response.update( @@ -484,11 +443,10 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementUpdateResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementUpdateResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -496,15 +454,13 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bot_management = await async_client.bot_management.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BotManagementGetResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementGetResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.bot_management.with_raw_response.get( @@ -514,9 +470,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementGetResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementGetResponse], bot_management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.bot_management.with_streaming_response.get( @@ -526,11 +481,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" bot_management = await response.parse() - assert_matches_type(BotManagementGetResponse, bot_management, path=["response"]) + assert_matches_type(Optional[BotManagementGetResponse], bot_management, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_brand_protection.py b/tests/api_resources/test_brand_protection.py index c2650214b0c..31b53da9ac7 100644 --- a/tests/api_resources/test_brand_protection.py +++ b/tests/api_resources/test_brand_protection.py @@ -3,14 +3,16 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.brand_protection.info import Info -from cloudflare.types.brand_protection.submit import Submit +from cloudflare.types.brand_protection import ( + Info, + Submit, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,24 +20,21 @@ class TestBrandProtection: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_submit(self, client: Cloudflare) -> None: brand_protection = client.brand_protection.submit( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Submit, brand_protection, path=["response"]) + assert_matches_type(Optional[Submit], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_submit_with_all_params(self, client: Cloudflare) -> None: brand_protection = client.brand_protection.submit( account_id="023e105f4ecef8ad9ca31a8372d0c353", url="https://www.cloudflare.com", ) - assert_matches_type(Submit, brand_protection, path=["response"]) + assert_matches_type(Optional[Submit], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_submit(self, client: Cloudflare) -> None: response = client.brand_protection.with_raw_response.submit( @@ -45,9 +44,8 @@ def test_raw_response_submit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(Submit, brand_protection, path=["response"]) + assert_matches_type(Optional[Submit], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_submit(self, client: Cloudflare) -> None: with client.brand_protection.with_streaming_response.submit( @@ -57,11 +55,10 @@ def test_streaming_response_submit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(Submit, brand_protection, path=["response"]) + assert_matches_type(Optional[Submit], brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_submit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -69,15 +66,13 @@ def test_path_params_submit(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_url_info(self, client: Cloudflare) -> None: brand_protection = client.brand_protection.url_info( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Info, brand_protection, path=["response"]) + assert_matches_type(Optional[Info], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_url_info_with_all_params(self, client: Cloudflare) -> None: brand_protection = client.brand_protection.url_info( @@ -85,9 +80,8 @@ def test_method_url_info_with_all_params(self, client: Cloudflare) -> None: url="string", url_id_param={"url_id": 0}, ) - assert_matches_type(Info, brand_protection, path=["response"]) + assert_matches_type(Optional[Info], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_url_info(self, client: Cloudflare) -> None: response = client.brand_protection.with_raw_response.url_info( @@ -97,9 +91,8 @@ def test_raw_response_url_info(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(Info, brand_protection, path=["response"]) + assert_matches_type(Optional[Info], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_url_info(self, client: Cloudflare) -> None: with client.brand_protection.with_streaming_response.url_info( @@ -109,11 +102,10 @@ def test_streaming_response_url_info(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(Info, brand_protection, path=["response"]) + assert_matches_type(Optional[Info], brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_url_info(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -125,24 +117,21 @@ def test_path_params_url_info(self, client: Cloudflare) -> None: class TestAsyncBrandProtection: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_submit(self, async_client: AsyncCloudflare) -> None: brand_protection = await async_client.brand_protection.submit( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Submit, brand_protection, path=["response"]) + assert_matches_type(Optional[Submit], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_submit_with_all_params(self, async_client: AsyncCloudflare) -> None: brand_protection = await async_client.brand_protection.submit( account_id="023e105f4ecef8ad9ca31a8372d0c353", url="https://www.cloudflare.com", ) - assert_matches_type(Submit, brand_protection, path=["response"]) + assert_matches_type(Optional[Submit], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_submit(self, async_client: AsyncCloudflare) -> None: response = await async_client.brand_protection.with_raw_response.submit( @@ -152,9 +141,8 @@ async def test_raw_response_submit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(Submit, brand_protection, path=["response"]) + assert_matches_type(Optional[Submit], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_submit(self, async_client: AsyncCloudflare) -> None: async with async_client.brand_protection.with_streaming_response.submit( @@ -164,11 +152,10 @@ async def test_streaming_response_submit(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(Submit, brand_protection, path=["response"]) + assert_matches_type(Optional[Submit], brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_submit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -176,15 +163,13 @@ async def test_path_params_submit(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_url_info(self, async_client: AsyncCloudflare) -> None: brand_protection = await async_client.brand_protection.url_info( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Info, brand_protection, path=["response"]) + assert_matches_type(Optional[Info], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_url_info_with_all_params(self, async_client: AsyncCloudflare) -> None: brand_protection = await async_client.brand_protection.url_info( @@ -192,9 +177,8 @@ async def test_method_url_info_with_all_params(self, async_client: AsyncCloudfla url="string", url_id_param={"url_id": 0}, ) - assert_matches_type(Info, brand_protection, path=["response"]) + assert_matches_type(Optional[Info], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_url_info(self, async_client: AsyncCloudflare) -> None: response = await async_client.brand_protection.with_raw_response.url_info( @@ -204,9 +188,8 @@ async def test_raw_response_url_info(self, async_client: AsyncCloudflare) -> Non assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(Info, brand_protection, path=["response"]) + assert_matches_type(Optional[Info], brand_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_url_info(self, async_client: AsyncCloudflare) -> None: async with async_client.brand_protection.with_streaming_response.url_info( @@ -216,11 +199,10 @@ async def test_streaming_response_url_info(self, async_client: AsyncCloudflare) assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(Info, brand_protection, path=["response"]) + assert_matches_type(Optional[Info], brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_url_info(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_cache.py b/tests/api_resources/test_cache.py index 46117860cef..2c5dd92732e 100644 --- a/tests/api_resources/test_cache.py +++ b/tests/api_resources/test_cache.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.cache.cache_purge_response import CachePurgeResponse +from cloudflare.types.cache import CachePurgeResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestCache: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_purge_overload_1(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -25,7 +24,6 @@ def test_method_purge_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -34,7 +32,6 @@ def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> No ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( @@ -46,7 +43,6 @@ def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None: cache = response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_purge_overload_1(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( @@ -60,7 +56,6 @@ def test_streaming_response_purge_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_purge_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -68,7 +63,6 @@ def test_path_params_purge_overload_1(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_purge_overload_2(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -76,7 +70,6 @@ def test_method_purge_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -85,7 +78,6 @@ def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> No ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( @@ -97,7 +89,6 @@ def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None: cache = response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_purge_overload_2(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( @@ -111,7 +102,6 @@ def test_streaming_response_purge_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_purge_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -119,7 +109,6 @@ def test_path_params_purge_overload_2(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_purge_overload_3(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -127,7 +116,6 @@ def test_method_purge_overload_3(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -136,7 +124,6 @@ def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> No ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( @@ -148,7 +135,6 @@ def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None: cache = response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_purge_overload_3(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( @@ -162,7 +148,6 @@ def test_streaming_response_purge_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_purge_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -170,7 +155,6 @@ def test_path_params_purge_overload_3(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_purge_overload_4(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -178,7 +162,6 @@ def test_method_purge_overload_4(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -187,7 +170,6 @@ def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> No ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( @@ -199,7 +181,6 @@ def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None: cache = response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_purge_overload_4(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( @@ -213,7 +194,6 @@ def test_streaming_response_purge_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_purge_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -221,7 +201,6 @@ def test_path_params_purge_overload_4(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_purge_overload_5(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -229,7 +208,6 @@ def test_method_purge_overload_5(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> None: cache = client.cache.purge( @@ -242,7 +220,6 @@ def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> No ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( @@ -254,7 +231,6 @@ def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None: cache = response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_purge_overload_5(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( @@ -268,7 +244,6 @@ def test_streaming_response_purge_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_purge_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -280,7 +255,6 @@ def test_path_params_purge_overload_5(self, client: Cloudflare) -> None: class TestAsyncCache: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_purge_overload_1(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -288,7 +262,6 @@ async def test_method_purge_overload_1(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_purge_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -297,7 +270,6 @@ async def test_method_purge_with_all_params_overload_1(self, async_client: Async ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( @@ -309,7 +281,6 @@ async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare cache = await response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( @@ -323,7 +294,6 @@ async def test_streaming_response_purge_overload_1(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_purge_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -331,7 +301,6 @@ async def test_path_params_purge_overload_1(self, async_client: AsyncCloudflare) zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_purge_overload_2(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -339,7 +308,6 @@ async def test_method_purge_overload_2(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_purge_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -348,7 +316,6 @@ async def test_method_purge_with_all_params_overload_2(self, async_client: Async ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( @@ -360,7 +327,6 @@ async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare cache = await response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( @@ -374,7 +340,6 @@ async def test_streaming_response_purge_overload_2(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_purge_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -382,7 +347,6 @@ async def test_path_params_purge_overload_2(self, async_client: AsyncCloudflare) zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_purge_overload_3(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -390,7 +354,6 @@ async def test_method_purge_overload_3(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_purge_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -399,7 +362,6 @@ async def test_method_purge_with_all_params_overload_3(self, async_client: Async ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( @@ -411,7 +373,6 @@ async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare cache = await response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( @@ -425,7 +386,6 @@ async def test_streaming_response_purge_overload_3(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_purge_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -433,7 +393,6 @@ async def test_path_params_purge_overload_3(self, async_client: AsyncCloudflare) zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_purge_overload_4(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -441,7 +400,6 @@ async def test_method_purge_overload_4(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_purge_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -450,7 +408,6 @@ async def test_method_purge_with_all_params_overload_4(self, async_client: Async ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( @@ -462,7 +419,6 @@ async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare cache = await response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( @@ -476,7 +432,6 @@ async def test_streaming_response_purge_overload_4(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_purge_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -484,7 +439,6 @@ async def test_path_params_purge_overload_4(self, async_client: AsyncCloudflare) zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_purge_overload_5(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -492,7 +446,6 @@ async def test_method_purge_overload_5(self, async_client: AsyncCloudflare) -> N ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_purge_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( @@ -505,7 +458,6 @@ async def test_method_purge_with_all_params_overload_5(self, async_client: Async ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( @@ -517,7 +469,6 @@ async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare cache = await response.parse() assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( @@ -531,7 +482,6 @@ async def test_streaming_response_purge_overload_5(self, async_client: AsyncClou assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_purge_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_calls.py b/tests/api_resources/test_calls.py index 74cdb30b81f..09dab34806b 100644 --- a/tests/api_resources/test_calls.py +++ b/tests/api_resources/test_calls.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.calls.calls_app import CallsApp -from cloudflare.types.calls.calls_app_with_secret import CallsAppWithSecret +from cloudflare.types.calls import CallsApp, CallsAppWithSecret base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestCalls: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: call = client.calls.create( @@ -27,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CallsAppWithSecret], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: call = client.calls.create( @@ -36,7 +33,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CallsAppWithSecret], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.create( @@ -48,7 +44,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: call = response.parse() assert_matches_type(Optional[CallsAppWithSecret], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.create( @@ -62,7 +57,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -70,7 +64,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: call = client.calls.update( @@ -79,7 +72,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: call = client.calls.update( @@ -89,7 +81,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.update( @@ -102,7 +93,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: call = response.parse() assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.update( @@ -117,7 +107,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -132,7 +121,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: call = client.calls.list( @@ -140,7 +128,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.list( @@ -152,7 +139,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: call = response.parse() assert_matches_type(SyncSinglePage[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.list( @@ -166,7 +152,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -174,7 +159,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: call = client.calls.delete( @@ -183,7 +167,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.delete( @@ -196,7 +179,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: call = response.parse() assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.delete( @@ -211,7 +193,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -226,7 +207,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: call = client.calls.get( @@ -235,7 +215,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.get( @@ -248,7 +227,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: call = response.parse() assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.get( @@ -263,7 +241,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -282,7 +259,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCalls: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.create( @@ -290,7 +266,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CallsAppWithSecret], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.create( @@ -299,7 +274,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[CallsAppWithSecret], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.create( @@ -311,7 +285,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: call = await response.parse() assert_matches_type(Optional[CallsAppWithSecret], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.create( @@ -325,7 +298,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -333,7 +305,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.update( @@ -342,7 +313,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.update( @@ -352,7 +322,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.update( @@ -365,7 +334,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: call = await response.parse() assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.update( @@ -380,7 +348,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -395,7 +362,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.list( @@ -403,7 +369,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.list( @@ -415,7 +380,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: call = await response.parse() assert_matches_type(AsyncSinglePage[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.list( @@ -429,7 +393,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -437,7 +400,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.delete( @@ -446,7 +408,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.delete( @@ -459,7 +420,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: call = await response.parse() assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.delete( @@ -474,7 +434,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -489,7 +448,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.get( @@ -498,7 +456,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.get( @@ -511,7 +468,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: call = await response.parse() assert_matches_type(Optional[CallsApp], call, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.get( @@ -526,7 +482,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_client_certificates.py b/tests/api_resources/test_client_certificates.py index b94b604167d..8f8328f80e7 100644 --- a/tests/api_resources/test_client_certificates.py +++ b/tests/api_resources/test_client_certificates.py @@ -3,14 +3,16 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.client_certificates.client_certificate import ClientCertificate +from cloudflare.types.client_certificates import ( + ClientCertificate, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestClientCertificates: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.create( @@ -26,9 +27,8 @@ def test_method_create(self, client: Cloudflare) -> None: csr="-----BEGIN CERTIFICATE REQUEST-----\nMIICY....\n-----END CERTIFICATE REQUEST-----\n", validity_days=3650, ) - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.create( @@ -40,9 +40,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.create( @@ -54,11 +53,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -68,7 +66,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: validity_days=3650, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.list( @@ -76,7 +73,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.list( @@ -89,7 +85,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.list( @@ -101,7 +96,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: client_certificate = response.parse() assert_matches_type(SyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.list( @@ -115,7 +109,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -123,16 +116,14 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.delete( @@ -143,9 +134,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.delete( @@ -156,11 +146,10 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -175,16 +164,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.edit( @@ -195,9 +182,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.edit( @@ -208,11 +194,10 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -227,16 +212,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.get( @@ -247,9 +230,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.get( @@ -260,11 +242,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -283,7 +264,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncClientCertificates: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.create( @@ -291,9 +271,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: csr="-----BEGIN CERTIFICATE REQUEST-----\nMIICY....\n-----END CERTIFICATE REQUEST-----\n", validity_days=3650, ) - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.create( @@ -305,9 +284,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.create( @@ -319,11 +297,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -333,7 +310,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: validity_days=3650, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.list( @@ -341,7 +317,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.list( @@ -354,7 +329,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.list( @@ -366,7 +340,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: client_certificate = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.list( @@ -380,7 +353,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -388,16 +360,14 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.delete( @@ -408,9 +378,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.delete( @@ -421,11 +390,10 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -440,16 +408,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.edit( @@ -460,9 +426,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.edit( @@ -473,11 +438,10 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -492,16 +456,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.get( @@ -512,9 +474,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.get( @@ -525,11 +486,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificate, client_certificate, path=["response"]) + assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_custom_certificates.py b/tests/api_resources/test_custom_certificates.py index a8344aafafc..3612c9a1544 100644 --- a/tests/api_resources/test_custom_certificates.py +++ b/tests/api_resources/test_custom_certificates.py @@ -3,18 +3,20 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.custom_certificates.custom_certificate import CustomCertificate -from cloudflare.types.custom_certificates.custom_certificate_get_response import CustomCertificateGetResponse -from cloudflare.types.custom_certificates.custom_certificate_edit_response import CustomCertificateEditResponse -from cloudflare.types.custom_certificates.custom_certificate_create_response import CustomCertificateCreateResponse -from cloudflare.types.custom_certificates.custom_certificate_delete_response import CustomCertificateDeleteResponse +from cloudflare.types.custom_certificates import ( + CustomCertificate, + CustomCertificateGetResponse, + CustomCertificateEditResponse, + CustomCertificateCreateResponse, + CustomCertificateDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,6 @@ class TestCustomCertificates: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.create( @@ -30,9 +31,8 @@ def test_method_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(CustomCertificateCreateResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateCreateResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.create( @@ -44,9 +44,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: policy="(country: US) or (region: EU)", type="sni_custom", ) - assert_matches_type(CustomCertificateCreateResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateCreateResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.create( @@ -58,9 +57,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() - assert_matches_type(CustomCertificateCreateResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateCreateResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.create( @@ -72,11 +70,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() - assert_matches_type(CustomCertificateCreateResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateCreateResponse], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -86,7 +83,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.list( @@ -94,7 +90,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.list( @@ -106,7 +101,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.list( @@ -118,7 +112,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: custom_certificate = response.parse() assert_matches_type(SyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.list( @@ -132,7 +125,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -140,73 +132,62 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(CustomCertificateDeleteResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() - assert_matches_type(CustomCertificateDeleteResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() - assert_matches_type(CustomCertificateDeleteResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): client.custom_certificates.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomCertificateEditResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.edit( @@ -218,9 +199,8 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: policy="(country: US) or (region: EU)", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(CustomCertificateEditResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.edit( @@ -231,9 +211,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() - assert_matches_type(CustomCertificateEditResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.edit( @@ -244,11 +223,10 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() - assert_matches_type(CustomCertificateEditResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -263,16 +241,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomCertificateGetResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.get( @@ -283,9 +259,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() - assert_matches_type(CustomCertificateGetResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.get( @@ -296,11 +271,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() - assert_matches_type(CustomCertificateGetResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -319,7 +293,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomCertificates: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.create( @@ -327,9 +300,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(CustomCertificateCreateResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateCreateResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.create( @@ -341,9 +313,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare policy="(country: US) or (region: EU)", type="sni_custom", ) - assert_matches_type(CustomCertificateCreateResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateCreateResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.create( @@ -355,9 +326,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() - assert_matches_type(CustomCertificateCreateResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateCreateResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.create( @@ -369,11 +339,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() - assert_matches_type(CustomCertificateCreateResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateCreateResponse], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -383,7 +352,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.list( @@ -391,7 +359,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.list( @@ -403,7 +370,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.list( @@ -415,7 +381,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: custom_certificate = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.list( @@ -429,7 +394,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -437,73 +401,62 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(CustomCertificateDeleteResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() - assert_matches_type(CustomCertificateDeleteResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() - assert_matches_type(CustomCertificateDeleteResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): await async_client.custom_certificates.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomCertificateEditResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.edit( @@ -515,9 +468,8 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) policy="(country: US) or (region: EU)", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(CustomCertificateEditResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.edit( @@ -528,9 +480,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() - assert_matches_type(CustomCertificateEditResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.edit( @@ -541,11 +492,10 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() - assert_matches_type(CustomCertificateEditResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -560,16 +510,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomCertificateGetResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.get( @@ -580,9 +528,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() - assert_matches_type(CustomCertificateGetResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.get( @@ -593,11 +540,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() - assert_matches_type(CustomCertificateGetResponse, custom_certificate, path=["response"]) + assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_custom_hostnames.py b/tests/api_resources/test_custom_hostnames.py index 57e45edfece..1ca4d8d7318 100644 --- a/tests/api_resources/test_custom_hostnames.py +++ b/tests/api_resources/test_custom_hostnames.py @@ -3,18 +3,20 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.custom_hostnames.custom_hostname_get_response import CustomHostnameGetResponse -from cloudflare.types.custom_hostnames.custom_hostname_edit_response import CustomHostnameEditResponse -from cloudflare.types.custom_hostnames.custom_hostname_list_response import CustomHostnameListResponse -from cloudflare.types.custom_hostnames.custom_hostname_create_response import CustomHostnameCreateResponse -from cloudflare.types.custom_hostnames.custom_hostname_delete_response import CustomHostnameDeleteResponse +from cloudflare.types.custom_hostnames import ( + CustomHostnameGetResponse, + CustomHostnameEditResponse, + CustomHostnameListResponse, + CustomHostnameCreateResponse, + CustomHostnameDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,6 @@ class TestCustomHostnames: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.create( @@ -30,9 +31,8 @@ def test_method_create(self, client: Cloudflare) -> None: hostname="app.example.com", ssl={}, ) - assert_matches_type(CustomHostnameCreateResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.create( @@ -56,9 +56,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, custom_metadata={"key": "value"}, ) - assert_matches_type(CustomHostnameCreateResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.create( @@ -70,9 +69,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = response.parse() - assert_matches_type(CustomHostnameCreateResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.create( @@ -84,11 +82,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = response.parse() - assert_matches_type(CustomHostnameCreateResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -98,7 +95,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ssl={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.list( @@ -106,7 +102,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[CustomHostnameListResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.list( @@ -121,7 +116,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[CustomHostnameListResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.list( @@ -133,7 +127,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: custom_hostname = response.parse() assert_matches_type(SyncV4PagePaginationArray[CustomHostnameListResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.list( @@ -149,7 +142,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -157,23 +149,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(CustomHostnameDeleteResponse, custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -181,13 +169,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: custom_hostname = response.parse() assert_matches_type(CustomHostnameDeleteResponse, custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -197,33 +183,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_hostnames.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): client.custom_hostnames.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomHostnameEditResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.edit( @@ -249,9 +230,8 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "wildcard": False, }, ) - assert_matches_type(CustomHostnameEditResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.edit( @@ -262,9 +242,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = response.parse() - assert_matches_type(CustomHostnameEditResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.edit( @@ -275,11 +254,10 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = response.parse() - assert_matches_type(CustomHostnameEditResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -294,16 +272,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomHostnameGetResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.get( @@ -314,9 +290,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = response.parse() - assert_matches_type(CustomHostnameGetResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.get( @@ -327,11 +302,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = response.parse() - assert_matches_type(CustomHostnameGetResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -350,7 +324,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomHostnames: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.create( @@ -358,9 +331,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: hostname="app.example.com", ssl={}, ) - assert_matches_type(CustomHostnameCreateResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.create( @@ -384,9 +356,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, custom_metadata={"key": "value"}, ) - assert_matches_type(CustomHostnameCreateResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.create( @@ -398,9 +369,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = await response.parse() - assert_matches_type(CustomHostnameCreateResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.create( @@ -412,11 +382,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = await response.parse() - assert_matches_type(CustomHostnameCreateResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -426,7 +395,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ssl={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.list( @@ -434,7 +402,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[CustomHostnameListResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.list( @@ -449,7 +416,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[CustomHostnameListResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.list( @@ -461,7 +427,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: custom_hostname = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[CustomHostnameListResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.list( @@ -477,7 +442,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -485,23 +449,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(CustomHostnameDeleteResponse, custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -509,13 +469,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: custom_hostname = await response.parse() assert_matches_type(CustomHostnameDeleteResponse, custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -525,33 +483,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_hostnames.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): await async_client.custom_hostnames.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomHostnameEditResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.edit( @@ -577,9 +530,8 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "wildcard": False, }, ) - assert_matches_type(CustomHostnameEditResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.edit( @@ -590,9 +542,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = await response.parse() - assert_matches_type(CustomHostnameEditResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.edit( @@ -603,11 +554,10 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = await response.parse() - assert_matches_type(CustomHostnameEditResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -622,16 +572,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomHostnameGetResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.get( @@ -642,9 +590,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = await response.parse() - assert_matches_type(CustomHostnameGetResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.get( @@ -655,11 +602,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_hostname = await response.parse() - assert_matches_type(CustomHostnameGetResponse, custom_hostname, path=["response"]) + assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_custom_nameservers.py b/tests/api_resources/test_custom_nameservers.py index 02602c51933..a0ed2167a7d 100644 --- a/tests/api_resources/test_custom_nameservers.py +++ b/tests/api_resources/test_custom_nameservers.py @@ -9,11 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.custom_nameservers.custom_nameserver import CustomNameserver -from cloudflare.types.custom_nameservers.custom_nameserver_get_response import CustomNameserverGetResponse -from cloudflare.types.custom_nameservers.custom_nameserver_delete_response import CustomNameserverDeleteResponse -from cloudflare.types.custom_nameservers.custom_nameserver_verify_response import CustomNameserverVerifyResponse -from cloudflare.types.custom_nameservers.custom_nameserver_availabilty_response import ( +from cloudflare.types.custom_nameservers import ( + CustomNameserver, + CustomNameserverGetResponse, + CustomNameserverDeleteResponse, CustomNameserverAvailabiltyResponse, ) @@ -23,16 +22,14 @@ class TestCustomNameservers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: custom_nameserver = client.custom_nameservers.create( account_id="372e67954025e0ba6aaa6d586b9e0b59", ns_name="ns1.example.com", ) - assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) + assert_matches_type(Optional[CustomNameserver], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: custom_nameserver = client.custom_nameservers.create( @@ -40,9 +37,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ns_name="ns1.example.com", ns_set=1, ) - assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) + assert_matches_type(Optional[CustomNameserver], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.custom_nameservers.with_raw_response.create( @@ -53,9 +49,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = response.parse() - assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) + assert_matches_type(Optional[CustomNameserver], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.custom_nameservers.with_streaming_response.create( @@ -66,11 +61,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = response.parse() - assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) + assert_matches_type(Optional[CustomNameserver], custom_nameserver, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -79,23 +73,19 @@ def test_path_params_create(self, client: Cloudflare) -> None: ns_name="ns1.example.com", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_nameserver = client.custom_nameservers.delete( "ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, ) assert_matches_type(Optional[CustomNameserverDeleteResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_nameservers.with_raw_response.delete( "ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, ) assert response.is_closed is True @@ -103,13 +93,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: custom_nameserver = response.parse() assert_matches_type(Optional[CustomNameserverDeleteResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_nameservers.with_streaming_response.delete( "ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -119,24 +107,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.custom_nameservers.with_raw_response.delete( "ns1.example.com", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_ns_id` but received ''"): client.custom_nameservers.with_raw_response.delete( "", account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_availabilty(self, client: Cloudflare) -> None: custom_nameserver = client.custom_nameservers.availabilty( @@ -144,7 +128,6 @@ def test_method_availabilty(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomNameserverAvailabiltyResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_availabilty(self, client: Cloudflare) -> None: response = client.custom_nameservers.with_raw_response.availabilty( @@ -156,7 +139,6 @@ def test_raw_response_availabilty(self, client: Cloudflare) -> None: custom_nameserver = response.parse() assert_matches_type(Optional[CustomNameserverAvailabiltyResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_availabilty(self, client: Cloudflare) -> None: with client.custom_nameservers.with_streaming_response.availabilty( @@ -170,7 +152,6 @@ def test_streaming_response_availabilty(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_availabilty(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -178,7 +159,6 @@ def test_path_params_availabilty(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_nameserver = client.custom_nameservers.get( @@ -186,7 +166,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.custom_nameservers.with_raw_response.get( @@ -198,7 +177,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: custom_nameserver = response.parse() assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.custom_nameservers.with_streaming_response.get( @@ -212,7 +190,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -220,66 +197,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() - @parametrize - def test_method_verify(self, client: Cloudflare) -> None: - custom_nameserver = client.custom_nameservers.verify( - account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, - ) - assert_matches_type(Optional[CustomNameserverVerifyResponse], custom_nameserver, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_verify(self, client: Cloudflare) -> None: - response = client.custom_nameservers.with_raw_response.verify( - account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - custom_nameserver = response.parse() - assert_matches_type(Optional[CustomNameserverVerifyResponse], custom_nameserver, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_verify(self, client: Cloudflare) -> None: - with client.custom_nameservers.with_streaming_response.verify( - account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - custom_nameserver = response.parse() - assert_matches_type(Optional[CustomNameserverVerifyResponse], custom_nameserver, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_verify(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.custom_nameservers.with_raw_response.verify( - account_id="", - body={}, - ) - class TestAsyncCustomNameservers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.custom_nameservers.create( account_id="372e67954025e0ba6aaa6d586b9e0b59", ns_name="ns1.example.com", ) - assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) + assert_matches_type(Optional[CustomNameserver], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.custom_nameservers.create( @@ -287,9 +216,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ns_name="ns1.example.com", ns_set=1, ) - assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) + assert_matches_type(Optional[CustomNameserver], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_nameservers.with_raw_response.create( @@ -300,9 +228,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = await response.parse() - assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) + assert_matches_type(Optional[CustomNameserver], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_nameservers.with_streaming_response.create( @@ -313,11 +240,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = await response.parse() - assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) + assert_matches_type(Optional[CustomNameserver], custom_nameserver, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -326,23 +252,19 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ns_name="ns1.example.com", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.custom_nameservers.delete( "ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, ) assert_matches_type(Optional[CustomNameserverDeleteResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_nameservers.with_raw_response.delete( "ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, ) assert response.is_closed is True @@ -350,13 +272,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await response.parse() assert_matches_type(Optional[CustomNameserverDeleteResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_nameservers.with_streaming_response.delete( "ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -366,24 +286,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.custom_nameservers.with_raw_response.delete( "ns1.example.com", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_ns_id` but received ''"): await async_client.custom_nameservers.with_raw_response.delete( "", account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_availabilty(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.custom_nameservers.availabilty( @@ -391,7 +307,6 @@ async def test_method_availabilty(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomNameserverAvailabiltyResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_availabilty(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_nameservers.with_raw_response.availabilty( @@ -403,7 +318,6 @@ async def test_raw_response_availabilty(self, async_client: AsyncCloudflare) -> custom_nameserver = await response.parse() assert_matches_type(Optional[CustomNameserverAvailabiltyResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_availabilty(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_nameservers.with_streaming_response.availabilty( @@ -417,7 +331,6 @@ async def test_streaming_response_availabilty(self, async_client: AsyncCloudflar assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_availabilty(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -425,7 +338,6 @@ async def test_path_params_availabilty(self, async_client: AsyncCloudflare) -> N account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.custom_nameservers.get( @@ -433,7 +345,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_nameservers.with_raw_response.get( @@ -445,7 +356,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await response.parse() assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_nameservers.with_streaming_response.get( @@ -459,56 +369,9 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.custom_nameservers.with_raw_response.get( account_id="", ) - - @pytest.mark.skip() - @parametrize - async def test_method_verify(self, async_client: AsyncCloudflare) -> None: - custom_nameserver = await async_client.custom_nameservers.verify( - account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, - ) - assert_matches_type(Optional[CustomNameserverVerifyResponse], custom_nameserver, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_verify(self, async_client: AsyncCloudflare) -> None: - response = await async_client.custom_nameservers.with_raw_response.verify( - account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - custom_nameserver = await response.parse() - assert_matches_type(Optional[CustomNameserverVerifyResponse], custom_nameserver, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_verify(self, async_client: AsyncCloudflare) -> None: - async with async_client.custom_nameservers.with_streaming_response.verify( - account_id="372e67954025e0ba6aaa6d586b9e0b59", - body={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - custom_nameserver = await response.parse() - assert_matches_type(Optional[CustomNameserverVerifyResponse], custom_nameserver, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_verify(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.custom_nameservers.with_raw_response.verify( - account_id="", - body={}, - ) diff --git a/tests/api_resources/test_dnssec.py b/tests/api_resources/test_dnssec.py index 6d2766683d3..8b083f578d3 100644 --- a/tests/api_resources/test_dnssec.py +++ b/tests/api_resources/test_dnssec.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.dnssec.dnssec import DNSSEC -from cloudflare.types.dnssec.dnssec_delete_response import DNSSECDeleteResponse +from cloudflare.types.dnssec import DNSSEC, DNSSECDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,21 +17,17 @@ class TestDNSSEC: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: dnssec = client.dnssec.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[DNSSECDeleteResponse], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.dnssec.with_raw_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -40,12 +35,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: dnssec = response.parse() assert_matches_type(Optional[DNSSECDeleteResponse], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.dnssec.with_streaming_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -55,16 +48,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dnssec.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: dnssec = client.dnssec.edit( @@ -72,7 +62,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: dnssec = client.dnssec.edit( @@ -83,7 +72,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.dnssec.with_raw_response.edit( @@ -95,7 +83,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: dnssec = response.parse() assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.dnssec.with_streaming_response.edit( @@ -109,7 +96,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -117,7 +103,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: dnssec = client.dnssec.get( @@ -125,7 +110,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dnssec.with_raw_response.get( @@ -137,7 +121,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: dnssec = response.parse() assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dnssec.with_streaming_response.get( @@ -151,7 +134,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -163,21 +145,17 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDNSSEC: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: dnssec = await async_client.dnssec.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[DNSSECDeleteResponse], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.dnssec.with_raw_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -185,12 +163,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: dnssec = await response.parse() assert_matches_type(Optional[DNSSECDeleteResponse], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.dnssec.with_streaming_response.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -200,16 +176,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dnssec.with_raw_response.delete( zone_id="", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: dnssec = await async_client.dnssec.edit( @@ -217,7 +190,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: dnssec = await async_client.dnssec.edit( @@ -228,7 +200,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.dnssec.with_raw_response.edit( @@ -240,7 +211,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: dnssec = await response.parse() assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.dnssec.with_streaming_response.edit( @@ -254,7 +224,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -262,7 +231,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dnssec = await async_client.dnssec.get( @@ -270,7 +238,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dnssec.with_raw_response.get( @@ -282,7 +249,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: dnssec = await response.parse() assert_matches_type(Optional[DNSSEC], dnssec, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dnssec.with_streaming_response.get( @@ -296,7 +262,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_email_routing.py b/tests/api_resources/test_email_routing.py index 9ee514a81ce..e31f84ff008 100644 --- a/tests/api_resources/test_email_routing.py +++ b/tests/api_resources/test_email_routing.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.email_routing.settings import Settings +from cloudflare.types.email_routing import Settings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,16 +17,14 @@ class TestEmailRouting: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_disable(self, client: Cloudflare) -> None: email_routing = client.email_routing.disable( "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_disable(self, client: Cloudflare) -> None: response = client.email_routing.with_raw_response.disable( @@ -37,9 +35,8 @@ def test_raw_response_disable(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_disable(self, client: Cloudflare) -> None: with client.email_routing.with_streaming_response.disable( @@ -50,11 +47,10 @@ def test_streaming_response_disable(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_disable(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -63,16 +59,14 @@ def test_path_params_disable(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_enable(self, client: Cloudflare) -> None: email_routing = client.email_routing.enable( "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_enable(self, client: Cloudflare) -> None: response = client.email_routing.with_raw_response.enable( @@ -83,9 +77,8 @@ def test_raw_response_enable(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_enable(self, client: Cloudflare) -> None: with client.email_routing.with_streaming_response.enable( @@ -96,11 +89,10 @@ def test_streaming_response_enable(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_enable(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -109,15 +101,13 @@ def test_path_params_enable(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: email_routing = client.email_routing.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.email_routing.with_raw_response.get( @@ -127,9 +117,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.email_routing.with_streaming_response.get( @@ -139,11 +128,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -155,16 +143,14 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEmailRouting: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_disable(self, async_client: AsyncCloudflare) -> None: email_routing = await async_client.email_routing.disable( "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.with_raw_response.disable( @@ -175,9 +161,8 @@ async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = await response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_disable(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.with_streaming_response.disable( @@ -188,11 +173,10 @@ async def test_streaming_response_disable(self, async_client: AsyncCloudflare) - assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = await response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_disable(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -201,16 +185,14 @@ async def test_path_params_disable(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_enable(self, async_client: AsyncCloudflare) -> None: email_routing = await async_client.email_routing.enable( "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.with_raw_response.enable( @@ -221,9 +203,8 @@ async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = await response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.with_streaming_response.enable( @@ -234,11 +215,10 @@ async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = await response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_enable(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -247,15 +227,13 @@ async def test_path_params_enable(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: email_routing = await async_client.email_routing.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.with_raw_response.get( @@ -265,9 +243,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = await response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.with_streaming_response.get( @@ -277,11 +254,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_routing = await response.parse() - assert_matches_type(Settings, email_routing, path=["response"]) + assert_matches_type(Optional[Settings], email_routing, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/test_filters.py b/tests/api_resources/test_filters.py index bea75db8e20..e840ceb5eaa 100644 --- a/tests/api_resources/test_filters.py +++ b/tests/api_resources/test_filters.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.filters.firewall_filter import FirewallFilter -from cloudflare.types.filters.filter_create_response import FilterCreateResponse +from cloudflare.types.filters import ( + FirewallFilter, + FilterCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,7 @@ class TestFilters: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: filter = client.filters.create( @@ -28,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[FilterCreateResponse], filter, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.filters.with_raw_response.create( @@ -41,7 +43,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: filter = response.parse() assert_matches_type(Optional[FilterCreateResponse], filter, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.filters.with_streaming_response.create( @@ -56,7 +58,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -65,7 +67,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: filter = client.filters.update( @@ -75,7 +77,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.filters.with_raw_response.update( @@ -89,7 +91,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: filter = response.parse() assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.filters.with_streaming_response.update( @@ -105,7 +107,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -122,7 +124,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: filter = client.filters.list( @@ -130,7 +131,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: filter = client.filters.list( @@ -145,7 +145,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.filters.with_raw_response.list( @@ -157,7 +156,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: filter = response.parse() assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.filters.with_streaming_response.list( @@ -171,7 +169,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -179,23 +176,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: filter = client.filters.delete( "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.filters.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -203,13 +196,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: filter = response.parse() assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.filters.with_streaming_response.delete( "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -219,24 +210,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.filters.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: filter = client.filters.get( @@ -245,7 +232,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.filters.with_raw_response.get( @@ -258,7 +244,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: filter = response.parse() assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.filters.with_streaming_response.get( @@ -273,7 +258,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -292,7 +276,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFilters: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: filter = await async_client.filters.create( @@ -301,7 +285,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[FilterCreateResponse], filter, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.filters.with_raw_response.create( @@ -314,7 +298,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: filter = await response.parse() assert_matches_type(Optional[FilterCreateResponse], filter, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.filters.with_streaming_response.create( @@ -329,7 +313,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -338,7 +322,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: filter = await async_client.filters.update( @@ -348,7 +332,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.filters.with_raw_response.update( @@ -362,7 +346,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: filter = await response.parse() assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.filters.with_streaming_response.update( @@ -378,7 +362,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -395,7 +379,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: filter = await async_client.filters.list( @@ -403,7 +386,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: filter = await async_client.filters.list( @@ -418,7 +400,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.filters.with_raw_response.list( @@ -430,7 +411,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: filter = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.filters.with_streaming_response.list( @@ -444,7 +424,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -452,23 +431,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: filter = await async_client.filters.delete( "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.filters.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -476,13 +451,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: filter = await response.parse() assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.filters.with_streaming_response.delete( "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -492,24 +465,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.filters.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: filter = await async_client.filters.get( @@ -518,7 +487,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.filters.with_raw_response.get( @@ -531,7 +499,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: filter = await response.parse() assert_matches_type(FirewallFilter, filter, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.filters.with_streaming_response.get( @@ -546,7 +513,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/test_healthchecks.py b/tests/api_resources/test_healthchecks.py index bb7bba49016..c01a5247d8b 100644 --- a/tests/api_resources/test_healthchecks.py +++ b/tests/api_resources/test_healthchecks.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.healthchecks.healthcheck import Healthcheck -from cloudflare.types.healthchecks.healthcheck_delete_response import HealthcheckDeleteResponse +from cloudflare.types.healthchecks import ( + Healthcheck, + HealthcheckDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestHealthchecks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.create( @@ -65,7 +65,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.create( @@ -79,7 +78,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: healthcheck = response.parse() assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.create( @@ -95,7 +93,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -105,7 +102,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="server-1", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.update( @@ -116,7 +112,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.update( @@ -153,7 +148,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.update( @@ -168,7 +162,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: healthcheck = response.parse() assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.update( @@ -185,7 +178,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -204,7 +196,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="server-1", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.list( @@ -212,7 +203,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Healthcheck], healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.list( @@ -222,7 +212,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Healthcheck], healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.list( @@ -234,7 +223,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: healthcheck = response.parse() assert_matches_type(SyncSinglePage[Healthcheck], healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.list( @@ -248,7 +236,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -256,23 +243,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(HealthcheckDeleteResponse, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -280,13 +263,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: healthcheck = response.parse() assert_matches_type(HealthcheckDeleteResponse, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -296,24 +277,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.edit( @@ -324,7 +301,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.edit( @@ -361,7 +337,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.edit( @@ -376,7 +351,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: healthcheck = response.parse() assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.edit( @@ -393,7 +367,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -412,7 +385,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: name="server-1", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.get( @@ -421,7 +393,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.get( @@ -434,7 +405,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: healthcheck = response.parse() assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.get( @@ -449,7 +419,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -468,7 +437,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHealthchecks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.create( @@ -478,7 +446,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.create( @@ -514,7 +481,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.create( @@ -528,7 +494,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: healthcheck = await response.parse() assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.create( @@ -544,7 +509,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -554,7 +518,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="server-1", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.update( @@ -565,7 +528,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.update( @@ -602,7 +564,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.update( @@ -617,7 +578,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: healthcheck = await response.parse() assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.update( @@ -634,7 +594,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -653,7 +612,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="server-1", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.list( @@ -661,7 +619,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Healthcheck], healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.list( @@ -671,7 +628,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[Healthcheck], healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.list( @@ -683,7 +639,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: healthcheck = await response.parse() assert_matches_type(AsyncSinglePage[Healthcheck], healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.list( @@ -697,7 +652,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -705,23 +659,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(HealthcheckDeleteResponse, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -729,13 +679,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: healthcheck = await response.parse() assert_matches_type(HealthcheckDeleteResponse, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -745,24 +693,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.edit( @@ -773,7 +717,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.edit( @@ -810,7 +753,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.edit( @@ -825,7 +767,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: healthcheck = await response.parse() assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.edit( @@ -842,7 +783,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -861,7 +801,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: name="server-1", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.get( @@ -870,7 +809,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.get( @@ -883,7 +821,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: healthcheck = await response.parse() assert_matches_type(Healthcheck, healthcheck, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.get( @@ -898,7 +835,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_ips.py b/tests/api_resources/test_ips.py index 6a5ecb6eced..165880daa49 100644 --- a/tests/api_resources/test_ips.py +++ b/tests/api_resources/test_ips.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.ips.ip_list_response import IPListResponse +from cloudflare.types.ips import IPListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,13 +17,11 @@ class TestIPs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: ip = client.ips.list() assert_matches_type(Optional[IPListResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ip = client.ips.list( @@ -31,7 +29,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IPListResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.ips.with_raw_response.list() @@ -41,7 +38,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: ip = response.parse() assert_matches_type(Optional[IPListResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.ips.with_streaming_response.list() as response: @@ -57,13 +53,11 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncIPs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ip = await async_client.ips.list() assert_matches_type(Optional[IPListResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ip = await async_client.ips.list( @@ -71,7 +65,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[IPListResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.ips.with_raw_response.list() @@ -81,7 +74,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: ip = await response.parse() assert_matches_type(Optional[IPListResponse], ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.ips.with_streaming_response.list() as response: diff --git a/tests/api_resources/test_keyless_certificates.py b/tests/api_resources/test_keyless_certificates.py index 0125ed3cc7a..f1859888ebc 100644 --- a/tests/api_resources/test_keyless_certificates.py +++ b/tests/api_resources/test_keyless_certificates.py @@ -3,15 +3,17 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.keyless_certificates.keyless_certificate import KeylessCertificate -from cloudflare.types.keyless_certificates.keyless_certificate_delete_response import KeylessCertificateDeleteResponse +from cloudflare.types.keyless_certificates import ( + KeylessCertificate, + KeylessCertificateDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestKeylessCertificates: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.create( @@ -28,9 +29,8 @@ def test_method_create(self, client: Cloudflare) -> None: host="example.com", port=24008, ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.create( @@ -45,9 +45,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.create( @@ -60,9 +59,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.create( @@ -75,11 +73,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -90,7 +87,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: port=24008, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.list( @@ -98,7 +94,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.list( @@ -110,7 +105,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: keyless_certificate = response.parse() assert_matches_type(SyncSinglePage[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.list( @@ -124,7 +118,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -132,54 +125,46 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(KeylessCertificateDeleteResponse, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificateDeleteResponse, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificateDeleteResponse, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.keyless_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises( @@ -188,19 +173,16 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.keyless_certificates.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.edit( @@ -215,9 +197,8 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.edit( @@ -228,9 +209,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.edit( @@ -241,11 +221,10 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -262,16 +241,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.get( @@ -282,9 +259,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.get( @@ -295,11 +271,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -320,7 +295,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncKeylessCertificates: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.create( @@ -329,9 +303,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: host="example.com", port=24008, ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.create( @@ -346,9 +319,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.create( @@ -361,9 +333,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.create( @@ -376,11 +347,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -391,7 +361,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: port=24008, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.list( @@ -399,7 +368,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.list( @@ -411,7 +379,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await response.parse() assert_matches_type(AsyncSinglePage[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.list( @@ -425,7 +392,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -433,54 +399,46 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(KeylessCertificateDeleteResponse, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificateDeleteResponse, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificateDeleteResponse, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.keyless_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises( @@ -489,19 +447,16 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.keyless_certificates.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.edit( @@ -516,9 +471,8 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.edit( @@ -529,9 +483,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.edit( @@ -542,11 +495,10 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -563,16 +515,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.get( @@ -583,9 +533,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.get( @@ -596,11 +545,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificate, keyless_certificate, path=["response"]) + assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_load_balancers.py b/tests/api_resources/test_load_balancers.py index c34be32b75e..bf36879da54 100644 --- a/tests/api_resources/test_load_balancers.py +++ b/tests/api_resources/test_load_balancers.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.load_balancers.load_balancer import LoadBalancer -from cloudflare.types.load_balancers.load_balancer_delete_response import LoadBalancerDeleteResponse +from cloudflare.types.load_balancers import ( + LoadBalancer, + LoadBalancerDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestLoadBalancers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.create( @@ -34,7 +35,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.create( @@ -264,7 +264,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.create( @@ -283,7 +282,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: load_balancer = response.parse() assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.create( @@ -304,7 +302,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -319,7 +316,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="www.example.com", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.update( @@ -335,7 +331,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.update( @@ -567,7 +562,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.update( @@ -587,7 +581,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: load_balancer = response.parse() assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.update( @@ -609,7 +602,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -638,7 +630,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="www.example.com", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.list( @@ -646,7 +637,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[LoadBalancer], load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.list( @@ -658,7 +648,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: load_balancer = response.parse() assert_matches_type(SyncSinglePage[LoadBalancer], load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.list( @@ -672,7 +661,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -680,23 +668,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.delete( "699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(LoadBalancerDeleteResponse, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -704,13 +688,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: load_balancer = response.parse() assert_matches_type(LoadBalancerDeleteResponse, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -720,24 +702,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.load_balancers.with_raw_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): client.load_balancers.with_raw_response.delete( "", zone_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.edit( @@ -746,7 +724,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.edit( @@ -978,7 +955,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.edit( @@ -991,7 +967,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: load_balancer = response.parse() assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.edit( @@ -1006,7 +981,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1021,7 +995,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.get( @@ -1030,7 +1003,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.get( @@ -1043,7 +1015,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: load_balancer = response.parse() assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.get( @@ -1058,7 +1029,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1077,7 +1047,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLoadBalancers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.create( @@ -1092,7 +1061,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.create( @@ -1322,7 +1290,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.create( @@ -1341,7 +1308,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: load_balancer = await response.parse() assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.create( @@ -1362,7 +1328,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1377,7 +1342,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="www.example.com", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.update( @@ -1393,7 +1357,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.update( @@ -1625,7 +1588,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.update( @@ -1645,7 +1607,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: load_balancer = await response.parse() assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.update( @@ -1667,7 +1628,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1696,7 +1656,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="www.example.com", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.list( @@ -1704,7 +1663,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[LoadBalancer], load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.list( @@ -1716,7 +1674,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: load_balancer = await response.parse() assert_matches_type(AsyncSinglePage[LoadBalancer], load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.list( @@ -1730,7 +1687,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1738,23 +1694,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.delete( "699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(LoadBalancerDeleteResponse, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -1762,13 +1714,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: load_balancer = await response.parse() assert_matches_type(LoadBalancerDeleteResponse, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1778,24 +1728,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.load_balancers.with_raw_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): await async_client.load_balancers.with_raw_response.delete( "", zone_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.edit( @@ -1804,7 +1750,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.edit( @@ -2036,7 +1981,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.edit( @@ -2049,7 +1993,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: load_balancer = await response.parse() assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.edit( @@ -2064,7 +2007,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2079,7 +2021,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.get( @@ -2088,7 +2029,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.get( @@ -2101,7 +2041,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: load_balancer = await response.parse() assert_matches_type(LoadBalancer, load_balancer, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.get( @@ -2116,7 +2055,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_managed_headers.py b/tests/api_resources/test_managed_headers.py index 0c1ddcaa5db..0d994140e6c 100644 --- a/tests/api_resources/test_managed_headers.py +++ b/tests/api_resources/test_managed_headers.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.managed_headers.managed_header_edit_response import ManagedHeaderEditResponse -from cloudflare.types.managed_headers.managed_header_list_response import ManagedHeaderListResponse +from cloudflare.types.managed_headers import ( + ManagedHeaderEditResponse, + ManagedHeaderListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestManagedHeaders: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: managed_header = client.managed_headers.list( @@ -26,7 +27,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(ManagedHeaderListResponse, managed_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.managed_headers.with_raw_response.list( @@ -38,7 +38,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: managed_header = response.parse() assert_matches_type(ManagedHeaderListResponse, managed_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.managed_headers.with_streaming_response.list( @@ -52,7 +51,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -60,7 +58,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: managed_header = client.managed_headers.edit( @@ -70,7 +67,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(ManagedHeaderEditResponse, managed_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.managed_headers.with_raw_response.edit( @@ -84,7 +80,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: managed_header = response.parse() assert_matches_type(ManagedHeaderEditResponse, managed_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.managed_headers.with_streaming_response.edit( @@ -100,7 +95,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -114,7 +108,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncManagedHeaders: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: managed_header = await async_client.managed_headers.list( @@ -122,7 +115,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ManagedHeaderListResponse, managed_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.managed_headers.with_raw_response.list( @@ -134,7 +126,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: managed_header = await response.parse() assert_matches_type(ManagedHeaderListResponse, managed_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.managed_headers.with_streaming_response.list( @@ -148,7 +139,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -156,7 +146,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: managed_header = await async_client.managed_headers.edit( @@ -166,7 +155,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ManagedHeaderEditResponse, managed_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.managed_headers.with_raw_response.edit( @@ -180,7 +168,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: managed_header = await response.parse() assert_matches_type(ManagedHeaderEditResponse, managed_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.managed_headers.with_streaming_response.edit( @@ -196,7 +183,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_memberships.py b/tests/api_resources/test_memberships.py index 09458896e93..c833239e35c 100644 --- a/tests/api_resources/test_memberships.py +++ b/tests/api_resources/test_memberships.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.memberships.membership import Membership -from cloudflare.types.memberships.membership_get_response import MembershipGetResponse -from cloudflare.types.memberships.membership_delete_response import MembershipDeleteResponse -from cloudflare.types.memberships.membership_update_response import MembershipUpdateResponse +from cloudflare.types.memberships import ( + Membership, + MembershipGetResponse, + MembershipDeleteResponse, + MembershipUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestMemberships: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: membership = client.memberships.update( @@ -30,7 +31,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(MembershipUpdateResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.memberships.with_raw_response.update( @@ -43,7 +43,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: membership = response.parse() assert_matches_type(MembershipUpdateResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.memberships.with_streaming_response.update( @@ -58,7 +57,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): @@ -67,13 +65,11 @@ def test_path_params_update(self, client: Cloudflare) -> None: status="accepted", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: membership = client.memberships.list() assert_matches_type(SyncV4PagePaginationArray[Membership], membership, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: membership = client.memberships.list( @@ -87,7 +83,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Membership], membership, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.memberships.with_raw_response.list() @@ -97,7 +92,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: membership = response.parse() assert_matches_type(SyncV4PagePaginationArray[Membership], membership, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.memberships.with_streaming_response.list() as response: @@ -109,21 +103,17 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: membership = client.memberships.delete( "4536bcfad5faccb111b47003c79917fa", - body={}, ) assert_matches_type(MembershipDeleteResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.memberships.with_raw_response.delete( "4536bcfad5faccb111b47003c79917fa", - body={}, ) assert response.is_closed is True @@ -131,12 +121,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: membership = response.parse() assert_matches_type(MembershipDeleteResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.memberships.with_streaming_response.delete( "4536bcfad5faccb111b47003c79917fa", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -146,16 +134,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): client.memberships.with_raw_response.delete( "", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: membership = client.memberships.get( @@ -163,7 +148,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(MembershipGetResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.memberships.with_raw_response.get( @@ -175,7 +159,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: membership = response.parse() assert_matches_type(MembershipGetResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.memberships.with_streaming_response.get( @@ -189,7 +172,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): @@ -201,7 +183,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMemberships: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: membership = await async_client.memberships.update( @@ -210,7 +191,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(MembershipUpdateResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.memberships.with_raw_response.update( @@ -223,7 +203,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: membership = await response.parse() assert_matches_type(MembershipUpdateResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.memberships.with_streaming_response.update( @@ -238,7 +217,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): @@ -247,13 +225,11 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: status="accepted", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: membership = await async_client.memberships.list() assert_matches_type(AsyncV4PagePaginationArray[Membership], membership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: membership = await async_client.memberships.list( @@ -267,7 +243,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Membership], membership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.memberships.with_raw_response.list() @@ -277,7 +252,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: membership = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Membership], membership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.memberships.with_streaming_response.list() as response: @@ -289,21 +263,17 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: membership = await async_client.memberships.delete( "4536bcfad5faccb111b47003c79917fa", - body={}, ) assert_matches_type(MembershipDeleteResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.memberships.with_raw_response.delete( "4536bcfad5faccb111b47003c79917fa", - body={}, ) assert response.is_closed is True @@ -311,12 +281,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: membership = await response.parse() assert_matches_type(MembershipDeleteResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.memberships.with_streaming_response.delete( "4536bcfad5faccb111b47003c79917fa", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -326,16 +294,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): await async_client.memberships.with_raw_response.delete( "", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: membership = await async_client.memberships.get( @@ -343,7 +308,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(MembershipGetResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.memberships.with_raw_response.get( @@ -355,7 +319,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: membership = await response.parse() assert_matches_type(MembershipGetResponse, membership, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.memberships.with_streaming_response.get( @@ -369,7 +332,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): diff --git a/tests/api_resources/test_mtls_certificates.py b/tests/api_resources/test_mtls_certificates.py index 4367b45bac9..70101b484c8 100644 --- a/tests/api_resources/test_mtls_certificates.py +++ b/tests/api_resources/test_mtls_certificates.py @@ -3,15 +3,17 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.mtls_certificates.mtls_certificate import MTLSCertificate -from cloudflare.types.mtls_certificates.mtls_certificate_create_response import MTLSCertificateCreateResponse +from cloudflare.types.mtls_certificates import ( + MTLSCertificate, + MTLSCertificateCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestMTLSCertificates: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.create( @@ -27,9 +28,8 @@ def test_method_create(self, client: Cloudflare) -> None: ca=True, certificates="-----BEGIN CERTIFICATE-----\nMIIDmDCCAoCgAwIBAgIUKTOAZNjcXVZRj4oQt0SHsl1c1vMwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjAgFw0yMjExMjIxNjU5NDdaGA8yMTIyMTAyOTE2NTk0N1owUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRcORwgJFTdcG/2GKI+cFYiOBNDKjCZUXEOvXWY42BkH9wxiMT869CO+enA1w5pIrXow6kCM1sQspHHaVmJUlotEMJxyoLFfA/8Kt1EKFyobOjuZs2SwyVyJ2sStvQuUQEosULZCNGZEqoH5g6zhMPxaxm7ZLrrsDZ9maNGVqo7EWLWHrZ57Q/5MtTrbxQL+eXjUmJ9K3kS+3uEwMdqR6Z3BluU1ivanpPc1CN2GNhdO0/hSY4YkGEnuLsqJyDd3cIiB1MxuCBJ4ZaqOd2viV1WcP3oU3dxVPm4MWyfYIldMWB14FahScxLhWdRnM9YZ/i9IFcLypXsuz7DjrJPtPUCAwEAAaNmMGQwHQYDVR0OBBYEFP5JzLUawNF+c3AXsYTEWHh7z2czMB8GA1UdIwQYMBaAFP5JzLUawNF+c3AXsYTEWHh7z2czMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQBc+Be7NDhpE09y7hLPZGRPl1cSKBw4RI0XIv6rlbSTFs5EebpTGjhx/whNxwEZhB9HZ7111Oa1YlT8xkI9DshB78mjAHCKBAJ76moK8tkG0aqdYpJ4ZcJTVBB7l98Rvgc7zfTii7WemTy72deBbSeiEtXavm4EF0mWjHhQ5Nxpnp00Bqn5g1x8CyTDypgmugnep+xG+iFzNmTdsz7WI9T/7kDMXqB7M/FPWBORyS98OJqNDswCLF8bIZYwUBEe+bRHFomoShMzaC3tvim7WCb16noDkSTMlfKO4pnvKhpcVdSgwcruATV7y+W+Lvmz2OT/Gui4JhqeoTewsxndhDDE\n-----END CERTIFICATE-----", ) - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificateCreateResponse], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.create( @@ -39,9 +39,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="example_ca_cert", private_key="-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDEXDkcICRU3XBv9hiiPnBWIjgTQyowmVFxDr11mONgZB/cMYjE/OvQjvnpwNcOaSK16MOpAjNbELKRx2lZiVJaLRDCccqCxXwP/CrdRChcqGzo7mbNksMlcidrErb0LlEBKLFC2QjRmRKqB+YOs4TD8WsZu2S667A2fZmjRlaqOxFi1h62ee0P+TLU628UC/nl41JifSt5Evt7hMDHakemdwZblNYr2p6T3NQjdhjYXTtP4UmOGJBhJ7i7Kicg3d3CIgdTMbggSeGWqjndr4ldVnD96FN3cVT5uDFsn2CJXTFgdeBWoUnMS4VnUZzPWGf4vSBXC8qV7Ls+w46yT7T1AgMBAAECggEAQZnp/oqCeNPOR6l5S2L+1tfx0gWjZ78hJVteUpZ0iHSK7F6kKeOxyOird7vUXV0kmo+cJq+0hp0Ke4eam640FCpwKfYoSQ4/R3vgujGWJnaihCN5tv5sMet0XeJPuz5qE7ALoKCvwI6aXLHs20aAeZIDTQJ9QbGSGnJVzOWn+JDTidIgZpN57RpXfSAwnJPTQK/PN8i5z108hsaDOdEgGmxYZ7kYqMqzX20KXmth58LDfPixs5JGtS60iiKC/wOcGzkB2/AdTSojR76oEU77cANP/3zO25NG//whUdYlW0t0d7PgXxIeJe+xgYnamDQJx3qonVyt4H77ha0ObRAj9QKBgQDicZr+VTwFMnELP3a+FXGnjehRiuS1i7MXGKxNweCD+dFlML0FplSQS8Ro2n+d8lu8BBXGx0qm6VXu8Rhn7TAUL6q+PCgfarzxfIhacb/TZCqfieIHsMlVBfhV5HCXnk+kis0tuC/PRArcWTwDHJUJXkBhvkUsNswvQzavDPI7KwKBgQDd/WgLkj7A3X5fgIHZH/GbDSBiXwzKb+rF4ZCT2XFgG/OAW7vapfcX/w+v+5lBLyrocmOAS3PGGAhM5T3HLnUCQfnK4qgps1Lqibkc9Tmnsn60LanUjuUMsYv/zSw70tozbzhJ0pioEpWfRxRZBztO2Rr8Ntm7h6Fk701EXGNAXwKBgQCD1xsjy2J3sCerIdcz0u5qXLAPkeuZW+34m4/ucdwTWwc0gEz9lhsULFj9p4G351zLuiEnq+7mAWLcDJlmIO3mQt6JhiLiL9Y0T4pgBmxmWqKKYtAsJB0EmMY+1BNN44mBRqMxZFTJu1cLdhT/xstrOeoIPqytknYNanfTMZlzIwKBgHrLXe5oq0XMP8dcMneEcAUwsaU4pr6kQd3L9EmUkl5zl7J9C+DaxWAEuwzBw/iGutlxzRB+rD/7szu14wJ29EqXbDGKRzMp+se5/yfBjm7xEZ1hVPw7PwBShfqt57X/4Ktq7lwHnmH6RcGhc+P7WBc5iO/S94YAdIp8xOT3pf9JAoGAE0QkqJUY+5Mgr+fBO0VNV72ZoPveGpW+De59uhKAOnu1zljQCUtk59m6+DXfm0tNYKtawa5n8iN71Zh+s62xXSt3pYi1Y5CCCmv8Y4BhwIcPwXKk3zEvLgSHVTpC0bayA9aSO4bbZgVXa5w+Z0w/vvfp9DWo1IS3EnQRrz6WMYA=\n-----END PRIVATE KEY-----", ) - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificateCreateResponse], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.mtls_certificates.with_raw_response.create( @@ -53,9 +52,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificateCreateResponse], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.mtls_certificates.with_streaming_response.create( @@ -67,11 +65,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificateCreateResponse], mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -81,7 +78,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: certificates="-----BEGIN CERTIFICATE-----\nMIIDmDCCAoCgAwIBAgIUKTOAZNjcXVZRj4oQt0SHsl1c1vMwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjAgFw0yMjExMjIxNjU5NDdaGA8yMTIyMTAyOTE2NTk0N1owUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRcORwgJFTdcG/2GKI+cFYiOBNDKjCZUXEOvXWY42BkH9wxiMT869CO+enA1w5pIrXow6kCM1sQspHHaVmJUlotEMJxyoLFfA/8Kt1EKFyobOjuZs2SwyVyJ2sStvQuUQEosULZCNGZEqoH5g6zhMPxaxm7ZLrrsDZ9maNGVqo7EWLWHrZ57Q/5MtTrbxQL+eXjUmJ9K3kS+3uEwMdqR6Z3BluU1ivanpPc1CN2GNhdO0/hSY4YkGEnuLsqJyDd3cIiB1MxuCBJ4ZaqOd2viV1WcP3oU3dxVPm4MWyfYIldMWB14FahScxLhWdRnM9YZ/i9IFcLypXsuz7DjrJPtPUCAwEAAaNmMGQwHQYDVR0OBBYEFP5JzLUawNF+c3AXsYTEWHh7z2czMB8GA1UdIwQYMBaAFP5JzLUawNF+c3AXsYTEWHh7z2czMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQBc+Be7NDhpE09y7hLPZGRPl1cSKBw4RI0XIv6rlbSTFs5EebpTGjhx/whNxwEZhB9HZ7111Oa1YlT8xkI9DshB78mjAHCKBAJ76moK8tkG0aqdYpJ4ZcJTVBB7l98Rvgc7zfTii7WemTy72deBbSeiEtXavm4EF0mWjHhQ5Nxpnp00Bqn5g1x8CyTDypgmugnep+xG+iFzNmTdsz7WI9T/7kDMXqB7M/FPWBORyS98OJqNDswCLF8bIZYwUBEe+bRHFomoShMzaC3tvim7WCb16noDkSTMlfKO4pnvKhpcVdSgwcruATV7y+W+Lvmz2OT/Gui4JhqeoTewsxndhDDE\n-----END CERTIFICATE-----", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.list( @@ -89,7 +85,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.mtls_certificates.with_raw_response.list( @@ -101,7 +96,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: mtls_certificate = response.parse() assert_matches_type(SyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.mtls_certificates.with_streaming_response.list( @@ -115,7 +109,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -123,73 +116,62 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.mtls_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.mtls_certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.mtls_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): client.mtls_certificates.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.mtls_certificates.with_raw_response.get( @@ -200,9 +182,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.mtls_certificates.with_streaming_response.get( @@ -213,11 +194,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -236,7 +216,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMTLSCertificates: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.create( @@ -244,9 +223,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ca=True, certificates="-----BEGIN CERTIFICATE-----\nMIIDmDCCAoCgAwIBAgIUKTOAZNjcXVZRj4oQt0SHsl1c1vMwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjAgFw0yMjExMjIxNjU5NDdaGA8yMTIyMTAyOTE2NTk0N1owUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRcORwgJFTdcG/2GKI+cFYiOBNDKjCZUXEOvXWY42BkH9wxiMT869CO+enA1w5pIrXow6kCM1sQspHHaVmJUlotEMJxyoLFfA/8Kt1EKFyobOjuZs2SwyVyJ2sStvQuUQEosULZCNGZEqoH5g6zhMPxaxm7ZLrrsDZ9maNGVqo7EWLWHrZ57Q/5MtTrbxQL+eXjUmJ9K3kS+3uEwMdqR6Z3BluU1ivanpPc1CN2GNhdO0/hSY4YkGEnuLsqJyDd3cIiB1MxuCBJ4ZaqOd2viV1WcP3oU3dxVPm4MWyfYIldMWB14FahScxLhWdRnM9YZ/i9IFcLypXsuz7DjrJPtPUCAwEAAaNmMGQwHQYDVR0OBBYEFP5JzLUawNF+c3AXsYTEWHh7z2czMB8GA1UdIwQYMBaAFP5JzLUawNF+c3AXsYTEWHh7z2czMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQBc+Be7NDhpE09y7hLPZGRPl1cSKBw4RI0XIv6rlbSTFs5EebpTGjhx/whNxwEZhB9HZ7111Oa1YlT8xkI9DshB78mjAHCKBAJ76moK8tkG0aqdYpJ4ZcJTVBB7l98Rvgc7zfTii7WemTy72deBbSeiEtXavm4EF0mWjHhQ5Nxpnp00Bqn5g1x8CyTDypgmugnep+xG+iFzNmTdsz7WI9T/7kDMXqB7M/FPWBORyS98OJqNDswCLF8bIZYwUBEe+bRHFomoShMzaC3tvim7WCb16noDkSTMlfKO4pnvKhpcVdSgwcruATV7y+W+Lvmz2OT/Gui4JhqeoTewsxndhDDE\n-----END CERTIFICATE-----", ) - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificateCreateResponse], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.create( @@ -256,9 +234,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="example_ca_cert", private_key="-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDEXDkcICRU3XBv9hiiPnBWIjgTQyowmVFxDr11mONgZB/cMYjE/OvQjvnpwNcOaSK16MOpAjNbELKRx2lZiVJaLRDCccqCxXwP/CrdRChcqGzo7mbNksMlcidrErb0LlEBKLFC2QjRmRKqB+YOs4TD8WsZu2S667A2fZmjRlaqOxFi1h62ee0P+TLU628UC/nl41JifSt5Evt7hMDHakemdwZblNYr2p6T3NQjdhjYXTtP4UmOGJBhJ7i7Kicg3d3CIgdTMbggSeGWqjndr4ldVnD96FN3cVT5uDFsn2CJXTFgdeBWoUnMS4VnUZzPWGf4vSBXC8qV7Ls+w46yT7T1AgMBAAECggEAQZnp/oqCeNPOR6l5S2L+1tfx0gWjZ78hJVteUpZ0iHSK7F6kKeOxyOird7vUXV0kmo+cJq+0hp0Ke4eam640FCpwKfYoSQ4/R3vgujGWJnaihCN5tv5sMet0XeJPuz5qE7ALoKCvwI6aXLHs20aAeZIDTQJ9QbGSGnJVzOWn+JDTidIgZpN57RpXfSAwnJPTQK/PN8i5z108hsaDOdEgGmxYZ7kYqMqzX20KXmth58LDfPixs5JGtS60iiKC/wOcGzkB2/AdTSojR76oEU77cANP/3zO25NG//whUdYlW0t0d7PgXxIeJe+xgYnamDQJx3qonVyt4H77ha0ObRAj9QKBgQDicZr+VTwFMnELP3a+FXGnjehRiuS1i7MXGKxNweCD+dFlML0FplSQS8Ro2n+d8lu8BBXGx0qm6VXu8Rhn7TAUL6q+PCgfarzxfIhacb/TZCqfieIHsMlVBfhV5HCXnk+kis0tuC/PRArcWTwDHJUJXkBhvkUsNswvQzavDPI7KwKBgQDd/WgLkj7A3X5fgIHZH/GbDSBiXwzKb+rF4ZCT2XFgG/OAW7vapfcX/w+v+5lBLyrocmOAS3PGGAhM5T3HLnUCQfnK4qgps1Lqibkc9Tmnsn60LanUjuUMsYv/zSw70tozbzhJ0pioEpWfRxRZBztO2Rr8Ntm7h6Fk701EXGNAXwKBgQCD1xsjy2J3sCerIdcz0u5qXLAPkeuZW+34m4/ucdwTWwc0gEz9lhsULFj9p4G351zLuiEnq+7mAWLcDJlmIO3mQt6JhiLiL9Y0T4pgBmxmWqKKYtAsJB0EmMY+1BNN44mBRqMxZFTJu1cLdhT/xstrOeoIPqytknYNanfTMZlzIwKBgHrLXe5oq0XMP8dcMneEcAUwsaU4pr6kQd3L9EmUkl5zl7J9C+DaxWAEuwzBw/iGutlxzRB+rD/7szu14wJ29EqXbDGKRzMp+se5/yfBjm7xEZ1hVPw7PwBShfqt57X/4Ktq7lwHnmH6RcGhc+P7WBc5iO/S94YAdIp8xOT3pf9JAoGAE0QkqJUY+5Mgr+fBO0VNV72ZoPveGpW+De59uhKAOnu1zljQCUtk59m6+DXfm0tNYKtawa5n8iN71Zh+s62xXSt3pYi1Y5CCCmv8Y4BhwIcPwXKk3zEvLgSHVTpC0bayA9aSO4bbZgVXa5w+Z0w/vvfp9DWo1IS3EnQRrz6WMYA=\n-----END PRIVATE KEY-----", ) - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificateCreateResponse], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.with_raw_response.create( @@ -270,9 +247,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificateCreateResponse], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.mtls_certificates.with_streaming_response.create( @@ -284,11 +260,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificateCreateResponse], mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -298,7 +273,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: certificates="-----BEGIN CERTIFICATE-----\nMIIDmDCCAoCgAwIBAgIUKTOAZNjcXVZRj4oQt0SHsl1c1vMwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjAgFw0yMjExMjIxNjU5NDdaGA8yMTIyMTAyOTE2NTk0N1owUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRcORwgJFTdcG/2GKI+cFYiOBNDKjCZUXEOvXWY42BkH9wxiMT869CO+enA1w5pIrXow6kCM1sQspHHaVmJUlotEMJxyoLFfA/8Kt1EKFyobOjuZs2SwyVyJ2sStvQuUQEosULZCNGZEqoH5g6zhMPxaxm7ZLrrsDZ9maNGVqo7EWLWHrZ57Q/5MtTrbxQL+eXjUmJ9K3kS+3uEwMdqR6Z3BluU1ivanpPc1CN2GNhdO0/hSY4YkGEnuLsqJyDd3cIiB1MxuCBJ4ZaqOd2viV1WcP3oU3dxVPm4MWyfYIldMWB14FahScxLhWdRnM9YZ/i9IFcLypXsuz7DjrJPtPUCAwEAAaNmMGQwHQYDVR0OBBYEFP5JzLUawNF+c3AXsYTEWHh7z2czMB8GA1UdIwQYMBaAFP5JzLUawNF+c3AXsYTEWHh7z2czMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQBc+Be7NDhpE09y7hLPZGRPl1cSKBw4RI0XIv6rlbSTFs5EebpTGjhx/whNxwEZhB9HZ7111Oa1YlT8xkI9DshB78mjAHCKBAJ76moK8tkG0aqdYpJ4ZcJTVBB7l98Rvgc7zfTii7WemTy72deBbSeiEtXavm4EF0mWjHhQ5Nxpnp00Bqn5g1x8CyTDypgmugnep+xG+iFzNmTdsz7WI9T/7kDMXqB7M/FPWBORyS98OJqNDswCLF8bIZYwUBEe+bRHFomoShMzaC3tvim7WCb16noDkSTMlfKO4pnvKhpcVdSgwcruATV7y+W+Lvmz2OT/Gui4JhqeoTewsxndhDDE\n-----END CERTIFICATE-----", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.list( @@ -306,7 +280,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.with_raw_response.list( @@ -318,7 +291,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await response.parse() assert_matches_type(AsyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.mtls_certificates.with_streaming_response.list( @@ -332,7 +304,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -340,73 +311,62 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.mtls_certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.mtls_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): await async_client.mtls_certificates.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.with_raw_response.get( @@ -417,9 +377,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.mtls_certificates.with_streaming_response.get( @@ -430,11 +389,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) + assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_origin_ca_certificates.py b/tests/api_resources/test_origin_ca_certificates.py index 1634e513180..bd05350fd58 100644 --- a/tests/api_resources/test_origin_ca_certificates.py +++ b/tests/api_resources/test_origin_ca_certificates.py @@ -3,19 +3,17 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.origin_ca_certificates.origin_ca_certificate import OriginCACertificate -from cloudflare.types.origin_ca_certificates.origin_ca_certificate_get_response import OriginCACertificateGetResponse -from cloudflare.types.origin_ca_certificates.origin_ca_certificate_create_response import ( +from cloudflare.types.origin_ca_certificates import ( + OriginCACertificate, + OriginCACertificateGetResponse, OriginCACertificateCreateResponse, -) -from cloudflare.types.origin_ca_certificates.origin_ca_certificate_delete_response import ( OriginCACertificateDeleteResponse, ) @@ -25,13 +23,11 @@ class TestOriginCACertificates: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: origin_ca_certificate = client.origin_ca_certificates.create() - assert_matches_type(OriginCACertificateCreateResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateCreateResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: origin_ca_certificate = client.origin_ca_certificates.create( @@ -40,9 +36,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: request_type="origin-rsa", requested_validity=5475, ) - assert_matches_type(OriginCACertificateCreateResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateCreateResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.origin_ca_certificates.with_raw_response.create() @@ -50,9 +45,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = response.parse() - assert_matches_type(OriginCACertificateCreateResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateCreateResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.origin_ca_certificates.with_streaming_response.create() as response: @@ -60,25 +54,22 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = response.parse() - assert_matches_type(OriginCACertificateCreateResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateCreateResponse], origin_ca_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: origin_ca_certificate = client.origin_ca_certificates.list() assert_matches_type(SyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: origin_ca_certificate = client.origin_ca_certificates.list( - identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.origin_ca_certificates.with_raw_response.list() @@ -88,7 +79,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: origin_ca_certificate = response.parse() assert_matches_type(SyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.origin_ca_certificates.with_streaming_response.list() as response: @@ -100,61 +90,51 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: origin_ca_certificate = client.origin_ca_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(OriginCACertificateDeleteResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateDeleteResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.origin_ca_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = response.parse() - assert_matches_type(OriginCACertificateDeleteResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateDeleteResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.origin_ca_certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = response.parse() - assert_matches_type(OriginCACertificateDeleteResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateDeleteResponse], origin_ca_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_ca_certificates.with_raw_response.delete( "", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: origin_ca_certificate = client.origin_ca_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(OriginCACertificateGetResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateGetResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_ca_certificates.with_raw_response.get( @@ -164,9 +144,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = response.parse() - assert_matches_type(OriginCACertificateGetResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateGetResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_ca_certificates.with_streaming_response.get( @@ -176,11 +155,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = response.parse() - assert_matches_type(OriginCACertificateGetResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateGetResponse], origin_ca_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): @@ -192,13 +170,11 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginCACertificates: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: origin_ca_certificate = await async_client.origin_ca_certificates.create() - assert_matches_type(OriginCACertificateCreateResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateCreateResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: origin_ca_certificate = await async_client.origin_ca_certificates.create( @@ -207,9 +183,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare request_type="origin-rsa", requested_validity=5475, ) - assert_matches_type(OriginCACertificateCreateResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateCreateResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_ca_certificates.with_raw_response.create() @@ -217,9 +192,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = await response.parse() - assert_matches_type(OriginCACertificateCreateResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateCreateResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_ca_certificates.with_streaming_response.create() as response: @@ -227,25 +201,22 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = await response.parse() - assert_matches_type(OriginCACertificateCreateResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateCreateResponse], origin_ca_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: origin_ca_certificate = await async_client.origin_ca_certificates.list() assert_matches_type(AsyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: origin_ca_certificate = await async_client.origin_ca_certificates.list( - identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_ca_certificates.with_raw_response.list() @@ -255,7 +226,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: origin_ca_certificate = await response.parse() assert_matches_type(AsyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_ca_certificates.with_streaming_response.list() as response: @@ -267,61 +237,51 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: origin_ca_certificate = await async_client.origin_ca_certificates.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(OriginCACertificateDeleteResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateDeleteResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_ca_certificates.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = await response.parse() - assert_matches_type(OriginCACertificateDeleteResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateDeleteResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_ca_certificates.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = await response.parse() - assert_matches_type(OriginCACertificateDeleteResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateDeleteResponse], origin_ca_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_ca_certificates.with_raw_response.delete( "", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: origin_ca_certificate = await async_client.origin_ca_certificates.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(OriginCACertificateGetResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateGetResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_ca_certificates.with_raw_response.get( @@ -331,9 +291,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = await response.parse() - assert_matches_type(OriginCACertificateGetResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateGetResponse], origin_ca_certificate, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_ca_certificates.with_streaming_response.get( @@ -343,11 +302,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = await response.parse() - assert_matches_type(OriginCACertificateGetResponse, origin_ca_certificate, path=["response"]) + assert_matches_type(Optional[OriginCACertificateGetResponse], origin_ca_certificate, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): diff --git a/tests/api_resources/test_origin_post_quantum_encryption.py b/tests/api_resources/test_origin_post_quantum_encryption.py index 019ff719faf..7b671649427 100644 --- a/tests/api_resources/test_origin_post_quantum_encryption.py +++ b/tests/api_resources/test_origin_post_quantum_encryption.py @@ -9,10 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.origin_post_quantum_encryption.origin_post_quantum_encryption_get_response import ( +from cloudflare.types.origin_post_quantum_encryption import ( OriginPostQuantumEncryptionGetResponse, -) -from cloudflare.types.origin_post_quantum_encryption.origin_post_quantum_encryption_update_response import ( OriginPostQuantumEncryptionUpdateResponse, ) @@ -22,7 +20,7 @@ class TestOriginPostQuantumEncryption: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: origin_post_quantum_encryption = client.origin_post_quantum_encryption.update( @@ -33,7 +31,7 @@ def test_method_update(self, client: Cloudflare) -> None: OriginPostQuantumEncryptionUpdateResponse, origin_post_quantum_encryption, path=["response"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.origin_post_quantum_encryption.with_raw_response.update( @@ -48,7 +46,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: OriginPostQuantumEncryptionUpdateResponse, origin_post_quantum_encryption, path=["response"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.origin_post_quantum_encryption.with_streaming_response.update( @@ -65,7 +63,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -74,7 +72,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: value="preferred", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: origin_post_quantum_encryption = client.origin_post_quantum_encryption.get( @@ -82,7 +80,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(OriginPostQuantumEncryptionGetResponse, origin_post_quantum_encryption, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_post_quantum_encryption.with_raw_response.get( @@ -94,7 +92,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: origin_post_quantum_encryption = response.parse() assert_matches_type(OriginPostQuantumEncryptionGetResponse, origin_post_quantum_encryption, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_post_quantum_encryption.with_streaming_response.get( @@ -110,7 +108,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -122,7 +120,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginPostQuantumEncryption: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: origin_post_quantum_encryption = await async_client.origin_post_quantum_encryption.update( @@ -133,7 +131,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: OriginPostQuantumEncryptionUpdateResponse, origin_post_quantum_encryption, path=["response"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_post_quantum_encryption.with_raw_response.update( @@ -148,7 +146,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: OriginPostQuantumEncryptionUpdateResponse, origin_post_quantum_encryption, path=["response"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_post_quantum_encryption.with_streaming_response.update( @@ -165,7 +163,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -174,7 +172,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: value="preferred", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: origin_post_quantum_encryption = await async_client.origin_post_quantum_encryption.get( @@ -182,7 +180,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(OriginPostQuantumEncryptionGetResponse, origin_post_quantum_encryption, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_post_quantum_encryption.with_raw_response.get( @@ -194,7 +192,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: origin_post_quantum_encryption = await response.parse() assert_matches_type(OriginPostQuantumEncryptionGetResponse, origin_post_quantum_encryption, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_post_quantum_encryption.with_streaming_response.get( @@ -210,7 +208,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_origin_tls_client_auth.py b/tests/api_resources/test_origin_tls_client_auth.py index 7e98d804bb6..cd43e2ee233 100644 --- a/tests/api_resources/test_origin_tls_client_auth.py +++ b/tests/api_resources/test_origin_tls_client_auth.py @@ -3,19 +3,17 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.origin_tls_client_auth.zone_authenticated_origin_pull import ZoneAuthenticatedOriginPull -from cloudflare.types.origin_tls_client_auth.origin_tls_client_auth_get_response import OriginTLSClientAuthGetResponse -from cloudflare.types.origin_tls_client_auth.origin_tls_client_auth_create_response import ( +from cloudflare.types.origin_tls_client_auth import ( + ZoneAuthenticatedOriginPull, + OriginTLSClientAuthGetResponse, OriginTLSClientAuthCreateResponse, -) -from cloudflare.types.origin_tls_client_auth.origin_tls_client_auth_delete_response import ( OriginTLSClientAuthDeleteResponse, ) @@ -25,7 +23,6 @@ class TestOriginTLSClientAuth: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: origin_tls_client_auth = client.origin_tls_client_auth.create( @@ -33,9 +30,8 @@ def test_method_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(OriginTLSClientAuthCreateResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthCreateResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.with_raw_response.create( @@ -47,9 +43,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = response.parse() - assert_matches_type(OriginTLSClientAuthCreateResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthCreateResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.with_streaming_response.create( @@ -61,11 +56,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = response.parse() - assert_matches_type(OriginTLSClientAuthCreateResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthCreateResponse], origin_tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -75,7 +69,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: origin_tls_client_auth = client.origin_tls_client_auth.list( @@ -83,7 +76,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[ZoneAuthenticatedOriginPull], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.with_raw_response.list( @@ -95,7 +87,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: origin_tls_client_auth = response.parse() assert_matches_type(SyncSinglePage[ZoneAuthenticatedOriginPull], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.with_streaming_response.list( @@ -109,7 +100,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -117,73 +107,62 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: origin_tls_client_auth = client.origin_tls_client_auth.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(OriginTLSClientAuthDeleteResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = response.parse() - assert_matches_type(OriginTLSClientAuthDeleteResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = response.parse() - assert_matches_type(OriginTLSClientAuthDeleteResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.origin_tls_client_auth.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: origin_tls_client_auth = client.origin_tls_client_auth.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(OriginTLSClientAuthGetResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.with_raw_response.get( @@ -194,9 +173,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = response.parse() - assert_matches_type(OriginTLSClientAuthGetResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.with_streaming_response.get( @@ -207,11 +185,10 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = response.parse() - assert_matches_type(OriginTLSClientAuthGetResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -230,7 +207,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginTLSClientAuth: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await async_client.origin_tls_client_auth.create( @@ -238,9 +214,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(OriginTLSClientAuthCreateResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthCreateResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.with_raw_response.create( @@ -252,9 +227,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = await response.parse() - assert_matches_type(OriginTLSClientAuthCreateResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthCreateResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.with_streaming_response.create( @@ -266,11 +240,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = await response.parse() - assert_matches_type(OriginTLSClientAuthCreateResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthCreateResponse], origin_tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -280,7 +253,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await async_client.origin_tls_client_auth.list( @@ -288,7 +260,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[ZoneAuthenticatedOriginPull], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.with_raw_response.list( @@ -300,7 +271,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await response.parse() assert_matches_type(AsyncSinglePage[ZoneAuthenticatedOriginPull], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.with_streaming_response.list( @@ -314,7 +284,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -322,73 +291,62 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await async_client.origin_tls_client_auth.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - assert_matches_type(OriginTLSClientAuthDeleteResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = await response.parse() - assert_matches_type(OriginTLSClientAuthDeleteResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = await response.parse() - assert_matches_type(OriginTLSClientAuthDeleteResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await async_client.origin_tls_client_auth.get( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(OriginTLSClientAuthGetResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.with_raw_response.get( @@ -399,9 +357,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = await response.parse() - assert_matches_type(OriginTLSClientAuthGetResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.with_streaming_response.get( @@ -412,11 +369,10 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = await response.parse() - assert_matches_type(OriginTLSClientAuthGetResponse, origin_tls_client_auth, path=["response"]) + assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_page_shield.py b/tests/api_resources/test_page_shield.py index 49a129e9177..9e7112a8b9c 100644 --- a/tests/api_resources/test_page_shield.py +++ b/tests/api_resources/test_page_shield.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.page_shield.setting import Setting -from cloudflare.types.page_shield.page_shield_update_response import PageShieldUpdateResponse +from cloudflare.types.page_shield import Setting, PageShieldUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestPageShield: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: page_shield = client.page_shield.update( @@ -26,7 +24,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: page_shield = client.page_shield.update( @@ -37,7 +34,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.page_shield.with_raw_response.update( @@ -49,7 +45,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: page_shield = response.parse() assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.page_shield.with_streaming_response.update( @@ -63,7 +58,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -71,7 +65,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: page_shield = client.page_shield.get( @@ -79,7 +72,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Setting, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.with_raw_response.get( @@ -91,7 +83,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: page_shield = response.parse() assert_matches_type(Setting, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.with_streaming_response.get( @@ -105,7 +96,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -117,7 +107,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPageShield: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: page_shield = await async_client.page_shield.update( @@ -125,7 +114,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: page_shield = await async_client.page_shield.update( @@ -136,7 +124,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.with_raw_response.update( @@ -148,7 +135,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: page_shield = await response.parse() assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.with_streaming_response.update( @@ -162,7 +148,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -170,7 +155,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: page_shield = await async_client.page_shield.get( @@ -178,7 +162,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Setting, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.with_raw_response.get( @@ -190,7 +173,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: page_shield = await response.parse() assert_matches_type(Setting, page_shield, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.with_streaming_response.get( @@ -204,7 +186,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_pagerules.py b/tests/api_resources/test_pagerules.py index 6e18728f43e..fbc26716f3e 100644 --- a/tests/api_resources/test_pagerules.py +++ b/tests/api_resources/test_pagerules.py @@ -9,12 +9,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.pagerules.pagerule_get_response import PageruleGetResponse -from cloudflare.types.pagerules.pagerule_edit_response import PageruleEditResponse -from cloudflare.types.pagerules.pagerule_list_response import PageruleListResponse -from cloudflare.types.pagerules.pagerule_create_response import PageruleCreateResponse -from cloudflare.types.pagerules.pagerule_delete_response import PageruleDeleteResponse -from cloudflare.types.pagerules.pagerule_update_response import PageruleUpdateResponse +from cloudflare.types.pagerules import ( + PageruleGetResponse, + PageruleEditResponse, + PageruleListResponse, + PageruleCreateResponse, + PageruleDeleteResponse, + PageruleUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,12 +24,11 @@ class TestPagerules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: pagerule = client.pagerules.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -40,7 +41,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(PageruleCreateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: pagerule = client.pagerules.create( @@ -52,7 +52,21 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], targets=[ { @@ -68,12 +82,11 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PageruleCreateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pagerules.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -90,12 +103,11 @@ def test_raw_response_create(self, client: Cloudflare) -> None: pagerule = response.parse() assert_matches_type(PageruleCreateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pagerules.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -114,13 +126,12 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.create( zone_id="", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -132,13 +143,12 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: pagerule = client.pagerules.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -151,7 +161,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(PageruleUpdateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: pagerule = client.pagerules.update( @@ -164,7 +173,21 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], targets=[ { @@ -180,13 +203,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PageruleUpdateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.pagerules.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -203,13 +225,12 @@ def test_raw_response_update(self, client: Cloudflare) -> None: pagerule = response.parse() assert_matches_type(PageruleUpdateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.pagerules.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -228,14 +249,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -251,7 +271,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.pagerules.with_raw_response.update( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -263,7 +283,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: pagerule = client.pagerules.list( @@ -271,7 +290,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(PageruleListResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: pagerule = client.pagerules.list( @@ -283,7 +301,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PageruleListResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pagerules.with_raw_response.list( @@ -295,7 +312,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: pagerule = response.parse() assert_matches_type(PageruleListResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pagerules.with_streaming_response.list( @@ -309,7 +325,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -317,23 +332,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: pagerule = client.pagerules.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[PageruleDeleteResponse], pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pagerules.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -341,13 +352,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: pagerule = response.parse() assert_matches_type(Optional[PageruleDeleteResponse], pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pagerules.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -357,24 +366,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): client.pagerules.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: pagerule = client.pagerules.edit( @@ -383,7 +388,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(PageruleEditResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: pagerule = client.pagerules.edit( @@ -396,7 +400,21 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], priority=0, status="active", @@ -412,7 +430,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PageruleEditResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.pagerules.with_raw_response.edit( @@ -425,7 +442,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: pagerule = response.parse() assert_matches_type(PageruleEditResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.pagerules.with_streaming_response.edit( @@ -440,7 +456,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -455,7 +470,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: pagerule = client.pagerules.get( @@ -464,7 +478,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(PageruleGetResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pagerules.with_raw_response.get( @@ -477,7 +490,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: pagerule = response.parse() assert_matches_type(PageruleGetResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pagerules.with_streaming_response.get( @@ -492,7 +504,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -511,12 +522,11 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPagerules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -529,7 +539,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PageruleCreateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.create( @@ -541,7 +550,21 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], targets=[ { @@ -557,12 +580,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(PageruleCreateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.pagerules.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -579,12 +601,11 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: pagerule = await response.parse() assert_matches_type(PageruleCreateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.pagerules.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -603,13 +624,12 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.create( zone_id="", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -621,13 +641,12 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -640,7 +659,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PageruleUpdateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.update( @@ -653,7 +671,21 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], targets=[ { @@ -669,13 +701,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(PageruleUpdateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.pagerules.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -692,13 +723,12 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: pagerule = await response.parse() assert_matches_type(PageruleUpdateResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.pagerules.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -717,14 +747,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -740,7 +769,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.pagerules.with_raw_response.update( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -752,7 +781,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.list( @@ -760,7 +788,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PageruleListResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.list( @@ -772,7 +799,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(PageruleListResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pagerules.with_raw_response.list( @@ -784,7 +810,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: pagerule = await response.parse() assert_matches_type(PageruleListResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pagerules.with_streaming_response.list( @@ -798,7 +823,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -806,23 +830,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[PageruleDeleteResponse], pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pagerules.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -830,13 +850,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: pagerule = await response.parse() assert_matches_type(Optional[PageruleDeleteResponse], pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pagerules.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -846,24 +864,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): await async_client.pagerules.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.edit( @@ -872,7 +886,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PageruleEditResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.edit( @@ -885,7 +898,21 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], priority=0, status="active", @@ -901,7 +928,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(PageruleEditResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.pagerules.with_raw_response.edit( @@ -914,7 +940,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: pagerule = await response.parse() assert_matches_type(PageruleEditResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.pagerules.with_streaming_response.edit( @@ -929,7 +954,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -944,7 +968,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.get( @@ -953,7 +976,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PageruleGetResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pagerules.with_raw_response.get( @@ -966,7 +988,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: pagerule = await response.parse() assert_matches_type(PageruleGetResponse, pagerule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pagerules.with_streaming_response.get( @@ -981,7 +1002,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_pcaps.py b/tests/api_resources/test_pcaps.py index 13dd094bf71..c290dfd9e3e 100644 --- a/tests/api_resources/test_pcaps.py +++ b/tests/api_resources/test_pcaps.py @@ -10,9 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.pcaps.pcap_get_response import PCAPGetResponse -from cloudflare.types.pcaps.pcap_list_response import PCAPListResponse -from cloudflare.types.pcaps.pcap_create_response import PCAPCreateResponse +from cloudflare.types.pcaps import PCAPGetResponse, PCAPListResponse, PCAPCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +18,6 @@ class TestPCAPs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: pcap = client.pcaps.create( @@ -32,7 +29,6 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: pcap = client.pcaps.create( @@ -51,7 +47,6 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.pcaps.with_raw_response.create( @@ -67,7 +62,6 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: pcap = response.parse() assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.pcaps.with_streaming_response.create( @@ -85,7 +79,6 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -97,7 +90,6 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: type="simple", ) - @pytest.mark.skip() @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: pcap = client.pcaps.create( @@ -110,7 +102,6 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: pcap = client.pcaps.create( @@ -132,7 +123,6 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.pcaps.with_raw_response.create( @@ -149,7 +139,6 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: pcap = response.parse() assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.pcaps.with_streaming_response.create( @@ -168,7 +157,6 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -181,7 +169,6 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: type="simple", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: pcap = client.pcaps.list( @@ -189,7 +176,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[PCAPListResponse], pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pcaps.with_raw_response.list( @@ -201,7 +187,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: pcap = response.parse() assert_matches_type(SyncSinglePage[PCAPListResponse], pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pcaps.with_streaming_response.list( @@ -215,7 +200,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -223,7 +207,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: pcap = client.pcaps.get( @@ -232,7 +215,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(PCAPGetResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pcaps.with_raw_response.get( @@ -245,7 +227,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: pcap = response.parse() assert_matches_type(PCAPGetResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pcaps.with_streaming_response.get( @@ -260,7 +241,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -279,7 +259,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPCAPs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: pcap = await async_client.pcaps.create( @@ -291,7 +270,6 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: pcap = await async_client.pcaps.create( @@ -310,7 +288,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.with_raw_response.create( @@ -326,7 +303,6 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar pcap = await response.parse() assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.with_streaming_response.create( @@ -344,7 +320,6 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -356,7 +331,6 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare type="simple", ) - @pytest.mark.skip() @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: pcap = await async_client.pcaps.create( @@ -369,7 +343,6 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: pcap = await async_client.pcaps.create( @@ -391,7 +364,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.with_raw_response.create( @@ -408,7 +380,6 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar pcap = await response.parse() assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.with_streaming_response.create( @@ -427,7 +398,6 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -440,7 +410,6 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare type="simple", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: pcap = await async_client.pcaps.list( @@ -448,7 +417,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[PCAPListResponse], pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.with_raw_response.list( @@ -460,7 +428,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: pcap = await response.parse() assert_matches_type(AsyncSinglePage[PCAPListResponse], pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.with_streaming_response.list( @@ -474,7 +441,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -482,7 +448,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: pcap = await async_client.pcaps.get( @@ -491,7 +456,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PCAPGetResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.with_raw_response.get( @@ -504,7 +468,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: pcap = await response.parse() assert_matches_type(PCAPGetResponse, pcap, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.with_streaming_response.get( @@ -519,7 +482,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 48423bb43e1..46cabad8fde 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.plans.available_rate_plan import AvailableRatePlan +from cloudflare.types.plans import AvailableRatePlan base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestPlans: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: plan = client.plans.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[AvailableRatePlan], plan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.plans.with_raw_response.list( @@ -38,7 +36,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: plan = response.parse() assert_matches_type(SyncSinglePage[AvailableRatePlan], plan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.plans.with_streaming_response.list( @@ -52,7 +49,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -60,7 +56,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: plan = client.plans.get( @@ -69,7 +64,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(AvailableRatePlan, plan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.plans.with_raw_response.get( @@ -82,7 +76,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: plan = response.parse() assert_matches_type(AvailableRatePlan, plan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.plans.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -116,7 +108,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPlans: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: plan = await async_client.plans.list( @@ -124,7 +115,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[AvailableRatePlan], plan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.plans.with_raw_response.list( @@ -136,7 +126,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: plan = await response.parse() assert_matches_type(AsyncSinglePage[AvailableRatePlan], plan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.plans.with_streaming_response.list( @@ -150,7 +139,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -158,7 +146,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: plan = await async_client.plans.get( @@ -167,7 +154,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AvailableRatePlan, plan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.plans.with_raw_response.get( @@ -180,7 +166,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: plan = await response.parse() assert_matches_type(AvailableRatePlan, plan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.plans.with_streaming_response.get( @@ -195,7 +180,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/test_queues.py b/tests/api_resources/test_queues.py index 6080c4a15dd..4cb9c1c38c2 100644 --- a/tests/api_resources/test_queues.py +++ b/tests/api_resources/test_queues.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.queues.queue import Queue -from cloudflare.types.queues.queue_created import QueueCreated -from cloudflare.types.queues.queue_updated import QueueUpdated -from cloudflare.types.queues.queue_delete_response import QueueDeleteResponse +from cloudflare.types.queues import ( + Queue, + QueueCreated, + QueueUpdated, + QueueDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestQueues: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: queue = client.queues.create( @@ -30,7 +31,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[QueueCreated], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.create( @@ -43,7 +43,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: queue = response.parse() assert_matches_type(Optional[QueueCreated], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.create( @@ -58,7 +57,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -67,7 +65,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={"queue_name": "example-queue"}, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: queue = client.queues.update( @@ -77,7 +74,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[QueueUpdated], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.update( @@ -91,7 +87,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: queue = response.parse() assert_matches_type(Optional[QueueUpdated], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.update( @@ -107,7 +102,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -124,7 +118,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={"queue_name": "renamed-example-queue"}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: queue = client.queues.list( @@ -132,7 +125,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Queue], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.list( @@ -144,7 +136,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: queue = response.parse() assert_matches_type(SyncSinglePage[Queue], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.list( @@ -158,7 +149,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -166,23 +156,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: queue = client.queues.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[QueueDeleteResponse], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -190,13 +176,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: queue = response.parse() assert_matches_type(Optional[QueueDeleteResponse], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -206,24 +190,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: queue = client.queues.get( @@ -232,7 +212,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Queue], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.get( @@ -245,7 +224,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: queue = response.parse() assert_matches_type(Optional[Queue], queue, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.get( @@ -260,7 +238,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -279,7 +256,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQueues: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.create( @@ -288,7 +264,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[QueueCreated], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.create( @@ -301,7 +276,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: queue = await response.parse() assert_matches_type(Optional[QueueCreated], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.create( @@ -316,7 +290,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -325,7 +298,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={"queue_name": "example-queue"}, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.update( @@ -335,7 +307,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[QueueUpdated], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.update( @@ -349,7 +320,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: queue = await response.parse() assert_matches_type(Optional[QueueUpdated], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.update( @@ -365,7 +335,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -382,7 +351,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={"queue_name": "renamed-example-queue"}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.list( @@ -390,7 +358,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Queue], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.list( @@ -402,7 +369,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: queue = await response.parse() assert_matches_type(AsyncSinglePage[Queue], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.list( @@ -416,7 +382,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -424,23 +389,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[QueueDeleteResponse], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -448,13 +409,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: queue = await response.parse() assert_matches_type(Optional[QueueDeleteResponse], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -464,24 +423,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.get( @@ -490,7 +445,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Queue], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.get( @@ -503,7 +457,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: queue = await response.parse() assert_matches_type(Optional[Queue], queue, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.get( @@ -518,7 +471,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_rate_limits.py b/tests/api_resources/test_rate_limits.py index 1b462297bb4..2a58e6b8e02 100644 --- a/tests/api_resources/test_rate_limits.py +++ b/tests/api_resources/test_rate_limits.py @@ -10,11 +10,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.rate_limits.rate_limit import RateLimit -from cloudflare.types.rate_limits.rate_limit_get_response import RateLimitGetResponse -from cloudflare.types.rate_limits.rate_limit_edit_response import RateLimitEditResponse -from cloudflare.types.rate_limits.rate_limit_create_response import RateLimitCreateResponse -from cloudflare.types.rate_limits.rate_limit_delete_response import RateLimitDeleteResponse +from cloudflare.types.rate_limits import ( + RateLimit, + RateLimitGetResponse, + RateLimitEditResponse, + RateLimitCreateResponse, + RateLimitDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,7 @@ class TestRateLimits: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: rate_limit = client.rate_limits.create( @@ -31,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(RateLimitCreateResponse, rate_limit, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rate_limits.with_raw_response.create( @@ -44,7 +46,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: rate_limit = response.parse() assert_matches_type(RateLimitCreateResponse, rate_limit, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rate_limits.with_streaming_response.create( @@ -59,7 +61,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -68,7 +70,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: rate_limit = client.rate_limits.list( @@ -76,7 +77,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: rate_limit = client.rate_limits.list( @@ -86,7 +86,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rate_limits.with_raw_response.list( @@ -98,7 +97,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: rate_limit = response.parse() assert_matches_type(SyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rate_limits.with_streaming_response.list( @@ -112,7 +110,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -120,23 +117,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: rate_limit = client.rate_limits.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(RateLimitDeleteResponse, rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rate_limits.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -144,13 +137,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: rate_limit = response.parse() assert_matches_type(RateLimitDeleteResponse, rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rate_limits.with_streaming_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -160,24 +151,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.rate_limits.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: rate_limit = client.rate_limits.edit( @@ -187,7 +175,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(RateLimitEditResponse, rate_limit, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.rate_limits.with_raw_response.edit( @@ -201,7 +189,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: rate_limit = response.parse() assert_matches_type(RateLimitEditResponse, rate_limit, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.rate_limits.with_streaming_response.edit( @@ -217,7 +205,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -234,7 +222,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: rate_limit = client.rate_limits.get( @@ -243,7 +230,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(RateLimitGetResponse, rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rate_limits.with_raw_response.get( @@ -256,7 +242,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: rate_limit = response.parse() assert_matches_type(RateLimitGetResponse, rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rate_limits.with_streaming_response.get( @@ -271,7 +256,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -290,7 +274,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRateLimits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rate_limit = await async_client.rate_limits.create( @@ -299,7 +283,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RateLimitCreateResponse, rate_limit, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rate_limits.with_raw_response.create( @@ -312,7 +296,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: rate_limit = await response.parse() assert_matches_type(RateLimitCreateResponse, rate_limit, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rate_limits.with_streaming_response.create( @@ -327,7 +311,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -336,7 +320,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rate_limit = await async_client.rate_limits.list( @@ -344,7 +327,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: rate_limit = await async_client.rate_limits.list( @@ -354,7 +336,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rate_limits.with_raw_response.list( @@ -366,7 +347,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: rate_limit = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rate_limits.with_streaming_response.list( @@ -380,7 +360,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -388,23 +367,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rate_limit = await async_client.rate_limits.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(RateLimitDeleteResponse, rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rate_limits.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -412,13 +387,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: rate_limit = await response.parse() assert_matches_type(RateLimitDeleteResponse, rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rate_limits.with_streaming_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -428,24 +401,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.delete( "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.rate_limits.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rate_limit = await async_client.rate_limits.edit( @@ -455,7 +425,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RateLimitEditResponse, rate_limit, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.rate_limits.with_raw_response.edit( @@ -469,7 +439,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: rate_limit = await response.parse() assert_matches_type(RateLimitEditResponse, rate_limit, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.rate_limits.with_streaming_response.edit( @@ -485,7 +455,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -502,7 +472,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rate_limit = await async_client.rate_limits.get( @@ -511,7 +480,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RateLimitGetResponse, rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rate_limits.with_raw_response.get( @@ -524,7 +492,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: rate_limit = await response.parse() assert_matches_type(RateLimitGetResponse, rate_limit, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rate_limits.with_streaming_response.get( @@ -539,7 +506,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/test_rate_plans.py b/tests/api_resources/test_rate_plans.py index 23955bcb03f..8a555f178d7 100644 --- a/tests/api_resources/test_rate_plans.py +++ b/tests/api_resources/test_rate_plans.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rate_plans.rate_plan_get_response import RatePlanGetResponse +from cloudflare.types.rate_plans import RatePlanGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestRatePlans: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: rate_plan = client.rate_plans.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rate_plans.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: rate_plan = response.parse() assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rate_plans.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRatePlans: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rate_plan = await async_client.rate_plans.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rate_plans.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: rate_plan = await response.parse() assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rate_plans.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/test_rulesets.py b/tests/api_resources/test_rulesets.py index b949d47af75..ae2f1c54dc7 100644 --- a/tests/api_resources/test_rulesets.py +++ b/tests/api_resources/test_rulesets.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.rulesets.ruleset import Ruleset -from cloudflare.types.rulesets.ruleset_get_response import RulesetGetResponse -from cloudflare.types.rulesets.ruleset_create_response import RulesetCreateResponse -from cloudflare.types.rulesets.ruleset_update_response import RulesetUpdateResponse +from cloudflare.types.rulesets import ( + Ruleset, + RulesetGetResponse, + RulesetCreateResponse, + RulesetUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,7 @@ class TestRulesets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: ruleset = client.rulesets.create( @@ -30,11 +32,10 @@ def test_method_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.create( @@ -92,12 +93,11 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.create( @@ -106,7 +106,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -114,7 +113,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ruleset = response.parse() assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.create( @@ -123,7 +122,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -133,7 +131,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -143,7 +141,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -153,21 +150,19 @@ def test_path_params_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: ruleset = client.rulesets.update( "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.update( @@ -223,7 +218,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -231,14 +225,13 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.update( "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -246,14 +239,13 @@ def test_raw_response_update(self, client: Cloudflare) -> None: ruleset = response.parse() assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.update( "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -263,7 +255,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -271,7 +263,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -279,7 +270,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -287,33 +277,29 @@ def test_path_params_update(self, client: Cloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: ruleset = client.rulesets.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -321,12 +307,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: ruleset = response.parse() assert_matches_type(SyncSinglePage[Ruleset], ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -336,48 +321,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: ruleset = client.rulesets.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert ruleset is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert ruleset is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -385,13 +365,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: ruleset = response.parse() assert ruleset is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -401,57 +380,51 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: ruleset = client.rulesets.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -459,13 +432,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ruleset = response.parse() assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -475,35 +447,32 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.get( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) class TestAsyncRulesets: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.create( @@ -512,11 +481,10 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.create( @@ -574,12 +542,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.create( @@ -588,7 +555,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -596,7 +562,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ruleset = await response.parse() assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.create( @@ -605,7 +571,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -615,7 +580,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -625,7 +590,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -635,21 +599,19 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.update( "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.update( @@ -705,7 +667,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -713,14 +674,13 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.update( "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -728,14 +688,13 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: ruleset = await response.parse() assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.update( "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -745,7 +704,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): @@ -753,7 +712,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -761,7 +719,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -769,33 +726,29 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -803,12 +756,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: ruleset = await response.parse() assert_matches_type(AsyncSinglePage[Ruleset], ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -818,48 +770,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert ruleset is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert ruleset is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -867,13 +814,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: ruleset = await response.parse() assert ruleset is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -883,57 +829,51 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.with_raw_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -941,13 +881,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ruleset = await response.parse() assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -957,26 +896,23 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.with_raw_response.get( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/test_snippets.py b/tests/api_resources/test_snippets.py index 687cda032c0..cad43decc6a 100644 --- a/tests/api_resources/test_snippets.py +++ b/tests/api_resources/test_snippets.py @@ -3,15 +3,14 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.snippets.snippet import Snippet -from cloudflare.types.snippets.snippet_delete_response import SnippetDeleteResponse +from cloudflare.types.snippets import Snippet, SnippetDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,82 +18,80 @@ class TestSnippets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize def test_method_update(self, client: Cloudflare) -> None: snippet = client.snippets.update( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: snippet = client.snippets.update( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", files="export { async function fetch(request, env) {return new Response('some_response') } }", metadata={"main_module": "main.js"}, ) - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.update( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.update( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.update( "snippet_name_01", - zone_identifier="", + zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.update( "", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: snippet = client.snippets.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -102,11 +99,10 @@ def test_raw_response_list(self, client: Cloudflare) -> None: snippet = response.parse() assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -116,29 +112,26 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.list( - "", + zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: snippet = client.snippets.delete( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.delete( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -146,12 +139,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: snippet = response.parse() assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.delete( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,153 +153,146 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.delete( "snippet_name_01", - zone_identifier="", + zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.delete( "", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: snippet = client.snippets.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.get( "snippet_name_01", - zone_identifier="", + zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.get( "", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) class TestAsyncSnippets: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.update( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.update( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", files="export { async function fetch(request, env) {return new Response('some_response') } }", metadata={"main_module": "main.js"}, ) - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.update( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.update( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="throwing HTTP 415") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.update( "snippet_name_01", - zone_identifier="", + zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.update( "", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -315,11 +300,10 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: snippet = await response.parse() assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -329,29 +313,26 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.list( - "", + zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.delete( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.delete( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -359,12 +340,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: snippet = await response.parse() assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.delete( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -374,69 +354,64 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.delete( "snippet_name_01", - zone_identifier="", + zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.delete( "", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.get( "snippet_name_01", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(Snippet, snippet, path=["response"]) + assert_matches_type(Optional[Snippet], snippet, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.get( "snippet_name_01", - zone_identifier="", + zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.get( "", - zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_speed.py b/tests/api_resources/test_speed.py deleted file mode 100644 index 219140f913c..00000000000 --- a/tests/api_resources/test_speed.py +++ /dev/null @@ -1,457 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare._utils import parse_datetime -from cloudflare.types.speed.trend import Trend -from cloudflare.types.speed.schedule import Schedule -from cloudflare.types.speed.speed_delete_response import SpeedDeleteResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSpeed: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip() - @parametrize - def test_method_delete(self, client: Cloudflare) -> None: - speed = client.speed.delete( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SpeedDeleteResponse], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_delete_with_all_params(self, client: Cloudflare) -> None: - speed = client.speed.delete( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - region="us-central1", - ) - assert_matches_type(Optional[SpeedDeleteResponse], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_delete(self, client: Cloudflare) -> None: - response = client.speed.with_raw_response.delete( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - speed = response.parse() - assert_matches_type(Optional[SpeedDeleteResponse], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_delete(self, client: Cloudflare) -> None: - with client.speed.with_streaming_response.delete( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - speed = response.parse() - assert_matches_type(Optional[SpeedDeleteResponse], speed, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_delete(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.speed.with_raw_response.delete( - "example.com", - zone_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - client.speed.with_raw_response.delete( - "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @pytest.mark.skip() - @parametrize - def test_method_schedule_get(self, client: Cloudflare) -> None: - speed = client.speed.schedule_get( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Schedule], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_schedule_get_with_all_params(self, client: Cloudflare) -> None: - speed = client.speed.schedule_get( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - region="us-central1", - ) - assert_matches_type(Optional[Schedule], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_schedule_get(self, client: Cloudflare) -> None: - response = client.speed.with_raw_response.schedule_get( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - speed = response.parse() - assert_matches_type(Optional[Schedule], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_schedule_get(self, client: Cloudflare) -> None: - with client.speed.with_streaming_response.schedule_get( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - speed = response.parse() - assert_matches_type(Optional[Schedule], speed, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_schedule_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.speed.with_raw_response.schedule_get( - "example.com", - zone_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - client.speed.with_raw_response.schedule_get( - "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @pytest.mark.skip() - @parametrize - def test_method_trends_list(self, client: Cloudflare) -> None: - speed = client.speed.trends_list( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) - assert_matches_type(Optional[Trend], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_trends_list_with_all_params(self, client: Cloudflare) -> None: - speed = client.speed.trends_list( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - end=parse_datetime("2014-01-01T05:20:00.12345Z"), - ) - assert_matches_type(Optional[Trend], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_trends_list(self, client: Cloudflare) -> None: - response = client.speed.with_raw_response.trends_list( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - speed = response.parse() - assert_matches_type(Optional[Trend], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_trends_list(self, client: Cloudflare) -> None: - with client.speed.with_streaming_response.trends_list( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - speed = response.parse() - assert_matches_type(Optional[Trend], speed, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_trends_list(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.speed.with_raw_response.trends_list( - "example.com", - zone_id="", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - client.speed.with_raw_response.trends_list( - "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) - - -class TestAsyncSpeed: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip() - @parametrize - async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - speed = await async_client.speed.delete( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SpeedDeleteResponse], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: - speed = await async_client.speed.delete( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - region="us-central1", - ) - assert_matches_type(Optional[SpeedDeleteResponse], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: - response = await async_client.speed.with_raw_response.delete( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - speed = await response.parse() - assert_matches_type(Optional[SpeedDeleteResponse], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: - async with async_client.speed.with_streaming_response.delete( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - speed = await response.parse() - assert_matches_type(Optional[SpeedDeleteResponse], speed, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.speed.with_raw_response.delete( - "example.com", - zone_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - await async_client.speed.with_raw_response.delete( - "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @pytest.mark.skip() - @parametrize - async def test_method_schedule_get(self, async_client: AsyncCloudflare) -> None: - speed = await async_client.speed.schedule_get( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Schedule], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_schedule_get_with_all_params(self, async_client: AsyncCloudflare) -> None: - speed = await async_client.speed.schedule_get( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - region="us-central1", - ) - assert_matches_type(Optional[Schedule], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_schedule_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.speed.with_raw_response.schedule_get( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - speed = await response.parse() - assert_matches_type(Optional[Schedule], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_schedule_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.speed.with_streaming_response.schedule_get( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - speed = await response.parse() - assert_matches_type(Optional[Schedule], speed, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_schedule_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.speed.with_raw_response.schedule_get( - "example.com", - zone_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - await async_client.speed.with_raw_response.schedule_get( - "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @pytest.mark.skip() - @parametrize - async def test_method_trends_list(self, async_client: AsyncCloudflare) -> None: - speed = await async_client.speed.trends_list( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) - assert_matches_type(Optional[Trend], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_trends_list_with_all_params(self, async_client: AsyncCloudflare) -> None: - speed = await async_client.speed.trends_list( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - end=parse_datetime("2014-01-01T05:20:00.12345Z"), - ) - assert_matches_type(Optional[Trend], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_trends_list(self, async_client: AsyncCloudflare) -> None: - response = await async_client.speed.with_raw_response.trends_list( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - speed = await response.parse() - assert_matches_type(Optional[Trend], speed, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_trends_list(self, async_client: AsyncCloudflare) -> None: - async with async_client.speed.with_streaming_response.trends_list( - "example.com", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - speed = await response.parse() - assert_matches_type(Optional[Trend], speed, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_trends_list(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.speed.with_raw_response.trends_list( - "example.com", - zone_id="", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): - await async_client.speed.with_raw_response.trends_list( - "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - device_type="DESKTOP", - metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", - region="us-central1", - start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", - ) diff --git a/tests/api_resources/test_stream.py b/tests/api_resources/test_stream.py index df25de66aae..ee6f6fbfc80 100644 --- a/tests/api_resources/test_stream.py +++ b/tests/api_resources/test_stream.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.stream.video import Video +from cloudflare.types.stream import Video base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +19,7 @@ class TestStream: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: stream = client.stream.create( @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert stream is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.with_raw_response.create( @@ -41,7 +41,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: stream = response.parse() assert stream is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.with_streaming_response.create( @@ -56,7 +56,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -65,7 +65,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: stream = client.stream.list( @@ -73,7 +72,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: stream = client.stream.list( @@ -89,7 +87,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.stream.with_raw_response.list( @@ -101,7 +98,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: stream = response.parse() assert_matches_type(SyncSinglePage[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.stream.with_streaming_response.list( @@ -115,7 +111,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -123,23 +118,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: stream = client.stream.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert stream is None - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -147,13 +138,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: stream = response.parse() assert stream is None - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.with_streaming_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -163,24 +152,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: stream = client.stream.get( @@ -189,7 +174,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.with_raw_response.get( @@ -202,7 +186,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: stream = response.parse() assert_matches_type(Optional[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.with_streaming_response.get( @@ -217,7 +200,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -236,7 +218,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStream: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.create( @@ -245,7 +227,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert stream is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.with_raw_response.create( @@ -258,7 +240,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: stream = await response.parse() assert stream is None - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.with_streaming_response.create( @@ -273,7 +255,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -282,7 +264,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.list( @@ -290,7 +271,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.list( @@ -306,7 +286,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.with_raw_response.list( @@ -318,7 +297,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: stream = await response.parse() assert_matches_type(AsyncSinglePage[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.with_streaming_response.list( @@ -332,7 +310,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -340,23 +317,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert stream is None - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -364,13 +337,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: stream = await response.parse() assert stream is None - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.with_streaming_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -380,24 +351,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.with_raw_response.delete( "ea95132c15732412d22c1476fa83f27a", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.get( @@ -406,7 +373,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.with_raw_response.get( @@ -419,7 +385,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: stream = await response.parse() assert_matches_type(Optional[Video], stream, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.with_streaming_response.get( @@ -434,7 +399,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index d0d2c1d2eb1..7f4f56f32cf 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -10,11 +10,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.user.subscription import Subscription -from cloudflare.types.subscriptions.subscription_get_response import SubscriptionGetResponse -from cloudflare.types.subscriptions.subscription_create_response import SubscriptionCreateResponse -from cloudflare.types.subscriptions.subscription_delete_response import SubscriptionDeleteResponse -from cloudflare.types.subscriptions.subscription_update_response import SubscriptionUpdateResponse +from cloudflare.types.user import Subscription +from cloudflare.types.subscriptions import ( + SubscriptionGetResponse, + SubscriptionCreateResponse, + SubscriptionDeleteResponse, + SubscriptionUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,6 @@ class TestSubscriptions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: subscription = client.subscriptions.create( @@ -30,7 +31,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: subscription = client.subscriptions.create( @@ -70,7 +70,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.create( @@ -82,7 +81,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.create( @@ -96,7 +94,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -104,7 +101,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: subscription = client.subscriptions.update( @@ -113,7 +109,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: subscription = client.subscriptions.update( @@ -154,7 +149,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.update( @@ -167,7 +161,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.update( @@ -182,7 +175,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -199,7 +191,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: subscription = client.subscriptions.list( @@ -207,7 +198,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Subscription], subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.list( @@ -219,7 +209,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SyncSinglePage[Subscription], subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.list( @@ -233,7 +222,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -241,23 +229,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: subscription = client.subscriptions.delete( "506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -265,13 +249,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -281,14 +263,12 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.subscriptions.with_raw_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", - body={}, ) with pytest.raises( @@ -297,10 +277,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.subscriptions.with_raw_response.delete( "", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: subscription = client.subscriptions.get( @@ -308,7 +286,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionGetResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.get( @@ -320,7 +297,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SubscriptionGetResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.get( @@ -334,7 +310,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -346,7 +321,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubscriptions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.create( @@ -354,7 +328,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.create( @@ -394,7 +367,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.create( @@ -406,7 +378,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.create( @@ -420,7 +391,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -428,7 +398,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.update( @@ -437,7 +406,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.update( @@ -478,7 +446,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.update( @@ -491,7 +458,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.update( @@ -506,7 +472,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -523,7 +488,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.list( @@ -531,7 +495,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Subscription], subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.list( @@ -543,7 +506,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(AsyncSinglePage[Subscription], subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.list( @@ -557,7 +519,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -565,23 +526,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.delete( "506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -589,13 +546,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -605,14 +560,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.subscriptions.with_raw_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", - body={}, ) with pytest.raises( @@ -621,10 +574,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.subscriptions.with_raw_response.delete( "", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.get( @@ -632,7 +583,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SubscriptionGetResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.get( @@ -644,7 +594,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(SubscriptionGetResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.get( @@ -658,7 +607,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/test_url_normalization.py b/tests/api_resources/test_url_normalization.py index fb9e08f1bc5..bd0ad470a31 100644 --- a/tests/api_resources/test_url_normalization.py +++ b/tests/api_resources/test_url_normalization.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.url_normalization.url_normalization_get_response import URLNormalizationGetResponse -from cloudflare.types.url_normalization.url_normalization_update_response import URLNormalizationUpdateResponse +from cloudflare.types.url_normalization import ( + URLNormalizationGetResponse, + URLNormalizationUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestURLNormalization: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: url_normalization = client.url_normalization.update( @@ -26,7 +27,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(URLNormalizationUpdateResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: url_normalization = client.url_normalization.update( @@ -36,7 +36,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(URLNormalizationUpdateResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.url_normalization.with_raw_response.update( @@ -48,7 +47,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: url_normalization = response.parse() assert_matches_type(URLNormalizationUpdateResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.url_normalization.with_streaming_response.update( @@ -62,7 +60,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -70,7 +67,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: url_normalization = client.url_normalization.get( @@ -78,7 +74,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(URLNormalizationGetResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.url_normalization.with_raw_response.get( @@ -90,7 +85,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: url_normalization = response.parse() assert_matches_type(URLNormalizationGetResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.url_normalization.with_streaming_response.get( @@ -104,7 +98,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -116,7 +109,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncURLNormalization: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: url_normalization = await async_client.url_normalization.update( @@ -124,7 +116,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(URLNormalizationUpdateResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: url_normalization = await async_client.url_normalization.update( @@ -134,7 +125,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(URLNormalizationUpdateResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_normalization.with_raw_response.update( @@ -146,7 +136,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: url_normalization = await response.parse() assert_matches_type(URLNormalizationUpdateResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.url_normalization.with_streaming_response.update( @@ -160,7 +149,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -168,7 +156,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: url_normalization = await async_client.url_normalization.get( @@ -176,7 +163,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(URLNormalizationGetResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_normalization.with_raw_response.get( @@ -188,7 +174,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: url_normalization = await response.parse() assert_matches_type(URLNormalizationGetResponse, url_normalization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.url_normalization.with_streaming_response.get( @@ -202,7 +187,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_url_scanner.py b/tests/api_resources/test_url_scanner.py index 2c9ca0c4e1c..99393bd91ce 100644 --- a/tests/api_resources/test_url_scanner.py +++ b/tests/api_resources/test_url_scanner.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.url_scanner.url_scanner_scan_response import URLScannerScanResponse +from cloudflare.types.url_scanner import URLScannerScanResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestURLScanner: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_scan(self, client: Cloudflare) -> None: url_scanner = client.url_scanner.scan( @@ -26,7 +25,6 @@ def test_method_scan(self, client: Cloudflare) -> None: ) assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_scan_with_all_params(self, client: Cloudflare) -> None: url_scanner = client.url_scanner.scan( @@ -51,7 +49,6 @@ def test_method_scan_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_scan(self, client: Cloudflare) -> None: response = client.url_scanner.with_raw_response.scan( @@ -63,7 +60,6 @@ def test_raw_response_scan(self, client: Cloudflare) -> None: url_scanner = response.parse() assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_scan(self, client: Cloudflare) -> None: with client.url_scanner.with_streaming_response.scan( @@ -77,7 +73,6 @@ def test_streaming_response_scan(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_scan(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -89,7 +84,6 @@ def test_path_params_scan(self, client: Cloudflare) -> None: class TestAsyncURLScanner: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_scan(self, async_client: AsyncCloudflare) -> None: url_scanner = await async_client.url_scanner.scan( @@ -97,7 +91,6 @@ async def test_method_scan(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_scan_with_all_params(self, async_client: AsyncCloudflare) -> None: url_scanner = await async_client.url_scanner.scan( @@ -122,7 +115,6 @@ async def test_method_scan_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_scan(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.with_raw_response.scan( @@ -134,7 +126,6 @@ async def test_raw_response_scan(self, async_client: AsyncCloudflare) -> None: url_scanner = await response.parse() assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_scan(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.with_streaming_response.scan( @@ -148,7 +139,6 @@ async def test_streaming_response_scan(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_scan(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_user.py b/tests/api_resources/test_user.py index a0177d27b31..b8fc2776d01 100644 --- a/tests/api_resources/test_user.py +++ b/tests/api_resources/test_user.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.user.user_get_response import UserGetResponse -from cloudflare.types.user.user_edit_response import UserEditResponse +from cloudflare.types.user import UserGetResponse, UserEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,13 +17,11 @@ class TestUser: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: user = client.user.edit() assert_matches_type(UserEditResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: user = client.user.edit( @@ -36,7 +33,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(UserEditResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.user.with_raw_response.edit() @@ -46,7 +42,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: user = response.parse() assert_matches_type(UserEditResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.user.with_streaming_response.edit() as response: @@ -58,13 +53,11 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: user = client.user.get() assert_matches_type(UserGetResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.user.with_raw_response.get() @@ -74,7 +67,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: user = response.parse() assert_matches_type(UserGetResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.user.with_streaming_response.get() as response: @@ -90,13 +82,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncUser: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: user = await async_client.user.edit() assert_matches_type(UserEditResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: user = await async_client.user.edit( @@ -108,7 +98,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(UserEditResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.with_raw_response.edit() @@ -118,7 +107,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: user = await response.parse() assert_matches_type(UserEditResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.user.with_streaming_response.edit() as response: @@ -130,13 +118,11 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: user = await async_client.user.get() assert_matches_type(UserGetResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.with_raw_response.get() @@ -146,7 +132,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: user = await response.parse() assert_matches_type(UserGetResponse, user, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.user.with_streaming_response.get() as response: diff --git a/tests/api_resources/test_waiting_rooms.py b/tests/api_resources/test_waiting_rooms.py index 3ea7e7ca327..9eb37b948c4 100644 --- a/tests/api_resources/test_waiting_rooms.py +++ b/tests/api_resources/test_waiting_rooms.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.waiting_rooms.waiting_room import WaitingRoom -from cloudflare.types.waiting_rooms.waiting_room_delete_response import WaitingRoomDeleteResponse +from cloudflare.types.waiting_rooms import ( + WaitingRoom, + WaitingRoomDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestWaitingRooms: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.create( @@ -31,7 +32,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.create( @@ -73,7 +73,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.create( @@ -89,7 +88,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: waiting_room = response.parse() assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.create( @@ -107,7 +105,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -119,7 +116,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: total_active_users=200, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.update( @@ -132,7 +128,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.update( @@ -175,7 +170,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.update( @@ -192,7 +186,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: waiting_room = response.parse() assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.update( @@ -211,7 +204,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -234,7 +226,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: total_active_users=200, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.list( @@ -242,7 +233,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[WaitingRoom], waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.list( @@ -252,7 +242,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[WaitingRoom], waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.list( @@ -264,7 +253,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: waiting_room = response.parse() assert_matches_type(SyncSinglePage[WaitingRoom], waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.list( @@ -278,7 +266,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -286,23 +273,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.delete( "699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(WaitingRoomDeleteResponse, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -310,13 +293,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: waiting_room = response.parse() assert_matches_type(WaitingRoomDeleteResponse, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -326,24 +307,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.with_raw_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.edit( @@ -356,7 +333,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.edit( @@ -399,7 +375,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.edit( @@ -416,7 +391,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: waiting_room = response.parse() assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.edit( @@ -435,7 +409,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -458,7 +431,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: total_active_users=200, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.get( @@ -467,7 +439,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.get( @@ -480,7 +451,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: waiting_room = response.parse() assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.get( @@ -495,7 +465,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -514,7 +483,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWaitingRooms: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.create( @@ -526,7 +494,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.create( @@ -568,7 +535,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.create( @@ -584,7 +550,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: waiting_room = await response.parse() assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.create( @@ -602,7 +567,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -614,7 +578,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: total_active_users=200, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.update( @@ -627,7 +590,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.update( @@ -670,7 +632,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.update( @@ -687,7 +648,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: waiting_room = await response.parse() assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.update( @@ -706,7 +666,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -729,7 +688,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: total_active_users=200, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.list( @@ -737,7 +695,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[WaitingRoom], waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.list( @@ -747,7 +704,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[WaitingRoom], waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.list( @@ -759,7 +715,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: waiting_room = await response.parse() assert_matches_type(AsyncSinglePage[WaitingRoom], waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.list( @@ -773,7 +728,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -781,23 +735,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.delete( "699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(WaitingRoomDeleteResponse, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -805,13 +755,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: waiting_room = await response.parse() assert_matches_type(WaitingRoomDeleteResponse, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -821,24 +769,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.with_raw_response.delete( "699d98642c564d2e855e9661899b7252", zone_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.with_raw_response.delete( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.edit( @@ -851,7 +795,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.edit( @@ -894,7 +837,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.edit( @@ -911,7 +853,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: waiting_room = await response.parse() assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.edit( @@ -930,7 +871,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -953,7 +893,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: total_active_users=200, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.get( @@ -962,7 +901,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.get( @@ -975,7 +913,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: waiting_room = await response.parse() assert_matches_type(WaitingRoom, waiting_room, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.get( @@ -990,7 +927,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/test_warp_connector.py b/tests/api_resources/test_warp_connector.py index a239db28f3b..d94380162cd 100644 --- a/tests/api_resources/test_warp_connector.py +++ b/tests/api_resources/test_warp_connector.py @@ -11,12 +11,14 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.warp_connector.warp_connector_get_response import WARPConnectorGetResponse -from cloudflare.types.warp_connector.warp_connector_edit_response import WARPConnectorEditResponse -from cloudflare.types.warp_connector.warp_connector_list_response import WARPConnectorListResponse -from cloudflare.types.warp_connector.warp_connector_token_response import WARPConnectorTokenResponse -from cloudflare.types.warp_connector.warp_connector_create_response import WARPConnectorCreateResponse -from cloudflare.types.warp_connector.warp_connector_delete_response import WARPConnectorDeleteResponse +from cloudflare.types.warp_connector import ( + WARPConnectorGetResponse, + WARPConnectorEditResponse, + WARPConnectorListResponse, + WARPConnectorTokenResponse, + WARPConnectorCreateResponse, + WARPConnectorDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +26,6 @@ class TestWARPConnector: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.create( @@ -33,7 +34,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(WARPConnectorCreateResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.create( @@ -46,7 +46,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: warp_connector = response.parse() assert_matches_type(WARPConnectorCreateResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.create( @@ -61,7 +60,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -70,7 +68,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="blog", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.list( @@ -78,7 +75,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[WARPConnectorListResponse], warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.list( @@ -96,7 +92,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[WARPConnectorListResponse], warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.list( @@ -108,7 +103,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: warp_connector = response.parse() assert_matches_type(SyncV4PagePaginationArray[WARPConnectorListResponse], warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.list( @@ -122,7 +116,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -130,23 +123,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(WARPConnectorDeleteResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -154,13 +143,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: warp_connector = response.parse() assert_matches_type(WARPConnectorDeleteResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -170,24 +157,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.warp_connector.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.warp_connector.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.edit( @@ -196,7 +179,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.edit( @@ -207,7 +189,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.edit( @@ -220,7 +201,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: warp_connector = response.parse() assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.edit( @@ -235,7 +215,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -250,7 +229,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.get( @@ -259,7 +237,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(WARPConnectorGetResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.get( @@ -272,7 +249,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: warp_connector = response.parse() assert_matches_type(WARPConnectorGetResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.get( @@ -287,7 +263,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -302,7 +277,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_token(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.token( @@ -311,7 +285,6 @@ def test_method_token(self, client: Cloudflare) -> None: ) assert_matches_type(WARPConnectorTokenResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_token(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.token( @@ -324,7 +297,6 @@ def test_raw_response_token(self, client: Cloudflare) -> None: warp_connector = response.parse() assert_matches_type(WARPConnectorTokenResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_token(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.token( @@ -339,7 +311,6 @@ def test_streaming_response_token(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_token(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -358,7 +329,6 @@ def test_path_params_token(self, client: Cloudflare) -> None: class TestAsyncWARPConnector: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.create( @@ -367,7 +337,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WARPConnectorCreateResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.create( @@ -380,7 +349,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: warp_connector = await response.parse() assert_matches_type(WARPConnectorCreateResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.create( @@ -395,7 +363,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -404,7 +371,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="blog", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.list( @@ -412,7 +378,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[WARPConnectorListResponse], warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.list( @@ -430,7 +395,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[WARPConnectorListResponse], warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.list( @@ -442,7 +406,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: warp_connector = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[WARPConnectorListResponse], warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.list( @@ -458,7 +421,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -466,23 +428,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(WARPConnectorDeleteResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -490,13 +448,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: warp_connector = await response.parse() assert_matches_type(WARPConnectorDeleteResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -506,24 +462,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.warp_connector.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.warp_connector.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.edit( @@ -532,7 +484,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.edit( @@ -543,7 +494,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.edit( @@ -556,7 +506,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: warp_connector = await response.parse() assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.edit( @@ -571,7 +520,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -586,7 +534,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.get( @@ -595,7 +542,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WARPConnectorGetResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.get( @@ -608,7 +554,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: warp_connector = await response.parse() assert_matches_type(WARPConnectorGetResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.get( @@ -623,7 +568,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -638,7 +582,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_token(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.token( @@ -647,7 +590,6 @@ async def test_method_token(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(WARPConnectorTokenResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_token(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.token( @@ -660,7 +602,6 @@ async def test_raw_response_token(self, async_client: AsyncCloudflare) -> None: warp_connector = await response.parse() assert_matches_type(WARPConnectorTokenResponse, warp_connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_token(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.token( @@ -675,7 +616,6 @@ async def test_streaming_response_token(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_token(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_zones.py b/tests/api_resources/test_zones.py index 71c8435ad40..f4a3a4dfb67 100644 --- a/tests/api_resources/test_zones.py +++ b/tests/api_resources/test_zones.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.zones.zone import Zone -from cloudflare.types.zones.zone_delete_response import ZoneDeleteResponse +from cloudflare.types.zones import ( + Zone, + ZoneDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestZones: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: zone = client.zones.create( @@ -28,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: zone = client.zones.create( @@ -38,7 +38,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zones.with_raw_response.create( @@ -51,7 +50,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: zone = response.parse() assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zones.with_streaming_response.create( @@ -66,13 +64,11 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: zone = client.zones.list() assert_matches_type(SyncV4PagePaginationArray[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: zone = client.zones.list( @@ -90,7 +86,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zones.with_raw_response.list() @@ -100,7 +95,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: zone = response.parse() assert_matches_type(SyncV4PagePaginationArray[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zones.with_streaming_response.list() as response: @@ -154,7 +148,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: zone = client.zones.edit( @@ -162,7 +155,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: zone = client.zones.edit( @@ -173,7 +165,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.with_raw_response.edit( @@ -185,7 +176,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: zone = response.parse() assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.with_streaming_response.edit( @@ -199,7 +189,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -207,7 +196,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: zone = client.zones.get( @@ -215,7 +203,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.with_raw_response.get( @@ -227,7 +214,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: zone = response.parse() assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.with_streaming_response.get( @@ -241,7 +227,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -253,7 +238,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncZones: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.create( @@ -262,7 +246,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.create( @@ -272,7 +255,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.with_raw_response.create( @@ -285,7 +267,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: zone = await response.parse() assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.with_streaming_response.create( @@ -300,13 +281,11 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.list() assert_matches_type(AsyncV4PagePaginationArray[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.list( @@ -324,7 +303,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.with_raw_response.list() @@ -334,7 +312,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: zone = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.with_streaming_response.list() as response: @@ -388,7 +365,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.edit( @@ -396,7 +372,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.edit( @@ -407,7 +382,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.with_raw_response.edit( @@ -419,7 +393,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: zone = await response.parse() assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.with_streaming_response.edit( @@ -433,7 +406,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -441,7 +413,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.get( @@ -449,7 +420,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.with_raw_response.get( @@ -461,7 +431,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: zone = await response.parse() assert_matches_type(Optional[Zone], zone, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.with_streaming_response.get( @@ -475,7 +444,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/url_scanner/test_scans.py b/tests/api_resources/url_scanner/test_scans.py index 720e7e936b7..f58a63f883e 100644 --- a/tests/api_resources/url_scanner/test_scans.py +++ b/tests/api_resources/url_scanner/test_scans.py @@ -17,9 +17,11 @@ StreamedBinaryAPIResponse, AsyncStreamedBinaryAPIResponse, ) -from cloudflare.types.url_scanner.scan_get_response import ScanGetResponse -from cloudflare.types.url_scanner.scan_har_response import ScanHarResponse -from cloudflare.types.url_scanner.scan_create_response import ScanCreateResponse +from cloudflare.types.url_scanner import ( + ScanGetResponse, + ScanHarResponse, + ScanCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +29,6 @@ class TestScans: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.create( @@ -36,7 +37,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(ScanCreateResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.create( @@ -48,7 +48,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ScanCreateResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.create( @@ -61,7 +60,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: scan = response.parse() assert_matches_type(ScanCreateResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.url_scanner.scans.with_streaming_response.create( @@ -76,7 +74,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -85,7 +82,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: url="https://www.example.com", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.get( @@ -94,7 +90,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ScanGetResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.get( @@ -107,7 +102,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: scan = response.parse() assert_matches_type(ScanGetResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.url_scanner.scans.with_streaming_response.get( @@ -122,7 +116,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -137,7 +130,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id="string", ) - @pytest.mark.skip() @parametrize def test_method_har(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.har( @@ -146,7 +138,6 @@ def test_method_har(self, client: Cloudflare) -> None: ) assert_matches_type(ScanHarResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_har(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.har( @@ -159,7 +150,6 @@ def test_raw_response_har(self, client: Cloudflare) -> None: scan = response.parse() assert_matches_type(ScanHarResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_har(self, client: Cloudflare) -> None: with client.url_scanner.scans.with_streaming_response.har( @@ -174,7 +164,6 @@ def test_streaming_response_har(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_har(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -189,7 +178,6 @@ def test_path_params_har(self, client: Cloudflare) -> None: account_id="string", ) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_method_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -205,7 +193,6 @@ def test_method_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> assert cast(Any, scan.is_closed) is True assert isinstance(scan, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_method_screenshot_with_all_params(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -222,7 +209,6 @@ def test_method_screenshot_with_all_params(self, client: Cloudflare, respx_mock: assert cast(Any, scan.is_closed) is True assert isinstance(scan, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -240,7 +226,6 @@ def test_raw_response_screenshot(self, client: Cloudflare, respx_mock: MockRoute assert scan.json() == {"foo": "bar"} assert isinstance(scan, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -260,7 +245,6 @@ def test_streaming_response_screenshot(self, client: Cloudflare, respx_mock: Moc assert cast(Any, scan.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_path_params_screenshot(self, client: Cloudflare) -> None: @@ -280,7 +264,6 @@ def test_path_params_screenshot(self, client: Cloudflare) -> None: class TestAsyncScans: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.create( @@ -289,7 +272,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ScanCreateResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.create( @@ -301,7 +283,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(ScanCreateResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.create( @@ -314,7 +295,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: scan = await response.parse() assert_matches_type(ScanCreateResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.scans.with_streaming_response.create( @@ -329,7 +309,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -338,7 +317,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: url="https://www.example.com", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.get( @@ -347,7 +325,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ScanGetResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.get( @@ -360,7 +337,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: scan = await response.parse() assert_matches_type(ScanGetResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.scans.with_streaming_response.get( @@ -375,7 +351,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -390,7 +365,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_id="string", ) - @pytest.mark.skip() @parametrize async def test_method_har(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.har( @@ -399,7 +373,6 @@ async def test_method_har(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ScanHarResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_har(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.har( @@ -412,7 +385,6 @@ async def test_raw_response_har(self, async_client: AsyncCloudflare) -> None: scan = await response.parse() assert_matches_type(ScanHarResponse, scan, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_har(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.scans.with_streaming_response.har( @@ -427,7 +399,6 @@ async def test_streaming_response_har(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_har(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -442,7 +413,6 @@ async def test_path_params_har(self, async_client: AsyncCloudflare) -> None: account_id="string", ) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_screenshot(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -458,7 +428,6 @@ async def test_method_screenshot(self, async_client: AsyncCloudflare, respx_mock assert cast(Any, scan.is_closed) is True assert isinstance(scan, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_screenshot_with_all_params( @@ -477,7 +446,6 @@ async def test_method_screenshot_with_all_params( assert cast(Any, scan.is_closed) is True assert isinstance(scan, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_screenshot(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -495,7 +463,6 @@ async def test_raw_response_screenshot(self, async_client: AsyncCloudflare, resp assert await scan.json() == {"foo": "bar"} assert isinstance(scan, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_screenshot(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -515,7 +482,6 @@ async def test_streaming_response_screenshot(self, async_client: AsyncCloudflare assert cast(Any, scan.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_path_params_screenshot(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/billing/test_history.py b/tests/api_resources/user/billing/test_history.py index ec9b3cd5e2f..97cbf8ea7e2 100644 --- a/tests/api_resources/user/billing/test_history.py +++ b/tests/api_resources/user/billing/test_history.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.user.billing.billing_history import BillingHistory +from cloudflare.types.user.billing import BillingHistory base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +19,11 @@ class TestHistory: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: history = client.user.billing.history.list() assert_matches_type(SyncV4PagePaginationArray[BillingHistory], history, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: history = client.user.billing.history.list( @@ -39,7 +37,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[BillingHistory], history, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.user.billing.history.with_raw_response.list() @@ -49,7 +46,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: history = response.parse() assert_matches_type(SyncV4PagePaginationArray[BillingHistory], history, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.user.billing.history.with_streaming_response.list() as response: @@ -65,13 +61,11 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncHistory: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: history = await async_client.user.billing.history.list() assert_matches_type(AsyncV4PagePaginationArray[BillingHistory], history, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: history = await async_client.user.billing.history.list( @@ -85,7 +79,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[BillingHistory], history, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.billing.history.with_raw_response.list() @@ -95,7 +88,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: history = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[BillingHistory], history, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.user.billing.history.with_streaming_response.list() as response: diff --git a/tests/api_resources/user/billing/test_profile.py b/tests/api_resources/user/billing/test_profile.py index ad5eea8b0c2..1436c46dd18 100644 --- a/tests/api_resources/user/billing/test_profile.py +++ b/tests/api_resources/user/billing/test_profile.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.user.billing.profile_get_response import ProfileGetResponse +from cloudflare.types.user.billing import ProfileGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,13 +17,11 @@ class TestProfile: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: profile = client.user.billing.profile.get() assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.user.billing.profile.with_raw_response.get() @@ -33,7 +31,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: profile = response.parse() assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.user.billing.profile.with_streaming_response.get() as response: @@ -49,13 +46,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncProfile: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: profile = await async_client.user.billing.profile.get() assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.billing.profile.with_raw_response.get() @@ -65,7 +60,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: profile = await response.parse() assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.user.billing.profile.with_streaming_response.get() as response: diff --git a/tests/api_resources/user/test_audit_logs.py b/tests/api_resources/user/test_audit_logs.py index 9e0cc79a68c..0caf6dab72c 100644 --- a/tests/api_resources/user/test_audit_logs.py +++ b/tests/api_resources/user/test_audit_logs.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.shared.audit_log import AuditLog +from cloudflare.types.shared import AuditLog base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,13 +19,11 @@ class TestAuditLogs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: audit_log = client.user.audit_logs.list() assert_matches_type(SyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: audit_log = client.user.audit_logs.list( @@ -46,7 +44,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.user.audit_logs.with_raw_response.list() @@ -56,7 +53,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: audit_log = response.parse() assert_matches_type(SyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.user.audit_logs.with_streaming_response.list() as response: @@ -72,13 +68,11 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncAuditLogs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: audit_log = await async_client.user.audit_logs.list() assert_matches_type(AsyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: audit_log = await async_client.user.audit_logs.list( @@ -99,7 +93,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.audit_logs.with_raw_response.list() @@ -109,7 +102,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: audit_log = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[AuditLog], audit_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.user.audit_logs.with_streaming_response.list() as response: diff --git a/tests/api_resources/user/test_invites.py b/tests/api_resources/user/test_invites.py index c188cf81082..73926fbc056 100644 --- a/tests/api_resources/user/test_invites.py +++ b/tests/api_resources/user/test_invites.py @@ -10,9 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.user.invite import Invite -from cloudflare.types.user.invite_get_response import InviteGetResponse -from cloudflare.types.user.invite_edit_response import InviteEditResponse +from cloudflare.types.user import Invite, InviteGetResponse, InviteEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,13 +18,11 @@ class TestInvites: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: invite = client.user.invites.list() assert_matches_type(SyncSinglePage[Invite], invite, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.user.invites.with_raw_response.list() @@ -36,7 +32,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: invite = response.parse() assert_matches_type(SyncSinglePage[Invite], invite, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.user.invites.with_streaming_response.list() as response: @@ -48,7 +43,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: invite = client.user.invites.edit( @@ -57,7 +51,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(InviteEditResponse, invite, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.user.invites.with_raw_response.edit( @@ -70,7 +63,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: invite = response.parse() assert_matches_type(InviteEditResponse, invite, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.user.invites.with_streaming_response.edit( @@ -85,7 +77,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invite_id` but received ''"): @@ -94,7 +85,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: status="accepted", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: invite = client.user.invites.get( @@ -102,7 +92,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(InviteGetResponse, invite, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.user.invites.with_raw_response.get( @@ -114,7 +103,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: invite = response.parse() assert_matches_type(InviteGetResponse, invite, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.user.invites.with_streaming_response.get( @@ -128,7 +116,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invite_id` but received ''"): @@ -140,13 +127,11 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInvites: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: invite = await async_client.user.invites.list() assert_matches_type(AsyncSinglePage[Invite], invite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.invites.with_raw_response.list() @@ -156,7 +141,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: invite = await response.parse() assert_matches_type(AsyncSinglePage[Invite], invite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.user.invites.with_streaming_response.list() as response: @@ -168,7 +152,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: invite = await async_client.user.invites.edit( @@ -177,7 +160,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(InviteEditResponse, invite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.invites.with_raw_response.edit( @@ -190,7 +172,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: invite = await response.parse() assert_matches_type(InviteEditResponse, invite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.user.invites.with_streaming_response.edit( @@ -205,7 +186,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invite_id` but received ''"): @@ -214,7 +194,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: status="accepted", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: invite = await async_client.user.invites.get( @@ -222,7 +201,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(InviteGetResponse, invite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.invites.with_raw_response.get( @@ -234,7 +212,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: invite = await response.parse() assert_matches_type(InviteGetResponse, invite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.user.invites.with_streaming_response.get( @@ -248,7 +225,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invite_id` but received ''"): diff --git a/tests/api_resources/user/test_organizations.py b/tests/api_resources/user/test_organizations.py index 0745c8cd46f..336fa525726 100644 --- a/tests/api_resources/user/test_organizations.py +++ b/tests/api_resources/user/test_organizations.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.user.organization import Organization -from cloudflare.types.user.organization_get_response import OrganizationGetResponse -from cloudflare.types.user.organization_delete_response import OrganizationDeleteResponse +from cloudflare.types.user import ( + Organization, + OrganizationGetResponse, + OrganizationDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,13 +22,11 @@ class TestOrganizations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: organization = client.user.organizations.list() assert_matches_type(SyncV4PagePaginationArray[Organization], organization, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: organization = client.user.organizations.list( @@ -40,7 +40,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Organization], organization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.user.organizations.with_raw_response.list() @@ -50,7 +49,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: organization = response.parse() assert_matches_type(SyncV4PagePaginationArray[Organization], organization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.user.organizations.with_streaming_response.list() as response: @@ -62,21 +60,17 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: organization = client.user.organizations.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(OrganizationDeleteResponse, organization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.user.organizations.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -84,12 +78,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: organization = response.parse() assert_matches_type(OrganizationDeleteResponse, organization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.user.organizations.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -99,16 +91,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): client.user.organizations.with_raw_response.delete( "", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: organization = client.user.organizations.get( @@ -116,7 +105,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(OrganizationGetResponse, organization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.user.organizations.with_raw_response.get( @@ -128,7 +116,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: organization = response.parse() assert_matches_type(OrganizationGetResponse, organization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.user.organizations.with_streaming_response.get( @@ -142,7 +129,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): @@ -154,13 +140,11 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOrganizations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: organization = await async_client.user.organizations.list() assert_matches_type(AsyncV4PagePaginationArray[Organization], organization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.user.organizations.list( @@ -174,7 +158,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Organization], organization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.organizations.with_raw_response.list() @@ -184,7 +167,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: organization = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Organization], organization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.user.organizations.with_streaming_response.list() as response: @@ -196,21 +178,17 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: organization = await async_client.user.organizations.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(OrganizationDeleteResponse, organization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.organizations.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -218,12 +196,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: organization = await response.parse() assert_matches_type(OrganizationDeleteResponse, organization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.user.organizations.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -233,16 +209,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): await async_client.user.organizations.with_raw_response.delete( "", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: organization = await async_client.user.organizations.get( @@ -250,7 +223,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(OrganizationGetResponse, organization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.organizations.with_raw_response.get( @@ -262,7 +234,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: organization = await response.parse() assert_matches_type(OrganizationGetResponse, organization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.user.organizations.with_streaming_response.get( @@ -276,7 +247,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `organization_id` but received ''"): diff --git a/tests/api_resources/user/test_subscriptions.py b/tests/api_resources/user/test_subscriptions.py index 1cd6b742671..95133505c93 100644 --- a/tests/api_resources/user/test_subscriptions.py +++ b/tests/api_resources/user/test_subscriptions.py @@ -9,10 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.user.subscription_get_response import SubscriptionGetResponse -from cloudflare.types.user.subscription_edit_response import SubscriptionEditResponse -from cloudflare.types.user.subscription_delete_response import SubscriptionDeleteResponse -from cloudflare.types.user.subscription_update_response import SubscriptionUpdateResponse +from cloudflare.types.user import ( + SubscriptionGetResponse, + SubscriptionEditResponse, + SubscriptionDeleteResponse, + SubscriptionUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestSubscriptions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.update( @@ -28,7 +29,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.update( @@ -68,7 +68,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.user.subscriptions.with_raw_response.update( @@ -80,7 +79,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.user.subscriptions.with_streaming_response.update( @@ -94,7 +92,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -102,21 +99,17 @@ def test_path_params_update(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.delete( "506e3185e9c882d175a2d0cb0093d9f2", - body={}, ) assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.user.subscriptions.with_raw_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", - body={}, ) assert response.is_closed is True @@ -124,12 +117,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.user.subscriptions.with_streaming_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,16 +130,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.user.subscriptions.with_raw_response.delete( "", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.edit( @@ -156,7 +144,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.edit( @@ -196,7 +183,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.user.subscriptions.with_raw_response.edit( @@ -208,7 +194,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.user.subscriptions.with_streaming_response.edit( @@ -222,7 +207,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -230,13 +214,11 @@ def test_path_params_edit(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.get() assert_matches_type(Optional[SubscriptionGetResponse], subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.user.subscriptions.with_raw_response.get() @@ -246,7 +228,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(Optional[SubscriptionGetResponse], subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.user.subscriptions.with_streaming_response.get() as response: @@ -262,7 +243,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncSubscriptions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.update( @@ -270,7 +250,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.update( @@ -310,7 +289,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.subscriptions.with_raw_response.update( @@ -322,7 +300,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.user.subscriptions.with_streaming_response.update( @@ -336,7 +313,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -344,21 +320,17 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.delete( "506e3185e9c882d175a2d0cb0093d9f2", - body={}, ) assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.subscriptions.with_raw_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", - body={}, ) assert response.is_closed is True @@ -366,12 +338,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.user.subscriptions.with_streaming_response.delete( "506e3185e9c882d175a2d0cb0093d9f2", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -381,16 +351,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.user.subscriptions.with_raw_response.delete( "", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.edit( @@ -398,7 +365,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.edit( @@ -438,7 +404,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.subscriptions.with_raw_response.edit( @@ -450,7 +415,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.user.subscriptions.with_streaming_response.edit( @@ -464,7 +428,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -472,13 +435,11 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.get() assert_matches_type(Optional[SubscriptionGetResponse], subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.subscriptions.with_raw_response.get() @@ -488,7 +449,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(Optional[SubscriptionGetResponse], subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.user.subscriptions.with_streaming_response.get() as response: diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index 42faf189580..608a7beeb51 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -11,11 +11,13 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.user.token_get_response import TokenGetResponse -from cloudflare.types.user.token_create_response import TokenCreateResponse -from cloudflare.types.user.token_delete_response import TokenDeleteResponse -from cloudflare.types.user.token_update_response import TokenUpdateResponse -from cloudflare.types.user.token_verify_response import TokenVerifyResponse +from cloudflare.types.user import ( + TokenGetResponse, + TokenCreateResponse, + TokenDeleteResponse, + TokenUpdateResponse, + TokenVerifyResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +25,7 @@ class TestTokens: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: token = client.user.tokens.create( @@ -57,7 +59,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(TokenCreateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: token = client.user.tokens.create( @@ -99,7 +101,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TokenCreateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.user.tokens.with_raw_response.create( @@ -137,7 +139,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: token = response.parse() assert_matches_type(TokenCreateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.user.tokens.with_streaming_response.create( @@ -177,7 +179,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: token = client.user.tokens.update( @@ -213,7 +215,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(TokenUpdateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: token = client.user.tokens.update( @@ -257,7 +259,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TokenUpdateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.user.tokens.with_raw_response.update( @@ -297,7 +299,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: token = response.parse() assert_matches_type(TokenUpdateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.user.tokens.with_streaming_response.update( @@ -339,13 +341,11 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: token = client.user.tokens.list() assert_matches_type(SyncV4PagePaginationArray[object], token, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: token = client.user.tokens.list( @@ -355,7 +355,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[object], token, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.user.tokens.with_raw_response.list() @@ -365,7 +364,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: token = response.parse() assert_matches_type(SyncV4PagePaginationArray[object], token, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.user.tokens.with_streaming_response.list() as response: @@ -377,21 +375,17 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: token = client.user.tokens.delete( {}, - body={}, ) assert_matches_type(Optional[TokenDeleteResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.user.tokens.with_raw_response.delete( {}, - body={}, ) assert response.is_closed is True @@ -399,12 +393,10 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: token = response.parse() assert_matches_type(Optional[TokenDeleteResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.user.tokens.with_streaming_response.delete( {}, - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -414,7 +406,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: token = client.user.tokens.get( @@ -422,7 +413,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(TokenGetResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.user.tokens.with_raw_response.get( @@ -434,7 +424,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: token = response.parse() assert_matches_type(TokenGetResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.user.tokens.with_streaming_response.get( @@ -448,13 +437,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_method_verify(self, client: Cloudflare) -> None: token = client.user.tokens.verify() assert_matches_type(TokenVerifyResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_verify(self, client: Cloudflare) -> None: response = client.user.tokens.with_raw_response.verify() @@ -464,7 +451,6 @@ def test_raw_response_verify(self, client: Cloudflare) -> None: token = response.parse() assert_matches_type(TokenVerifyResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_verify(self, client: Cloudflare) -> None: with client.user.tokens.with_streaming_response.verify() as response: @@ -480,7 +466,7 @@ def test_streaming_response_verify(self, client: Cloudflare) -> None: class TestAsyncTokens: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.create( @@ -514,7 +500,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TokenCreateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.create( @@ -556,7 +542,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(TokenCreateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.with_raw_response.create( @@ -594,7 +580,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: token = await response.parse() assert_matches_type(TokenCreateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.with_streaming_response.create( @@ -634,7 +620,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.update( @@ -670,7 +656,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TokenUpdateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.update( @@ -714,7 +700,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(TokenUpdateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.with_raw_response.update( @@ -754,7 +740,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: token = await response.parse() assert_matches_type(TokenUpdateResponse, token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.with_streaming_response.update( @@ -796,13 +782,11 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.list() assert_matches_type(AsyncV4PagePaginationArray[object], token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.list( @@ -812,7 +796,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[object], token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.with_raw_response.list() @@ -822,7 +805,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: token = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[object], token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.with_streaming_response.list() as response: @@ -834,21 +816,17 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.delete( {}, - body={}, ) assert_matches_type(Optional[TokenDeleteResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.with_raw_response.delete( {}, - body={}, ) assert response.is_closed is True @@ -856,12 +834,10 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: token = await response.parse() assert_matches_type(Optional[TokenDeleteResponse], token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.with_streaming_response.delete( {}, - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -871,7 +847,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.get( @@ -879,7 +854,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TokenGetResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.with_raw_response.get( @@ -891,7 +865,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: token = await response.parse() assert_matches_type(TokenGetResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.with_streaming_response.get( @@ -905,13 +878,11 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_method_verify(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.verify() assert_matches_type(TokenVerifyResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_verify(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.with_raw_response.verify() @@ -921,7 +892,6 @@ async def test_raw_response_verify(self, async_client: AsyncCloudflare) -> None: token = await response.parse() assert_matches_type(TokenVerifyResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_verify(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.with_streaming_response.verify() as response: diff --git a/tests/api_resources/user/tokens/test_permission_groups.py b/tests/api_resources/user/tokens/test_permission_groups.py index fc5c12aeb29..f92a3cb1818 100644 --- a/tests/api_resources/user/tokens/test_permission_groups.py +++ b/tests/api_resources/user/tokens/test_permission_groups.py @@ -17,13 +17,11 @@ class TestPermissionGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: permission_group = client.user.tokens.permission_groups.list() assert_matches_type(SyncSinglePage[object], permission_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.user.tokens.permission_groups.with_raw_response.list() @@ -33,7 +31,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: permission_group = response.parse() assert_matches_type(SyncSinglePage[object], permission_group, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.user.tokens.permission_groups.with_streaming_response.list() as response: @@ -49,13 +46,11 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncPermissionGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: permission_group = await async_client.user.tokens.permission_groups.list() assert_matches_type(AsyncSinglePage[object], permission_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.permission_groups.with_raw_response.list() @@ -65,7 +60,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: permission_group = await response.parse() assert_matches_type(AsyncSinglePage[object], permission_group, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.permission_groups.with_streaming_response.list() as response: diff --git a/tests/api_resources/user/tokens/test_value.py b/tests/api_resources/user/tokens/test_value.py index 697920b8c14..d4ef302b8e1 100644 --- a/tests/api_resources/user/tokens/test_value.py +++ b/tests/api_resources/user/tokens/test_value.py @@ -16,7 +16,6 @@ class TestValue: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: value = client.user.tokens.value.update( @@ -25,7 +24,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(str, value, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.user.tokens.value.with_raw_response.update( @@ -38,7 +36,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: value = response.parse() assert_matches_type(str, value, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.user.tokens.value.with_streaming_response.update( @@ -57,7 +54,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: class TestAsyncValue: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: value = await async_client.user.tokens.value.update( @@ -66,7 +62,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, value, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.value.with_raw_response.update( @@ -79,7 +74,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: value = await response.parse() assert_matches_type(str, value, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.value.with_streaming_response.update( diff --git a/tests/api_resources/vectorize/test_indexes.py b/tests/api_resources/vectorize/test_indexes.py index 2ede6c609fd..d0a4beb4ea0 100644 --- a/tests/api_resources/vectorize/test_indexes.py +++ b/tests/api_resources/vectorize/test_indexes.py @@ -10,12 +10,14 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.vectorize.index_query import IndexQuery -from cloudflare.types.vectorize.create_index import CreateIndex -from cloudflare.types.vectorize.index_insert import IndexInsert -from cloudflare.types.vectorize.index_upsert import IndexUpsert -from cloudflare.types.vectorize.index_delete_response import IndexDeleteResponse -from cloudflare.types.vectorize.index_delete_vectors_by_id import IndexDeleteVectorsByID +from cloudflare.types.vectorize import ( + IndexQuery, + CreateIndex, + IndexInsert, + IndexUpsert, + IndexDeleteResponse, + IndexDeleteVectorsByID, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +25,6 @@ class TestIndexes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: index = client.vectorize.indexes.create( @@ -36,7 +37,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.create( @@ -50,7 +50,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.create( @@ -67,7 +66,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.create( @@ -86,7 +84,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -99,7 +96,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="example-index", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: index = client.vectorize.indexes.update( @@ -109,7 +105,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.update( @@ -123,7 +118,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.update( @@ -139,7 +133,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -156,7 +149,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: description="This is my example index.", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: index = client.vectorize.indexes.list( @@ -164,7 +156,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.list( @@ -176,7 +167,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(SyncSinglePage[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.list( @@ -190,7 +180,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -198,7 +187,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: index = client.vectorize.indexes.delete( @@ -207,7 +195,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(IndexDeleteResponse, index, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.delete( @@ -220,7 +207,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(IndexDeleteResponse, index, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.delete( @@ -235,7 +221,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -250,7 +235,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete_by_ids(self, client: Cloudflare) -> None: index = client.vectorize.indexes.delete_by_ids( @@ -259,7 +243,6 @@ def test_method_delete_by_ids(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_delete_by_ids_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.delete_by_ids( @@ -269,7 +252,6 @@ def test_method_delete_by_ids_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete_by_ids(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.delete_by_ids( @@ -282,7 +264,6 @@ def test_raw_response_delete_by_ids(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete_by_ids(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.delete_by_ids( @@ -297,7 +278,6 @@ def test_streaming_response_delete_by_ids(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete_by_ids(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -312,7 +292,6 @@ def test_path_params_delete_by_ids(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: index = client.vectorize.indexes.get( @@ -321,7 +300,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.get( @@ -334,7 +312,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.get( @@ -349,7 +326,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -364,7 +340,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get_by_ids(self, client: Cloudflare) -> None: index = client.vectorize.indexes.get_by_ids( @@ -373,7 +348,6 @@ def test_method_get_by_ids(self, client: Cloudflare) -> None: ) assert_matches_type(object, index, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_by_ids_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.get_by_ids( @@ -383,7 +357,6 @@ def test_method_get_by_ids_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(object, index, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get_by_ids(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.get_by_ids( @@ -396,7 +369,6 @@ def test_raw_response_get_by_ids(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(object, index, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get_by_ids(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.get_by_ids( @@ -411,7 +383,6 @@ def test_streaming_response_get_by_ids(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get_by_ids(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -426,7 +397,7 @@ def test_path_params_get_by_ids(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_insert(self, client: Cloudflare) -> None: index = client.vectorize.indexes.insert( @@ -436,7 +407,7 @@ def test_method_insert(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IndexInsert], index, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_insert(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.insert( @@ -450,7 +421,7 @@ def test_raw_response_insert(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(Optional[IndexInsert], index, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_insert(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.insert( @@ -466,7 +437,7 @@ def test_streaming_response_insert(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_insert(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -483,7 +454,6 @@ def test_path_params_insert(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_query(self, client: Cloudflare) -> None: index = client.vectorize.indexes.query( @@ -493,7 +463,6 @@ def test_method_query(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IndexQuery], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_query_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.query( @@ -510,7 +479,6 @@ def test_method_query_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IndexQuery], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_query(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.query( @@ -524,7 +492,6 @@ def test_raw_response_query(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(Optional[IndexQuery], index, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_query(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.query( @@ -540,7 +507,6 @@ def test_streaming_response_query(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_query(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -557,7 +523,7 @@ def test_path_params_query(self, client: Cloudflare) -> None: vector=[0.5, 0.5, 0.5], ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_upsert(self, client: Cloudflare) -> None: index = client.vectorize.indexes.upsert( @@ -567,7 +533,7 @@ def test_method_upsert(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IndexUpsert], index, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_upsert(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.upsert( @@ -581,7 +547,7 @@ def test_raw_response_upsert(self, client: Cloudflare) -> None: index = response.parse() assert_matches_type(Optional[IndexUpsert], index, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_upsert(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.upsert( @@ -597,7 +563,7 @@ def test_streaming_response_upsert(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_upsert(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -618,7 +584,6 @@ def test_path_params_upsert(self, client: Cloudflare) -> None: class TestAsyncIndexes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.create( @@ -631,7 +596,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.create( @@ -645,7 +609,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.create( @@ -662,7 +625,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: index = await response.parse() assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.create( @@ -681,7 +643,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -694,7 +655,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="example-index", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.update( @@ -704,7 +664,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.update( @@ -718,7 +677,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: index = await response.parse() assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.update( @@ -734,7 +692,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -751,7 +708,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: description="This is my example index.", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.list( @@ -759,7 +715,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.list( @@ -771,7 +726,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: index = await response.parse() assert_matches_type(AsyncSinglePage[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.list( @@ -785,7 +739,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -793,7 +746,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.delete( @@ -802,7 +754,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IndexDeleteResponse, index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.delete( @@ -815,7 +766,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: index = await response.parse() assert_matches_type(IndexDeleteResponse, index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.delete( @@ -830,7 +780,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -845,7 +794,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete_by_ids(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.delete_by_ids( @@ -854,7 +802,6 @@ async def test_method_delete_by_ids(self, async_client: AsyncCloudflare) -> None ) assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_delete_by_ids_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.delete_by_ids( @@ -864,7 +811,6 @@ async def test_method_delete_by_ids_with_all_params(self, async_client: AsyncClo ) assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete_by_ids(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.delete_by_ids( @@ -877,7 +823,6 @@ async def test_raw_response_delete_by_ids(self, async_client: AsyncCloudflare) - index = await response.parse() assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete_by_ids(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.delete_by_ids( @@ -892,7 +837,6 @@ async def test_streaming_response_delete_by_ids(self, async_client: AsyncCloudfl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete_by_ids(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -907,7 +851,6 @@ async def test_path_params_delete_by_ids(self, async_client: AsyncCloudflare) -> account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.get( @@ -916,7 +859,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.get( @@ -929,7 +871,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: index = await response.parse() assert_matches_type(Optional[CreateIndex], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.get( @@ -944,7 +885,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -959,7 +899,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get_by_ids(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.get_by_ids( @@ -968,7 +907,6 @@ async def test_method_get_by_ids(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(object, index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_by_ids_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.get_by_ids( @@ -978,7 +916,6 @@ async def test_method_get_by_ids_with_all_params(self, async_client: AsyncCloudf ) assert_matches_type(object, index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get_by_ids(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.get_by_ids( @@ -991,7 +928,6 @@ async def test_raw_response_get_by_ids(self, async_client: AsyncCloudflare) -> N index = await response.parse() assert_matches_type(object, index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get_by_ids(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.get_by_ids( @@ -1006,7 +942,6 @@ async def test_streaming_response_get_by_ids(self, async_client: AsyncCloudflare assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get_by_ids(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1021,7 +956,7 @@ async def test_path_params_get_by_ids(self, async_client: AsyncCloudflare) -> No account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_insert(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.insert( @@ -1031,7 +966,7 @@ async def test_method_insert(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IndexInsert], index, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_insert(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.insert( @@ -1045,7 +980,7 @@ async def test_raw_response_insert(self, async_client: AsyncCloudflare) -> None: index = await response.parse() assert_matches_type(Optional[IndexInsert], index, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_insert(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.insert( @@ -1061,7 +996,7 @@ async def test_streaming_response_insert(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_insert(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1078,7 +1013,6 @@ async def test_path_params_insert(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_query(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.query( @@ -1088,7 +1022,6 @@ async def test_method_query(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IndexQuery], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.query( @@ -1105,7 +1038,6 @@ async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[IndexQuery], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.query( @@ -1119,7 +1051,6 @@ async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: index = await response.parse() assert_matches_type(Optional[IndexQuery], index, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.query( @@ -1135,7 +1066,6 @@ async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1152,7 +1082,7 @@ async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: vector=[0.5, 0.5, 0.5], ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_upsert(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.upsert( @@ -1162,7 +1092,7 @@ async def test_method_upsert(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IndexUpsert], index, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_upsert(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.upsert( @@ -1176,7 +1106,7 @@ async def test_raw_response_upsert(self, async_client: AsyncCloudflare) -> None: index = await response.parse() assert_matches_type(Optional[IndexUpsert], index, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_upsert(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.upsert( @@ -1192,7 +1122,7 @@ async def test_streaming_response_upsert(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_upsert(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/waiting_rooms/events/test_details.py b/tests/api_resources/waiting_rooms/events/test_details.py index 8d9a4fbf531..3a81dca45f9 100644 --- a/tests/api_resources/waiting_rooms/events/test_details.py +++ b/tests/api_resources/waiting_rooms/events/test_details.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.waiting_rooms.events.detail_get_response import DetailGetResponse +from cloudflare.types.waiting_rooms.events import DetailGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestDetails: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: detail = client.waiting_rooms.events.details.get( @@ -27,7 +26,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(DetailGetResponse, detail, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.details.with_raw_response.get( @@ -41,7 +39,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: detail = response.parse() assert_matches_type(DetailGetResponse, detail, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.events.details.with_streaming_response.get( @@ -57,7 +54,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -85,7 +81,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDetails: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: detail = await async_client.waiting_rooms.events.details.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DetailGetResponse, detail, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.details.with_raw_response.get( @@ -109,7 +103,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: detail = await response.parse() assert_matches_type(DetailGetResponse, detail, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.details.with_streaming_response.get( @@ -125,7 +118,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/waiting_rooms/test_events.py b/tests/api_resources/waiting_rooms/test_events.py index 901ca61d711..2be3b4b028c 100644 --- a/tests/api_resources/waiting_rooms/test_events.py +++ b/tests/api_resources/waiting_rooms/test_events.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.waiting_rooms.event import Event -from cloudflare.types.waiting_rooms.event_delete_response import EventDeleteResponse +from cloudflare.types.waiting_rooms import ( + Event, + EventDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestEvents: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.create( @@ -31,7 +32,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.create( @@ -53,7 +53,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.create( @@ -69,7 +68,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: event = response.parse() assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.create( @@ -87,7 +85,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -108,7 +105,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="production_webinar_event", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.update( @@ -121,7 +117,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.update( @@ -144,7 +139,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.update( @@ -161,7 +155,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: event = response.parse() assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.update( @@ -180,7 +173,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -213,7 +205,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="production_webinar_event", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.list( @@ -222,7 +213,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Event], event, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.list( @@ -233,7 +223,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Event], event, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.list( @@ -246,7 +235,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: event = response.parse() assert_matches_type(SyncSinglePage[Event], event, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.list( @@ -261,7 +249,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -276,25 +263,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(EventDeleteResponse, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -302,14 +285,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: event = response.parse() assert_matches_type(EventDeleteResponse, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -319,7 +300,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -327,7 +307,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): @@ -335,7 +314,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -343,10 +321,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.edit( @@ -359,7 +335,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.edit( @@ -382,7 +357,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.edit( @@ -399,7 +373,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: event = response.parse() assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.edit( @@ -418,7 +391,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -451,7 +423,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: name="production_webinar_event", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.get( @@ -461,7 +432,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.get( @@ -475,7 +445,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: event = response.parse() assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.get( @@ -491,7 +460,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -519,7 +487,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEvents: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.create( @@ -531,7 +498,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.create( @@ -553,7 +519,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.create( @@ -569,7 +534,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: event = await response.parse() assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.create( @@ -587,7 +551,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -608,7 +571,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="production_webinar_event", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.update( @@ -621,7 +583,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.update( @@ -644,7 +605,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.update( @@ -661,7 +621,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: event = await response.parse() assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.update( @@ -680,7 +639,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -713,7 +671,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="production_webinar_event", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.list( @@ -722,7 +679,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Event], event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.list( @@ -733,7 +689,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[Event], event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.list( @@ -746,7 +701,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: event = await response.parse() assert_matches_type(AsyncSinglePage[Event], event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.list( @@ -761,7 +715,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -776,25 +729,21 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(EventDeleteResponse, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -802,14 +751,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: event = await response.parse() assert_matches_type(EventDeleteResponse, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -819,7 +766,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -827,7 +773,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): @@ -835,7 +780,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -843,10 +787,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.edit( @@ -859,7 +801,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.edit( @@ -882,7 +823,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.edit( @@ -899,7 +839,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: event = await response.parse() assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.edit( @@ -918,7 +857,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -951,7 +889,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: name="production_webinar_event", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.get( @@ -961,7 +898,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.get( @@ -975,7 +911,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: event = await response.parse() assert_matches_type(Event, event, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.get( @@ -991,7 +926,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/waiting_rooms/test_page.py b/tests/api_resources/waiting_rooms/test_page.py index ead6c6eff3a..881d9a3a906 100644 --- a/tests/api_resources/waiting_rooms/test_page.py +++ b/tests/api_resources/waiting_rooms/test_page.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.waiting_rooms.page_preview_response import PagePreviewResponse +from cloudflare.types.waiting_rooms import PagePreviewResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestPage: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_preview(self, client: Cloudflare) -> None: page = client.waiting_rooms.page.preview( @@ -26,7 +25,6 @@ def test_method_preview(self, client: Cloudflare) -> None: ) assert_matches_type(PagePreviewResponse, page, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_preview(self, client: Cloudflare) -> None: response = client.waiting_rooms.page.with_raw_response.preview( @@ -39,7 +37,6 @@ def test_raw_response_preview(self, client: Cloudflare) -> None: page = response.parse() assert_matches_type(PagePreviewResponse, page, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_preview(self, client: Cloudflare) -> None: with client.waiting_rooms.page.with_streaming_response.preview( @@ -54,7 +51,6 @@ def test_streaming_response_preview(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_preview(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -67,7 +63,6 @@ def test_path_params_preview(self, client: Cloudflare) -> None: class TestAsyncPage: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_preview(self, async_client: AsyncCloudflare) -> None: page = await async_client.waiting_rooms.page.preview( @@ -76,7 +71,6 @@ async def test_method_preview(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PagePreviewResponse, page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_preview(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.page.with_raw_response.preview( @@ -89,7 +83,6 @@ async def test_raw_response_preview(self, async_client: AsyncCloudflare) -> None page = await response.parse() assert_matches_type(PagePreviewResponse, page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_preview(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.page.with_streaming_response.preview( @@ -104,7 +97,6 @@ async def test_streaming_response_preview(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_preview(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/waiting_rooms/test_rules.py b/tests/api_resources/waiting_rooms/test_rules.py index fa27b73753a..0716bb86c5d 100644 --- a/tests/api_resources/waiting_rooms/test_rules.py +++ b/tests/api_resources/waiting_rooms/test_rules.py @@ -10,11 +10,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.waiting_rooms.waiting_room_rule import WaitingRoomRule -from cloudflare.types.waiting_rooms.rule_edit_response import RuleEditResponse -from cloudflare.types.waiting_rooms.rule_create_response import RuleCreateResponse -from cloudflare.types.waiting_rooms.rule_delete_response import RuleDeleteResponse -from cloudflare.types.waiting_rooms.rule_update_response import RuleUpdateResponse +from cloudflare.types.waiting_rooms import ( + WaitingRoomRule, + RuleEditResponse, + RuleCreateResponse, + RuleDeleteResponse, + RuleUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +24,6 @@ class TestRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.create( @@ -33,7 +34,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.create( @@ -46,7 +46,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.create( @@ -61,7 +60,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.create( @@ -78,7 +76,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -97,7 +94,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: expression="ip.src in {10.20.30.40}", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.update( @@ -120,7 +116,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.update( @@ -147,7 +142,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.update( @@ -176,7 +170,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -219,7 +212,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.list( @@ -228,7 +220,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[WaitingRoomRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.list( @@ -241,7 +232,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(SyncSinglePage[WaitingRoomRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.list( @@ -256,7 +246,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -271,25 +260,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -297,14 +282,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -314,7 +297,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -322,7 +304,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): @@ -330,7 +311,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -338,10 +318,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.edit( @@ -353,7 +331,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.edit( @@ -368,7 +345,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.edit( @@ -384,7 +360,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.edit( @@ -402,7 +377,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -436,7 +410,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.create( @@ -447,7 +420,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.create( @@ -460,7 +432,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.create( @@ -475,7 +446,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.create( @@ -492,7 +462,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -511,7 +480,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: expression="ip.src in {10.20.30.40}", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.update( @@ -534,7 +502,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.update( @@ -561,7 +528,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.update( @@ -590,7 +556,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -633,7 +598,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.list( @@ -642,7 +606,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[WaitingRoomRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.list( @@ -655,7 +618,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(AsyncSinglePage[WaitingRoomRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.list( @@ -670,7 +632,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -685,25 +646,21 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -711,14 +668,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.delete( "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -728,7 +683,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -736,7 +690,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): @@ -744,7 +697,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -752,10 +704,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.edit( @@ -767,7 +717,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.edit( @@ -782,7 +731,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.edit( @@ -798,7 +746,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.edit( @@ -816,7 +763,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/waiting_rooms/test_settings.py b/tests/api_resources/waiting_rooms/test_settings.py index 3dd457a6ed5..823c9e02011 100644 --- a/tests/api_resources/waiting_rooms/test_settings.py +++ b/tests/api_resources/waiting_rooms/test_settings.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.waiting_rooms.setting_get_response import SettingGetResponse -from cloudflare.types.waiting_rooms.setting_edit_response import SettingEditResponse -from cloudflare.types.waiting_rooms.setting_update_response import SettingUpdateResponse +from cloudflare.types.waiting_rooms import ( + SettingGetResponse, + SettingEditResponse, + SettingUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: setting = client.waiting_rooms.settings.update( @@ -27,7 +28,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: setting = client.waiting_rooms.settings.update( @@ -36,7 +36,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.settings.with_raw_response.update( @@ -48,7 +47,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.settings.with_streaming_response.update( @@ -62,7 +60,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -70,7 +67,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.waiting_rooms.settings.edit( @@ -78,7 +74,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(SettingEditResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.waiting_rooms.settings.edit( @@ -87,7 +82,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SettingEditResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.settings.with_raw_response.edit( @@ -99,7 +93,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(SettingEditResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.settings.with_streaming_response.edit( @@ -113,7 +106,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -121,7 +113,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.waiting_rooms.settings.get( @@ -129,7 +120,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(SettingGetResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.settings.with_raw_response.get( @@ -141,7 +131,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(SettingGetResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.settings.with_streaming_response.get( @@ -155,7 +144,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -167,7 +155,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: setting = await async_client.waiting_rooms.settings.update( @@ -175,7 +162,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.waiting_rooms.settings.update( @@ -184,7 +170,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.settings.with_raw_response.update( @@ -196,7 +181,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.settings.with_streaming_response.update( @@ -210,7 +194,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -218,7 +201,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.waiting_rooms.settings.edit( @@ -226,7 +208,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SettingEditResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.waiting_rooms.settings.edit( @@ -235,7 +216,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(SettingEditResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.settings.with_raw_response.edit( @@ -247,7 +227,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(SettingEditResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.settings.with_streaming_response.edit( @@ -261,7 +240,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -269,7 +247,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.waiting_rooms.settings.get( @@ -277,7 +254,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SettingGetResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.settings.with_raw_response.get( @@ -289,7 +265,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(SettingGetResponse, setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.settings.with_streaming_response.get( @@ -303,7 +278,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/waiting_rooms/test_statuses.py b/tests/api_resources/waiting_rooms/test_statuses.py index 43709499dee..9a7ff6731a5 100644 --- a/tests/api_resources/waiting_rooms/test_statuses.py +++ b/tests/api_resources/waiting_rooms/test_statuses.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.waiting_rooms.status_get_response import StatusGetResponse +from cloudflare.types.waiting_rooms import StatusGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestStatuses: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: status = client.waiting_rooms.statuses.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(StatusGetResponse, status, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.statuses.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: status = response.parse() assert_matches_type(StatusGetResponse, status, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.statuses.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStatuses: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: status = await async_client.waiting_rooms.statuses.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(StatusGetResponse, status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.statuses.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: status = await response.parse() assert_matches_type(StatusGetResponse, status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.statuses.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py index 56f419d6fc7..d5891151684 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py @@ -9,11 +9,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists.entry_get_response import EntryGetResponse -from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists.entry_list_response import EntryListResponse -from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists.entry_create_response import EntryCreateResponse -from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists.entry_delete_response import EntryDeleteResponse -from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists.entry_update_response import EntryUpdateResponse +from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists import ( + EntryGetResponse, + EntryListResponse, + EntryCreateResponse, + EntryDeleteResponse, + EntryUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestEntries: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( @@ -32,7 +33,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(EntryCreateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( @@ -44,7 +44,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(EntryCreateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( @@ -59,7 +58,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: entry = response.parse() assert_matches_type(EntryCreateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.create( @@ -76,7 +74,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -95,7 +92,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: type="cid", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( @@ -107,7 +103,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(EntryUpdateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( @@ -120,7 +115,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(EntryUpdateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( @@ -136,7 +130,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: entry = response.parse() assert_matches_type(EntryUpdateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.update( @@ -154,7 +147,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -186,7 +178,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: type="cid", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.list( @@ -195,7 +186,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[EntryListResponse], entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( @@ -208,7 +198,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: entry = response.parse() assert_matches_type(Optional[EntryListResponse], entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.list( @@ -223,7 +212,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -238,25 +226,21 @@ def test_path_params_list(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[EntryDeleteResponse], entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -264,14 +248,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: entry = response.parse() assert_matches_type(Optional[EntryDeleteResponse], entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -281,7 +263,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -289,7 +270,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -297,7 +277,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", - body={}, ) with pytest.raises( @@ -307,10 +286,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get( @@ -320,7 +297,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(EntryGetResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( @@ -334,7 +310,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: entry = response.parse() assert_matches_type(EntryGetResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.get( @@ -350,7 +325,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -380,7 +354,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEntries: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( @@ -391,7 +364,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(EntryCreateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( @@ -403,7 +375,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(EntryCreateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = ( @@ -420,7 +391,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: entry = await response.parse() assert_matches_type(EntryCreateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.create( @@ -437,7 +407,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -456,7 +425,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: type="cid", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( @@ -468,7 +436,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(EntryUpdateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( @@ -481,7 +448,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(EntryUpdateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = ( @@ -499,7 +465,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: entry = await response.parse() assert_matches_type(EntryUpdateResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.update( @@ -517,7 +482,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -549,7 +513,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: type="cid", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.list( @@ -558,7 +521,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[EntryListResponse], entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( @@ -571,7 +533,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: entry = await response.parse() assert_matches_type(Optional[EntryListResponse], entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.list( @@ -586,7 +547,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -601,18 +561,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[EntryDeleteResponse], entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = ( @@ -620,7 +577,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) ) @@ -629,14 +585,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: entry = await response.parse() assert_matches_type(Optional[EntryDeleteResponse], entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -646,7 +600,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -654,7 +607,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -662,7 +614,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", - body={}, ) with pytest.raises( @@ -672,10 +623,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get( @@ -685,7 +634,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(EntryGetResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( @@ -699,7 +647,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: entry = await response.parse() assert_matches_type(EntryGetResponse, entry, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.get( @@ -715,7 +662,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py index b0be6a6b877..9c682cddb81 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_list import ContentList +from cloudflare.types.web3.hostnames.ipfs_universal_paths import ContentList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestContentLists: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: content_list = client.web3.hostnames.ipfs_universal_paths.content_lists.update( @@ -28,7 +27,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(ContentList, content_list, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( @@ -43,7 +41,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: content_list = response.parse() assert_matches_type(ContentList, content_list, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.update( @@ -60,7 +57,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -79,7 +75,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: entries=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: content_list = client.web3.hostnames.ipfs_universal_paths.content_lists.get( @@ -88,7 +83,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ContentList, content_list, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( @@ -101,7 +95,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: content_list = response.parse() assert_matches_type(ContentList, content_list, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.get( @@ -116,7 +109,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -135,7 +127,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContentLists: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: content_list = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.update( @@ -146,7 +137,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ContentList, content_list, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( @@ -161,7 +151,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: content_list = await response.parse() assert_matches_type(ContentList, content_list, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.update( @@ -178,7 +167,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -197,7 +185,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: entries=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: content_list = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.get( @@ -206,7 +193,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ContentList, content_list, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( @@ -219,7 +205,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: content_list = await response.parse() assert_matches_type(ContentList, content_list, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.get( @@ -234,7 +219,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/web3/test_hostnames.py b/tests/api_resources/web3/test_hostnames.py index 2a66e443c93..d12712ea809 100644 --- a/tests/api_resources/web3/test_hostnames.py +++ b/tests/api_resources/web3/test_hostnames.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.web3.hostname import Hostname -from cloudflare.types.web3.hostname_delete_response import HostnameDeleteResponse +from cloudflare.types.web3 import Hostname, HostnameDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestHostnames: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.create( @@ -28,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.create( @@ -39,7 +36,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.create( @@ -52,7 +48,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: hostname = response.parse() assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.create( @@ -67,7 +62,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -76,7 +70,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: target="ipfs", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.list( @@ -84,7 +77,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Hostname], hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.list( @@ -96,7 +88,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: hostname = response.parse() assert_matches_type(SyncSinglePage[Hostname], hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.list( @@ -110,7 +101,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -118,23 +108,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[HostnameDeleteResponse], hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -142,13 +128,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: hostname = response.parse() assert_matches_type(Optional[HostnameDeleteResponse], hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -158,24 +142,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.edit( @@ -184,7 +164,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.edit( @@ -195,7 +174,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.edit( @@ -208,7 +186,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: hostname = response.parse() assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.edit( @@ -223,7 +200,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -238,7 +214,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.get( @@ -247,7 +222,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.get( @@ -260,7 +234,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: hostname = response.parse() assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.get( @@ -275,7 +248,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -294,7 +266,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHostnames: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.create( @@ -303,7 +274,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.create( @@ -314,7 +284,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.create( @@ -327,7 +296,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: hostname = await response.parse() assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.create( @@ -342,7 +310,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -351,7 +318,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: target="ipfs", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.list( @@ -359,7 +325,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Hostname], hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.list( @@ -371,7 +336,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: hostname = await response.parse() assert_matches_type(AsyncSinglePage[Hostname], hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.list( @@ -385,7 +349,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -393,23 +356,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(Optional[HostnameDeleteResponse], hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -417,13 +376,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: hostname = await response.parse() assert_matches_type(Optional[HostnameDeleteResponse], hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -433,24 +390,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.delete( "", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.edit( @@ -459,7 +412,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.edit( @@ -470,7 +422,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.edit( @@ -483,7 +434,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: hostname = await response.parse() assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.edit( @@ -498,7 +448,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): @@ -513,7 +462,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.get( @@ -522,7 +470,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.get( @@ -535,7 +482,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: hostname = await response.parse() assert_matches_type(Hostname, hostname, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.get( @@ -550,7 +496,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py index 7ace8aa2329..9a748afefda 100644 --- a/tests/api_resources/workers/scripts/test_content.py +++ b/tests/api_resources/workers/scripts/test_content.py @@ -17,7 +17,7 @@ StreamedBinaryAPIResponse, AsyncStreamedBinaryAPIResponse, ) -from cloudflare.types.workers.script import Script +from cloudflare.types.workers import Script base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestContent: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: content = client.workers.scripts.content.update( @@ -34,7 +34,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: content = client.workers.scripts.content.update( @@ -48,7 +48,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers.scripts.content.with_raw_response.update( @@ -61,7 +61,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: content = response.parse() assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers.scripts.content.with_streaming_response.update( @@ -76,7 +76,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -91,7 +91,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -107,7 +106,6 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: assert cast(Any, content.is_closed) is True assert isinstance(content, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -125,7 +123,6 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N assert content.json() == {"foo": "bar"} assert isinstance(content, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -145,7 +142,6 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter assert cast(Any, content.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_path_params_get(self, client: Cloudflare) -> None: @@ -165,7 +161,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContent: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers.scripts.content.update( @@ -174,7 +170,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers.scripts.content.update( @@ -188,7 +184,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.content.with_raw_response.update( @@ -201,7 +197,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: content = await response.parse() assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.content.with_streaming_response.update( @@ -216,7 +212,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -231,7 +227,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -247,7 +242,6 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR assert cast(Any, content.is_closed) is True assert isinstance(content, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -265,7 +259,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: assert await content.json() == {"foo": "bar"} assert isinstance(content, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -285,7 +278,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx assert cast(Any, content.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_deployments.py b/tests/api_resources/workers/scripts/test_deployments.py index e28875a538e..c49a56a7326 100644 --- a/tests/api_resources/workers/scripts/test_deployments.py +++ b/tests/api_resources/workers/scripts/test_deployments.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.scripts.deployment_get_response import DeploymentGetResponse -from cloudflare.types.workers.scripts.deployment_create_response import DeploymentCreateResponse +from cloudflare.types.workers.scripts import ( + DeploymentGetResponse, + DeploymentCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestDeployments: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.create( @@ -27,7 +28,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.create( @@ -38,7 +38,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers.scripts.deployments.with_raw_response.create( @@ -51,7 +50,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: deployment = response.parse() assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers.scripts.deployments.with_streaming_response.create( @@ -66,7 +64,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -81,7 +78,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.get( @@ -90,7 +86,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.deployments.with_raw_response.get( @@ -103,7 +98,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: deployment = response.parse() assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.deployments.with_streaming_response.get( @@ -118,7 +112,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -137,7 +130,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDeployments: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.create( @@ -146,7 +138,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.create( @@ -157,7 +148,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.deployments.with_raw_response.create( @@ -170,7 +160,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: deployment = await response.parse() assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.deployments.with_streaming_response.create( @@ -185,7 +174,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -200,7 +188,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.get( @@ -209,7 +196,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.deployments.with_raw_response.get( @@ -222,7 +208,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: deployment = await response.parse() assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.deployments.with_streaming_response.get( @@ -237,7 +222,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers/scripts/test_schedules.py b/tests/api_resources/workers/scripts/test_schedules.py index 819dd9d202d..1e4fbf7a577 100644 --- a/tests/api_resources/workers/scripts/test_schedules.py +++ b/tests/api_resources/workers/scripts/test_schedules.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.scripts.schedule_get_response import ScheduleGetResponse -from cloudflare.types.workers.scripts.schedule_update_response import ScheduleUpdateResponse +from cloudflare.types.workers.scripts import ScheduleGetResponse, ScheduleUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestSchedules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: schedule = client.workers.scripts.schedules.update( @@ -28,7 +26,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ScheduleUpdateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers.scripts.schedules.with_raw_response.update( @@ -42,7 +39,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: schedule = response.parse() assert_matches_type(Optional[ScheduleUpdateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers.scripts.schedules.with_streaming_response.update( @@ -58,7 +54,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -75,7 +70,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body="[{'cron': '*/30 * * * *'}]", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: schedule = client.workers.scripts.schedules.get( @@ -84,7 +78,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ScheduleGetResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.schedules.with_raw_response.get( @@ -97,7 +90,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: schedule = response.parse() assert_matches_type(Optional[ScheduleGetResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.schedules.with_streaming_response.get( @@ -112,7 +104,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -131,7 +122,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchedules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.workers.scripts.schedules.update( @@ -141,7 +131,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ScheduleUpdateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.schedules.with_raw_response.update( @@ -155,7 +144,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: schedule = await response.parse() assert_matches_type(Optional[ScheduleUpdateResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.schedules.with_streaming_response.update( @@ -171,7 +159,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -188,7 +175,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body="[{'cron': '*/30 * * * *'}]", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.workers.scripts.schedules.get( @@ -197,7 +183,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ScheduleGetResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.schedules.with_raw_response.get( @@ -210,7 +195,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: schedule = await response.parse() assert_matches_type(Optional[ScheduleGetResponse], schedule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.schedules.with_streaming_response.get( @@ -225,7 +209,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers/scripts/test_settings.py b/tests/api_resources/workers/scripts/test_settings.py index 82e55e0a563..2a599b792e3 100644 --- a/tests/api_resources/workers/scripts/test_settings.py +++ b/tests/api_resources/workers/scripts/test_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.script_setting import ScriptSetting +from cloudflare.types.workers import ScriptSetting base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.workers.scripts.settings.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.workers.scripts.settings.edit( @@ -53,7 +51,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.workers.scripts.settings.with_raw_response.edit( @@ -66,7 +63,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.workers.scripts.settings.with_streaming_response.edit( @@ -81,7 +77,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -96,7 +91,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.workers.scripts.settings.get( @@ -105,7 +99,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.settings.with_raw_response.get( @@ -118,7 +111,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.settings.with_streaming_response.get( @@ -133,7 +125,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -152,7 +143,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers.scripts.settings.edit( @@ -161,7 +151,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers.scripts.settings.edit( @@ -188,7 +177,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.settings.with_raw_response.edit( @@ -201,7 +189,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.settings.with_streaming_response.edit( @@ -216,7 +203,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -231,7 +217,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers.scripts.settings.get( @@ -240,7 +225,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.settings.with_raw_response.get( @@ -253,7 +237,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.settings.with_streaming_response.get( @@ -268,7 +251,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers/scripts/test_tail.py b/tests/api_resources/workers/scripts/test_tail.py index 9088693f5b9..bfae28b968d 100644 --- a/tests/api_resources/workers/scripts/test_tail.py +++ b/tests/api_resources/workers/scripts/test_tail.py @@ -9,9 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.scripts.tail_get_response import TailGetResponse -from cloudflare.types.workers.scripts.tail_create_response import TailCreateResponse -from cloudflare.types.workers.scripts.tail_delete_response import TailDeleteResponse +from cloudflare.types.workers.scripts import TailGetResponse, TailCreateResponse, TailDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +17,6 @@ class TestTail: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: tail = client.workers.scripts.tail.create( @@ -29,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TailCreateResponse], tail, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers.scripts.tail.with_raw_response.create( @@ -43,7 +39,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: tail = response.parse() assert_matches_type(Optional[TailCreateResponse], tail, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers.scripts.tail.with_streaming_response.create( @@ -59,7 +54,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -76,25 +70,21 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: tail = client.workers.scripts.tail.delete( "03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", - body={}, ) assert_matches_type(TailDeleteResponse, tail, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers.scripts.tail.with_raw_response.delete( "03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", - body={}, ) assert response.is_closed is True @@ -102,14 +92,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: tail = response.parse() assert_matches_type(TailDeleteResponse, tail, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers.scripts.tail.with_streaming_response.delete( "03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -119,7 +107,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -127,7 +114,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "03dc9f77817b488fb26c5861ec18f791", account_id="", script_name="this-is_my_script-01", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): @@ -135,7 +121,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -143,10 +128,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tail = client.workers.scripts.tail.get( @@ -155,7 +138,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TailGetResponse], tail, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.tail.with_raw_response.get( @@ -168,7 +150,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tail = response.parse() assert_matches_type(Optional[TailGetResponse], tail, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.tail.with_streaming_response.get( @@ -183,7 +164,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -202,7 +182,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTail: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: tail = await async_client.workers.scripts.tail.create( @@ -212,7 +191,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TailCreateResponse], tail, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.tail.with_raw_response.create( @@ -226,7 +204,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: tail = await response.parse() assert_matches_type(Optional[TailCreateResponse], tail, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.tail.with_streaming_response.create( @@ -242,7 +219,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -259,25 +235,21 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tail = await async_client.workers.scripts.tail.delete( "03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", - body={}, ) assert_matches_type(TailDeleteResponse, tail, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.tail.with_raw_response.delete( "03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", - body={}, ) assert response.is_closed is True @@ -285,14 +257,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: tail = await response.parse() assert_matches_type(TailDeleteResponse, tail, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.tail.with_streaming_response.delete( "03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -302,7 +272,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -310,7 +279,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "03dc9f77817b488fb26c5861ec18f791", account_id="", script_name="this-is_my_script-01", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): @@ -318,7 +286,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -326,10 +293,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tail = await async_client.workers.scripts.tail.get( @@ -338,7 +303,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TailGetResponse], tail, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.tail.with_raw_response.get( @@ -351,7 +315,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tail = await response.parse() assert_matches_type(Optional[TailGetResponse], tail, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.tail.with_streaming_response.get( @@ -366,7 +329,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers/scripts/test_versions.py b/tests/api_resources/workers/scripts/test_versions.py index 428b8e53911..11e2b69000d 100644 --- a/tests/api_resources/workers/scripts/test_versions.py +++ b/tests/api_resources/workers/scripts/test_versions.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.scripts.version_get_response import VersionGetResponse -from cloudflare.types.workers.scripts.version_list_response import VersionListResponse -from cloudflare.types.workers.scripts.version_create_response import VersionCreateResponse +from cloudflare.types.workers.scripts import ( + VersionGetResponse, + VersionListResponse, + VersionCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,7 @@ class TestVersions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.create( @@ -28,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.create( @@ -56,7 +58,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers.scripts.versions.with_raw_response.create( @@ -69,7 +71,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: version = response.parse() assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers.scripts.versions.with_streaming_response.create( @@ -84,7 +86,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -99,7 +101,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.list( @@ -108,7 +109,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[VersionListResponse], version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers.scripts.versions.with_raw_response.list( @@ -121,7 +121,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: version = response.parse() assert_matches_type(Optional[VersionListResponse], version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers.scripts.versions.with_streaming_response.list( @@ -136,7 +135,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -151,7 +149,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.get( @@ -161,7 +158,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[VersionGetResponse], version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.versions.with_raw_response.get( @@ -175,7 +171,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: version = response.parse() assert_matches_type(Optional[VersionGetResponse], version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.versions.with_streaming_response.get( @@ -191,7 +186,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -219,7 +213,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVersions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.create( @@ -228,7 +222,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.create( @@ -256,7 +250,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.versions.with_raw_response.create( @@ -269,7 +263,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: version = await response.parse() assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.versions.with_streaming_response.create( @@ -284,7 +278,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -299,7 +293,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.list( @@ -308,7 +301,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[VersionListResponse], version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.versions.with_raw_response.list( @@ -321,7 +313,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: version = await response.parse() assert_matches_type(Optional[VersionListResponse], version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.versions.with_streaming_response.list( @@ -336,7 +327,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -351,7 +341,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.get( @@ -361,7 +350,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[VersionGetResponse], version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.versions.with_raw_response.get( @@ -375,7 +363,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: version = await response.parse() assert_matches_type(Optional[VersionGetResponse], version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.versions.with_streaming_response.get( @@ -391,7 +378,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers/test_account_settings.py b/tests/api_resources/workers/test_account_settings.py index a50f539dd43..c08e890ea55 100644 --- a/tests/api_resources/workers/test_account_settings.py +++ b/tests/api_resources/workers/test_account_settings.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.account_setting_get_response import AccountSettingGetResponse -from cloudflare.types.workers.account_setting_update_response import AccountSettingUpdateResponse +from cloudflare.types.workers import ( + AccountSettingGetResponse, + AccountSettingUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestAccountSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: account_setting = client.workers.account_settings.update( @@ -27,7 +28,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AccountSettingUpdateResponse], account_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers.account_settings.with_raw_response.update( @@ -40,7 +40,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: account_setting = response.parse() assert_matches_type(Optional[AccountSettingUpdateResponse], account_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers.account_settings.with_streaming_response.update( @@ -55,7 +54,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +62,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body="{'default_usage_model': 'unbound'}", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: account_setting = client.workers.account_settings.get( @@ -72,7 +69,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AccountSettingGetResponse], account_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.account_settings.with_raw_response.get( @@ -84,7 +80,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: account_setting = response.parse() assert_matches_type(Optional[AccountSettingGetResponse], account_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.account_settings.with_streaming_response.get( @@ -98,7 +93,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -110,7 +104,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccountSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_setting = await async_client.workers.account_settings.update( @@ -119,7 +112,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AccountSettingUpdateResponse], account_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.account_settings.with_raw_response.update( @@ -132,7 +124,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: account_setting = await response.parse() assert_matches_type(Optional[AccountSettingUpdateResponse], account_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.account_settings.with_streaming_response.update( @@ -147,7 +138,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -156,7 +146,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body="{'default_usage_model': 'unbound'}", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_setting = await async_client.workers.account_settings.get( @@ -164,7 +153,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AccountSettingGetResponse], account_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.account_settings.with_raw_response.get( @@ -176,7 +164,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: account_setting = await response.parse() assert_matches_type(Optional[AccountSettingGetResponse], account_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.account_settings.with_streaming_response.get( @@ -190,7 +177,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index 0958f116c5b..80da34bc005 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.ai_run_response import AIRunResponse +from cloudflare.types.workers import AIRunResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAI: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_run_overload_1(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -27,7 +26,6 @@ def test_method_run_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( @@ -41,7 +39,6 @@ def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( @@ -57,7 +54,6 @@ def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -74,7 +70,6 @@ def test_path_params_run_overload_1(self, client: Cloudflare) -> None: text="x", ) - @pytest.mark.skip() @parametrize def test_method_run_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -84,7 +79,6 @@ def test_method_run_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_run_with_all_params_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -99,7 +93,6 @@ def test_method_run_with_all_params_overload_2(self, client: Cloudflare) -> None ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( @@ -113,7 +106,6 @@ def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( @@ -129,7 +121,6 @@ def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -146,7 +137,6 @@ def test_path_params_run_overload_2(self, client: Cloudflare) -> None: prompt="x", ) - @pytest.mark.skip() @parametrize def test_method_run_overload_3(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -157,7 +147,6 @@ def test_method_run_overload_3(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( @@ -172,7 +161,6 @@ def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( @@ -189,7 +177,6 @@ def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -208,7 +195,6 @@ def test_path_params_run_overload_3(self, client: Cloudflare) -> None: source="x", ) - @pytest.mark.skip() @parametrize def test_method_run_overload_4(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -218,7 +204,6 @@ def test_method_run_overload_4(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( @@ -232,7 +217,6 @@ def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( @@ -248,7 +232,6 @@ def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -265,18 +248,8 @@ def test_path_params_run_overload_4(self, client: Cloudflare) -> None: text="x", ) - @pytest.mark.skip() @parametrize def test_method_run_overload_5(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_run_with_all_params_overload_5(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -284,12 +257,12 @@ def test_method_run_with_all_params_overload_5(self, client: Cloudflare) -> None ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + audio=[0, 0, 0], ) assert response.is_closed is True @@ -297,12 +270,12 @@ def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + audio=[0, 0, 0], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -312,33 +285,24 @@ def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( "string", account_id="", + audio=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", + audio=[0, 0, 0], ) - @pytest.mark.skip() @parametrize def test_method_run_overload_6(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_run_with_all_params_overload_6(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -346,12 +310,12 @@ def test_method_run_with_all_params_overload_6(self, client: Cloudflare) -> None ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + image=[0, 0, 0], ) assert response.is_closed is True @@ -359,12 +323,12 @@ def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + image=[0, 0, 0], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -374,22 +338,22 @@ def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( "string", account_id="", + image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", + image=[0, 0, 0], ) - @pytest.mark.skip() @parametrize def test_method_run_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -398,7 +362,6 @@ def test_method_run_overload_7(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -408,7 +371,6 @@ def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( @@ -421,7 +383,6 @@ def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( @@ -436,7 +397,6 @@ def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -451,7 +411,6 @@ def test_path_params_run_overload_7(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_run_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -460,7 +419,6 @@ def test_method_run_overload_8(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -488,7 +446,6 @@ def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( @@ -501,7 +458,6 @@ def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( @@ -516,7 +472,6 @@ def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -531,7 +486,6 @@ def test_path_params_run_overload_8(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_run_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -542,7 +496,6 @@ def test_method_run_overload_9(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -554,7 +507,6 @@ def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( @@ -569,7 +521,6 @@ def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( @@ -586,7 +537,6 @@ def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -605,7 +555,6 @@ def test_path_params_run_overload_9(self, client: Cloudflare) -> None: text="x", ) - @pytest.mark.skip() @parametrize def test_method_run_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -615,7 +564,6 @@ def test_method_run_overload_10(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -626,7 +574,6 @@ def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( @@ -640,7 +587,6 @@ def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( @@ -656,7 +602,6 @@ def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -673,7 +618,6 @@ def test_path_params_run_overload_10(self, client: Cloudflare) -> None: input_text="x", ) - @pytest.mark.skip() @parametrize def test_method_run_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -683,7 +627,6 @@ def test_method_run_overload_11(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( @@ -711,7 +654,6 @@ def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> Non ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( @@ -725,7 +667,6 @@ def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( @@ -741,7 +682,6 @@ def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_run_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -762,7 +702,6 @@ def test_path_params_run_overload_11(self, client: Cloudflare) -> None: class TestAsyncAI: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -772,7 +711,6 @@ async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> Non ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( @@ -786,7 +724,6 @@ async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( @@ -802,7 +739,6 @@ async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -819,7 +755,6 @@ async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) - text="x", ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -829,7 +764,6 @@ async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> Non ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_run_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -844,7 +778,6 @@ async def test_method_run_with_all_params_overload_2(self, async_client: AsyncCl ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( @@ -858,7 +791,6 @@ async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( @@ -874,7 +806,6 @@ async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -891,7 +822,6 @@ async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) - prompt="x", ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -902,7 +832,6 @@ async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> Non ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( @@ -917,7 +846,6 @@ async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( @@ -934,7 +862,6 @@ async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -953,7 +880,6 @@ async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) - source="x", ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -963,7 +889,6 @@ async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> Non ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( @@ -977,7 +902,6 @@ async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( @@ -993,7 +917,6 @@ async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1010,18 +933,8 @@ async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) - text="x", ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_run_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1029,12 +942,12 @@ async def test_method_run_with_all_params_overload_5(self, async_client: AsyncCl ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + audio=[0, 0, 0], ) assert response.is_closed is True @@ -1042,12 +955,12 @@ async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + audio=[0, 0, 0], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1057,33 +970,24 @@ async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( "string", account_id="", + audio=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", + audio=[0, 0, 0], ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_run_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1091,12 +995,12 @@ async def test_method_run_with_all_params_overload_6(self, async_client: AsyncCl ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + image=[0, 0, 0], ) assert response.is_closed is True @@ -1104,12 +1008,12 @@ async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + image=[0, 0, 0], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1119,22 +1023,22 @@ async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( "string", account_id="", + image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", + image=[0, 0, 0], ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1143,7 +1047,6 @@ async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> Non ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1153,7 +1056,6 @@ async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCl ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( @@ -1166,7 +1068,6 @@ async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( @@ -1181,7 +1082,6 @@ async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1196,7 +1096,6 @@ async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) - account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1205,7 +1104,6 @@ async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> Non ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1233,7 +1131,6 @@ async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCl ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( @@ -1246,7 +1143,6 @@ async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( @@ -1261,7 +1157,6 @@ async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1276,7 +1171,6 @@ async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) - account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1287,7 +1181,6 @@ async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> Non ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1299,7 +1192,6 @@ async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCl ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( @@ -1314,7 +1206,6 @@ async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( @@ -1331,7 +1222,6 @@ async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1350,7 +1240,6 @@ async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) - text="x", ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1360,7 +1249,6 @@ async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1371,7 +1259,6 @@ async def test_method_run_with_all_params_overload_10(self, async_client: AsyncC ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( @@ -1385,7 +1272,6 @@ async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( @@ -1401,7 +1287,6 @@ async def test_streaming_response_run_overload_10(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1418,7 +1303,6 @@ async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) input_text="x", ) - @pytest.mark.skip() @parametrize async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1428,7 +1312,6 @@ async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> No ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( @@ -1456,7 +1339,6 @@ async def test_method_run_with_all_params_overload_11(self, async_client: AsyncC ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( @@ -1470,7 +1352,6 @@ async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) ai = await response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( @@ -1486,7 +1367,6 @@ async def test_streaming_response_run_overload_11(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers/test_domains.py b/tests/api_resources/workers/test_domains.py index 040392d1008..7de5c103792 100644 --- a/tests/api_resources/workers/test_domains.py +++ b/tests/api_resources/workers/test_domains.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.workers.domain import Domain +from cloudflare.types.workers import Domain base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestDomains: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: domain = client.workers.domains.update( @@ -30,7 +29,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers.domains.with_raw_response.update( @@ -46,7 +44,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers.domains.with_streaming_response.update( @@ -64,7 +61,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -76,7 +72,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: zone_id="593c9c94de529bbbfaac7c53ced0447d", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: domain = client.workers.domains.list( @@ -84,7 +79,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: domain = client.workers.domains.list( @@ -97,7 +91,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers.domains.with_raw_response.list( @@ -109,7 +102,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(SyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers.domains.with_streaming_response.list( @@ -123,7 +115,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -131,23 +122,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: domain = client.workers.domains.delete( "dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", - body={}, ) assert domain is None - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers.domains.with_raw_response.delete( "dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", - body={}, ) assert response.is_closed is True @@ -155,13 +142,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: domain = response.parse() assert domain is None - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers.domains.with_streaming_response.delete( "dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -171,24 +156,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.domains.with_raw_response.delete( "dbe10b4bc17c295377eabd600e1787fd", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): client.workers.domains.with_raw_response.delete( "", account_id="9a7806061c88ada191ed06f989cc3dac", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.workers.domains.get( @@ -197,7 +178,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.domains.with_raw_response.get( @@ -210,7 +190,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: domain = response.parse() assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.domains.with_streaming_response.get( @@ -225,7 +204,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -244,7 +222,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.update( @@ -256,7 +233,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.domains.with_raw_response.update( @@ -272,7 +248,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.domains.with_streaming_response.update( @@ -290,7 +265,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -302,7 +276,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: zone_id="593c9c94de529bbbfaac7c53ced0447d", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.list( @@ -310,7 +283,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.list( @@ -323,7 +295,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.domains.with_raw_response.list( @@ -335,7 +306,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(AsyncSinglePage[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.domains.with_streaming_response.list( @@ -349,7 +319,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -357,23 +326,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.delete( "dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", - body={}, ) assert domain is None - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.domains.with_raw_response.delete( "dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", - body={}, ) assert response.is_closed is True @@ -381,13 +346,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert domain is None - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.domains.with_streaming_response.delete( "dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -397,24 +360,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.domains.with_raw_response.delete( "dbe10b4bc17c295377eabd600e1787fd", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): await async_client.workers.domains.with_raw_response.delete( "", account_id="9a7806061c88ada191ed06f989cc3dac", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.get( @@ -423,7 +382,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.domains.with_raw_response.get( @@ -436,7 +394,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: domain = await response.parse() assert_matches_type(Optional[Domain], domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.domains.with_streaming_response.get( @@ -451,7 +408,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py index 64fb9e37a6a..0bd3fc17497 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -18,7 +18,7 @@ AsyncStreamedBinaryAPIResponse, ) from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.workers.script import Script +from cloudflare.types.workers import Script base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +26,7 @@ class TestScripts: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: script = client.workers.scripts.update( @@ -35,7 +35,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: script = client.workers.scripts.update( @@ -119,7 +119,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.update( @@ -132,7 +132,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: script = response.parse() assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.update( @@ -147,7 +147,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -162,7 +162,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: script = client.workers.scripts.update( @@ -171,7 +171,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: script = client.workers.scripts.update( @@ -182,7 +182,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.update( @@ -195,7 +195,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: script = response.parse() assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.update( @@ -210,7 +210,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -225,7 +225,6 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: script = client.workers.scripts.list( @@ -233,7 +232,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.list( @@ -245,7 +243,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: script = response.parse() assert_matches_type(SyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.list( @@ -259,7 +256,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -267,34 +263,28 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: script = client.workers.scripts.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert script is None - @pytest.mark.skip() @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: script = client.workers.scripts.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, force=True, ) assert script is None - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -302,13 +292,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: script = response.parse() assert script is None - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -318,24 +306,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.with_raw_response.delete( "this-is_my_script-01", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -351,7 +335,6 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: assert cast(Any, script.is_closed) is True assert isinstance(script, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -369,7 +352,6 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N assert script.json() == {"foo": "bar"} assert isinstance(script, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -389,7 +371,6 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter assert cast(Any, script.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_path_params_get(self, client: Cloudflare) -> None: @@ -409,7 +390,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScripts: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( @@ -418,7 +399,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( @@ -502,7 +483,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.update( @@ -515,7 +496,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar script = await response.parse() assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.update( @@ -530,7 +511,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -545,7 +526,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( @@ -554,7 +535,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( @@ -565,7 +546,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.update( @@ -578,7 +559,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar script = await response.parse() assert_matches_type(Optional[Script], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.update( @@ -593,7 +574,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -608,7 +589,6 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.list( @@ -616,7 +596,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.list( @@ -628,7 +607,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: script = await response.parse() assert_matches_type(AsyncSinglePage[Script], script, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.list( @@ -642,7 +620,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -650,34 +627,28 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert script is None - @pytest.mark.skip() @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, force=True, ) assert script is None - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -685,13 +656,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: script = await response.parse() assert script is None - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -701,24 +670,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.with_raw_response.delete( "this-is_my_script-01", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -734,7 +699,6 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR assert cast(Any, script.is_closed) is True assert isinstance(script, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -752,7 +716,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: assert await script.json() == {"foo": "bar"} assert isinstance(script, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -772,7 +735,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx assert cast(Any, script.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/test_subdomains.py b/tests/api_resources/workers/test_subdomains.py index b695557c469..7d4b05f92d4 100644 --- a/tests/api_resources/workers/test_subdomains.py +++ b/tests/api_resources/workers/test_subdomains.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.subdomain_get_response import SubdomainGetResponse -from cloudflare.types.workers.subdomain_update_response import SubdomainUpdateResponse +from cloudflare.types.workers import SubdomainGetResponse, SubdomainUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestSubdomains: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: subdomain = client.workers.subdomains.update( @@ -27,7 +25,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SubdomainUpdateResponse], subdomain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers.subdomains.with_raw_response.update( @@ -40,7 +37,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: subdomain = response.parse() assert_matches_type(Optional[SubdomainUpdateResponse], subdomain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers.subdomains.with_streaming_response.update( @@ -55,7 +51,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +59,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body="{'subdomain': 'example-subdomain'}", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: subdomain = client.workers.subdomains.get( @@ -72,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SubdomainGetResponse], subdomain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.subdomains.with_raw_response.get( @@ -84,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: subdomain = response.parse() assert_matches_type(Optional[SubdomainGetResponse], subdomain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.subdomains.with_streaming_response.get( @@ -98,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -110,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubdomains: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: subdomain = await async_client.workers.subdomains.update( @@ -119,7 +109,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SubdomainUpdateResponse], subdomain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.subdomains.with_raw_response.update( @@ -132,7 +121,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: subdomain = await response.parse() assert_matches_type(Optional[SubdomainUpdateResponse], subdomain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.subdomains.with_streaming_response.update( @@ -147,7 +135,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -156,7 +143,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body="{'subdomain': 'example-subdomain'}", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: subdomain = await async_client.workers.subdomains.get( @@ -164,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SubdomainGetResponse], subdomain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.subdomains.with_raw_response.get( @@ -176,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: subdomain = await response.parse() assert_matches_type(Optional[SubdomainGetResponse], subdomain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.subdomains.with_streaming_response.get( @@ -190,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py index 0b7b218871d..29c42f700b9 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.binding_get_response import BindingGetResponse +from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import BindingGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestBindings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: binding = client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get( @@ -27,7 +26,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BindingGetResponse], binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( @@ -41,7 +39,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: binding = response.parse() assert_matches_type(Optional[BindingGetResponse], binding, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_streaming_response.get( @@ -57,7 +54,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -85,7 +81,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBindings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: binding = await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BindingGetResponse], binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( @@ -109,7 +103,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: binding = await response.parse() assert_matches_type(Optional[BindingGetResponse], binding, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_streaming_response.get( @@ -125,7 +118,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py index 40d878f790d..a9073edfee5 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py @@ -17,7 +17,7 @@ StreamedBinaryAPIResponse, AsyncStreamedBinaryAPIResponse, ) -from cloudflare.types.workers.script import Script +from cloudflare.types.workers import Script base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestContent: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: content = client.workers_for_platforms.dispatch.namespaces.scripts.content.update( @@ -35,7 +35,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: content = client.workers_for_platforms.dispatch.namespaces.scripts.content.update( @@ -50,7 +50,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( @@ -64,7 +64,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: content = response.parse() assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.update( @@ -80,7 +80,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -104,7 +104,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -121,7 +120,6 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: assert cast(Any, content.is_closed) is True assert isinstance(content, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -140,7 +138,6 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N assert content.json() == {"foo": "bar"} assert isinstance(content, BinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @@ -161,7 +158,6 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter assert cast(Any, content.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) def test_path_params_get(self, client: Cloudflare) -> None: @@ -190,7 +186,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContent: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.update( @@ -200,7 +196,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.update( @@ -215,7 +211,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = ( @@ -231,7 +227,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: content = await response.parse() assert_matches_type(Optional[Script], content, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.update( @@ -247,7 +243,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -271,7 +267,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -288,7 +283,6 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR assert cast(Any, content.is_closed) is True assert isinstance(content, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -307,7 +301,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: assert await content.json() == {"foo": "bar"} assert isinstance(content, AsyncBinaryAPIResponse) - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: @@ -328,7 +321,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx assert cast(Any, content.is_closed) is True - @pytest.mark.skip() @parametrize @pytest.mark.respx(base_url=base_url) async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py index a268b18bd51..d839e9074b8 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.secret_list_response import SecretListResponse -from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.secret_update_response import ( +from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import ( + SecretListResponse, SecretUpdateResponse, ) @@ -21,7 +21,6 @@ class TestSecrets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: secret = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( @@ -31,7 +30,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SecretUpdateResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: secret = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( @@ -44,7 +42,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SecretUpdateResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( @@ -58,7 +55,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: secret = response.parse() assert_matches_type(Optional[SecretUpdateResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.update( @@ -74,7 +70,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -98,7 +93,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: secret = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.list( @@ -108,7 +102,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[SecretListResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( @@ -122,7 +115,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: secret = response.parse() assert_matches_type(SyncSinglePage[SecretListResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.list( @@ -138,7 +130,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -166,7 +157,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSecrets: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: secret = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( @@ -176,7 +166,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SecretUpdateResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: secret = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( @@ -189,7 +178,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[SecretUpdateResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = ( @@ -205,7 +193,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: secret = await response.parse() assert_matches_type(Optional[SecretUpdateResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.update( @@ -221,7 +208,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -245,7 +231,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: secret = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.list( @@ -255,7 +240,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[SecretListResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( @@ -269,7 +253,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: secret = await response.parse() assert_matches_type(AsyncSinglePage[SecretListResponse], secret, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.list( @@ -285,7 +268,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py index 227235e8b47..c96a0c83565 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.setting_get_response import SettingGetResponse -from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.setting_edit_response import SettingEditResponse +from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import ( + SettingGetResponse, + SettingEditResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,7 @@ class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( @@ -28,7 +30,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( @@ -106,7 +108,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( @@ -120,7 +122,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.edit( @@ -136,7 +138,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -160,7 +162,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.get( @@ -170,7 +171,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( @@ -184,7 +184,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.get( @@ -200,7 +199,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -228,7 +226,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( @@ -238,7 +236,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( @@ -316,7 +314,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( @@ -330,7 +328,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.edit( @@ -346,7 +344,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -370,7 +368,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.get( @@ -380,7 +377,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( @@ -394,7 +390,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.get( @@ -410,7 +405,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py index 7b6b13efd80..a72e6183c72 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.tag_list_response import TagListResponse -from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.tag_update_response import TagUpdateResponse +from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import ( + TagListResponse, + TagUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestTags: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: tag = client.workers_for_platforms.dispatch.namespaces.scripts.tags.update( @@ -30,7 +31,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TagUpdateResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( @@ -45,7 +45,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: tag = response.parse() assert_matches_type(Optional[TagUpdateResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.update( @@ -62,7 +61,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -89,7 +87,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body=["my-tag", "my-tag", "my-tag"], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: tag = client.workers_for_platforms.dispatch.namespaces.scripts.tags.list( @@ -99,7 +96,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[TagListResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( @@ -113,7 +109,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: tag = response.parse() assert_matches_type(SyncSinglePage[TagListResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.list( @@ -129,7 +124,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -153,7 +147,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: tag = client.workers_for_platforms.dispatch.namespaces.scripts.tags.delete( @@ -164,7 +157,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(object, tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( @@ -179,7 +171,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: tag = response.parse() assert_matches_type(object, tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.delete( @@ -196,7 +187,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -235,7 +225,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncTags: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tag = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.update( @@ -246,7 +235,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TagUpdateResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( @@ -261,7 +249,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: tag = await response.parse() assert_matches_type(Optional[TagUpdateResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.update( @@ -278,7 +265,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -305,7 +291,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body=["my-tag", "my-tag", "my-tag"], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: tag = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.list( @@ -315,7 +300,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[TagListResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( @@ -329,7 +313,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: tag = await response.parse() assert_matches_type(AsyncSinglePage[TagListResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.list( @@ -345,7 +328,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -369,7 +351,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tag = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.delete( @@ -380,7 +361,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(object, tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( @@ -395,7 +375,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: tag = await response.parse() assert_matches_type(object, tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.delete( @@ -412,7 +391,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py index b9d28ce6a0d..13bbacf62f1 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.script import Script as WorkersScript -from cloudflare.types.workers_for_platforms.dispatch.namespaces.script import Script as NamespacesScript +from cloudflare.types.workers import Script as WorkersScript +from cloudflare.types.workers_for_platforms.dispatch.namespaces import ( + Script as NamespacesScript, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,7 @@ class TestScripts: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( @@ -28,7 +30,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( @@ -112,7 +114,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( @@ -126,7 +128,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: script = response.parse() assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( @@ -142,7 +144,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -166,7 +168,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( @@ -176,7 +178,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( @@ -187,7 +189,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( @@ -201,7 +203,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: script = response.parse() assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( @@ -217,7 +219,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -241,37 +243,31 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, ) assert script is None - @pytest.mark.skip() @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, force=True, ) assert script is None - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, ) assert response.is_closed is True @@ -279,14 +275,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: script = response.parse() assert script is None - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -296,7 +290,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -304,7 +297,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): @@ -312,7 +304,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): @@ -320,10 +311,8 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.get( @@ -333,7 +322,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[NamespacesScript], script, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( @@ -347,7 +335,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: script = response.parse() assert_matches_type(Optional[NamespacesScript], script, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.get( @@ -363,7 +350,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -391,7 +377,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScripts: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( @@ -401,7 +387,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( @@ -485,7 +471,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( @@ -499,7 +485,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar script = await response.parse() assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( @@ -515,7 +501,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -539,7 +525,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( @@ -549,7 +535,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( @@ -560,7 +546,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( @@ -574,7 +560,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar script = await response.parse() assert_matches_type(Optional[WorkersScript], script, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( @@ -590,7 +576,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -614,37 +600,31 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare dispatch_namespace="my-dispatch-namespace", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, ) assert script is None - @pytest.mark.skip() @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, force=True, ) assert script is None - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, ) assert response.is_closed is True @@ -652,14 +632,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: script = await response.parse() assert script is None - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.delete( "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -669,7 +647,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -677,7 +654,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): @@ -685,7 +661,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): @@ -693,10 +668,8 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.get( @@ -706,7 +679,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[NamespacesScript], script, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( @@ -720,7 +692,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: script = await response.parse() assert_matches_type(Optional[NamespacesScript], script, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.get( @@ -736,7 +707,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py index d5eb35b1ce4..cecc0bdbcf4 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py +++ b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.workers_for_platforms.dispatch.namespace_get_response import NamespaceGetResponse -from cloudflare.types.workers_for_platforms.dispatch.namespace_list_response import NamespaceListResponse -from cloudflare.types.workers_for_platforms.dispatch.namespace_create_response import NamespaceCreateResponse +from cloudflare.types.workers_for_platforms.dispatch import ( + NamespaceGetResponse, + NamespaceListResponse, + NamespaceCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestNamespaces: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.create( @@ -28,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[NamespaceCreateResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.create( @@ -37,7 +37,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[NamespaceCreateResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.with_raw_response.create( @@ -49,7 +48,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: namespace = response.parse() assert_matches_type(Optional[NamespaceCreateResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.with_streaming_response.create( @@ -63,7 +61,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -71,7 +68,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.list( @@ -79,7 +75,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[NamespaceListResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.with_raw_response.list( @@ -91,7 +86,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: namespace = response.parse() assert_matches_type(SyncSinglePage[NamespaceListResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.with_streaming_response.list( @@ -105,7 +99,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -113,7 +106,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.delete( @@ -122,7 +114,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(object, namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( @@ -135,7 +126,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: namespace = response.parse() assert_matches_type(object, namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.with_streaming_response.delete( @@ -150,7 +140,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -165,7 +154,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.get( @@ -174,7 +162,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[NamespaceGetResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( @@ -187,7 +174,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: namespace = response.parse() assert_matches_type(Optional[NamespaceGetResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.with_streaming_response.get( @@ -202,7 +188,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -221,7 +206,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNamespaces: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.create( @@ -229,7 +213,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[NamespaceCreateResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.create( @@ -238,7 +221,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[NamespaceCreateResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.create( @@ -250,7 +232,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: namespace = await response.parse() assert_matches_type(Optional[NamespaceCreateResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.with_streaming_response.create( @@ -264,7 +245,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -272,7 +252,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.list( @@ -280,7 +259,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[NamespaceListResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.list( @@ -292,7 +270,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: namespace = await response.parse() assert_matches_type(AsyncSinglePage[NamespaceListResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.with_streaming_response.list( @@ -306,7 +283,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -314,7 +290,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.delete( @@ -323,7 +298,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(object, namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( @@ -336,7 +310,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: namespace = await response.parse() assert_matches_type(object, namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.with_streaming_response.delete( @@ -351,7 +324,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -366,7 +338,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.get( @@ -375,7 +346,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[NamespaceGetResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( @@ -388,7 +358,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: namespace = await response.parse() assert_matches_type(Optional[NamespaceGetResponse], namespace, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.with_streaming_response.get( @@ -403,7 +372,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/access/applications/test_cas.py b/tests/api_resources/zero_trust/access/applications/test_cas.py index 810d4b337a2..745e334fc35 100644 --- a/tests/api_resources/zero_trust/access/applications/test_cas.py +++ b/tests/api_resources/zero_trust/access/applications/test_cas.py @@ -10,10 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.applications.ca import CA -from cloudflare.types.zero_trust.access.applications.ca_get_response import CAGetResponse -from cloudflare.types.zero_trust.access.applications.ca_create_response import CACreateResponse -from cloudflare.types.zero_trust.access.applications.ca_delete_response import CADeleteResponse +from cloudflare.types.zero_trust.access.applications import CA, CAGetResponse, CACreateResponse, CADeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,33 +18,30 @@ class TestCAs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -55,13 +49,12 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ca = response.parse() assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -71,54 +64,48 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[CA], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[CA], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -126,12 +113,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: ca = response.parse() assert_matches_type(SyncSinglePage[CA], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -141,48 +127,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -190,13 +171,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: ca = response.parse() assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -206,57 +186,51 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -264,13 +238,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ca = response.parse() assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -280,61 +253,55 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) class TestAsyncCAs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -342,13 +309,12 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ca = await response.parse() assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -358,54 +324,48 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[CA], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[CA], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -413,12 +373,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: ca = await response.parse() assert_matches_type(AsyncSinglePage[CA], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -428,48 +387,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -477,13 +431,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: ca = await response.parse() assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -493,57 +446,51 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -551,13 +498,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ca = await response.parse() assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -567,26 +513,23 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/applications/test_policies.py b/tests/api_resources/zero_trust/access/applications/test_policies.py index 29c70fa87cf..88c1920f5e9 100644 --- a/tests/api_resources/zero_trust/access/applications/test_policies.py +++ b/tests/api_resources/zero_trust/access/applications/test_policies.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.applications.policy import Policy -from cloudflare.types.zero_trust.access.applications.policy_delete_response import PolicyDeleteResponse +from cloudflare.types.zero_trust.access.applications import ( + Policy, + PolicyDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,7 @@ class TestPolicies: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.create( @@ -32,11 +34,10 @@ def test_method_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.create( @@ -49,7 +50,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", approval_groups=[ { "approvals_needed": 1, @@ -81,7 +81,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.create( @@ -94,7 +94,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -102,7 +101,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.create( @@ -115,7 +114,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -125,7 +123,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -139,7 +137,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -153,7 +150,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -167,10 +163,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.update( @@ -184,11 +179,10 @@ def test_method_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.update( @@ -202,7 +196,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", approval_groups=[ { "approvals_needed": 1, @@ -234,7 +227,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.update( @@ -248,7 +241,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -256,7 +248,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.update( @@ -270,7 +262,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -280,7 +271,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid1` but received ''"): @@ -295,7 +286,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -310,7 +300,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -325,7 +314,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -340,36 +328,32 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -377,13 +361,12 @@ def test_raw_response_list(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(SyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -393,60 +376,54 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.list( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -454,14 +431,13 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -471,7 +447,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid1` but received ''"): @@ -479,7 +455,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -487,7 +462,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -495,7 +469,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -503,39 +476,35 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -543,14 +512,13 @@ def test_raw_response_get(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -560,7 +528,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid1` but received ''"): @@ -568,7 +536,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -576,7 +543,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -584,7 +550,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -592,14 +557,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) class TestAsyncPolicies: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.create( @@ -612,11 +576,10 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.create( @@ -629,7 +592,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ], name="Allow devs", account_id="string", - zone_id="string", approval_groups=[ { "approvals_needed": 1, @@ -661,7 +623,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.create( @@ -674,7 +636,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -682,7 +643,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.create( @@ -695,7 +656,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -705,7 +665,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -719,7 +679,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -733,7 +692,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -747,10 +705,9 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.update( @@ -764,11 +721,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.update( @@ -782,7 +738,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ], name="Allow devs", account_id="string", - zone_id="string", approval_groups=[ { "approvals_needed": 1, @@ -814,7 +769,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.update( @@ -828,7 +783,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -836,7 +790,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.update( @@ -850,7 +804,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -860,7 +813,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid1` but received ''"): @@ -875,7 +828,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -890,7 +842,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -905,7 +856,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -920,36 +870,32 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -957,13 +903,12 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(AsyncSinglePage[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -973,60 +918,54 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.list( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1034,14 +973,13 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1051,7 +989,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid1` but received ''"): @@ -1059,7 +997,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1067,7 +1004,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1075,7 +1011,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1083,39 +1018,35 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1123,14 +1054,13 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Optional[Policy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1140,7 +1070,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid1` but received ''"): @@ -1148,7 +1078,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1156,7 +1085,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1164,7 +1092,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1172,5 +1099,4 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py index 5cd0fdf9dde..8fc0b51814e 100644 --- a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py +++ b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access.applications.user_policy_check_list_response import UserPolicyCheckListResponse +from cloudflare.types.zero_trust.access.applications import UserPolicyCheckListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,33 +17,30 @@ class TestUserPolicyChecks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: user_policy_check = client.zero_trust.access.applications.user_policy_checks.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: user_policy_check = client.zero_trust.access.applications.user_policy_checks.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -51,13 +48,12 @@ def test_raw_response_list(self, client: Cloudflare) -> None: user_policy_check = response.parse() assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.user_policy_checks.with_streaming_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,54 +63,49 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) class TestAsyncUserPolicyChecks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: user_policy_check = await async_client.zero_trust.access.applications.user_policy_checks.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: user_policy_check = await async_client.zero_trust.access.applications.user_policy_checks.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -122,13 +113,12 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: user_policy_check = await response.parse() assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.user_policy_checks.with_streaming_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -138,19 +128,17 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/certificates/test_settings.py b/tests/api_resources/zero_trust/access/certificates/test_settings.py index 755db1f1b4f..444f9b77fb8 100644 --- a/tests/api_resources/zero_trust/access/certificates/test_settings.py +++ b/tests/api_resources/zero_trust/access/certificates/test_settings.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access.certificates.setting_get_response import SettingGetResponse -from cloudflare.types.zero_trust.access.certificates.setting_update_response import SettingUpdateResponse +from cloudflare.types.zero_trust.access.certificates import ( + SettingGetResponse, + SettingUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,7 @@ class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.update( @@ -40,11 +42,10 @@ def test_method_update(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.update( @@ -66,11 +67,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.settings.with_raw_response.update( @@ -92,7 +92,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -100,7 +99,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.settings.with_streaming_response.update( @@ -122,7 +121,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -132,7 +130,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -155,7 +153,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: }, ], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -178,33 +175,29 @@ def test_path_params_update(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.get( account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.get( account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.settings.with_raw_response.get( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -212,12 +205,11 @@ def test_raw_response_get(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.settings.with_streaming_response.get( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -227,26 +219,24 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.settings.with_raw_response.get( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.settings.with_raw_response.get( account_id="string", - zone_id="", ) class TestAsyncSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.access.certificates.settings.update( @@ -268,11 +258,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.access.certificates.settings.update( @@ -294,11 +283,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, ], account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.settings.with_raw_response.update( @@ -320,7 +308,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -328,7 +315,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.settings.with_streaming_response.update( @@ -350,7 +337,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> }, ], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -360,7 +346,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -383,7 +369,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: }, ], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -406,33 +391,29 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: }, ], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.access.certificates.settings.get( account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.access.certificates.settings.get( account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.settings.with_raw_response.get( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -440,12 +421,11 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.settings.with_streaming_response.get( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -455,17 +435,15 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.settings.with_raw_response.get( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.settings.with_raw_response.get( account_id="string", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/logs/test_access_requests.py b/tests/api_resources/zero_trust/access/logs/test_access_requests.py index 0f06c8982ef..6e0b18db5a3 100644 --- a/tests/api_resources/zero_trust/access/logs/test_access_requests.py +++ b/tests/api_resources/zero_trust/access/logs/test_access_requests.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access.logs.access_request_list_response import AccessRequestListResponse +from cloudflare.types.zero_trust.access.logs import AccessRequestListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAccessRequests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: access_request = client.zero_trust.access.logs.access_requests.list( @@ -25,7 +24,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AccessRequestListResponse], access_request, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.logs.access_requests.with_raw_response.list( @@ -37,7 +35,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: access_request = response.parse() assert_matches_type(Optional[AccessRequestListResponse], access_request, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.logs.access_requests.with_streaming_response.list( @@ -51,7 +48,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAccessRequests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: access_request = await async_client.zero_trust.access.logs.access_requests.list( @@ -71,7 +66,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AccessRequestListResponse], access_request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.logs.access_requests.with_raw_response.list( @@ -83,7 +77,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: access_request = await response.parse() assert_matches_type(Optional[AccessRequestListResponse], access_request, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.logs.access_requests.with_streaming_response.list( @@ -97,7 +90,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index 9d22888966a..3d23e6dc146 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.application import Application -from cloudflare.types.zero_trust.access.application_delete_response import ApplicationDeleteResponse +from cloudflare.types.zero_trust.access import ( + Application, + ApplicationDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,25 +21,23 @@ class TestApplications: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -79,14 +79,13 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -94,14 +93,13 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -111,7 +109,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -119,7 +117,6 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -127,24 +124,21 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -189,12 +183,11 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -202,12 +195,11 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,40 +209,36 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -292,14 +280,13 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -307,14 +294,13 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -324,7 +310,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -332,7 +318,6 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -340,28 +325,25 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -403,14 +385,13 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -418,14 +399,13 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -435,7 +415,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -443,7 +423,6 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -451,26 +430,23 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="app_launcher", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="app_launcher", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -481,13 +457,12 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -495,13 +470,12 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( type="app_launcher", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -511,40 +485,36 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="warp", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="warp", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -555,13 +525,12 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( type="warp", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -569,13 +538,12 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( type="warp", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -585,40 +553,36 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( type="warp", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( type="warp", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="biso", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="biso", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -629,13 +593,12 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( type="biso", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -643,13 +606,12 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( type="biso", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -659,38 +621,34 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( type="biso", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( type="biso", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( account_id="string", - zone_id="string", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", @@ -700,12 +658,11 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -713,12 +670,11 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -728,22 +684,20 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( @@ -751,11 +705,10 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( @@ -763,7 +716,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -805,7 +757,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( @@ -813,7 +765,6 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -821,7 +772,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( @@ -829,7 +780,6 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -839,7 +789,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -848,7 +798,6 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -857,26 +806,23 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -921,13 +867,12 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -935,13 +880,12 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -951,24 +895,22 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( @@ -976,11 +918,10 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( @@ -988,7 +929,6 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1030,7 +970,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( @@ -1038,7 +978,6 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1046,7 +985,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( @@ -1054,7 +993,6 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1064,7 +1002,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1073,7 +1011,6 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1082,10 +1019,9 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( @@ -1093,11 +1029,10 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( @@ -1105,7 +1040,6 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1147,7 +1081,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( @@ -1155,7 +1089,6 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1163,7 +1096,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( @@ -1171,7 +1104,6 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1181,7 +1113,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1190,7 +1122,6 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1199,28 +1130,25 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1231,14 +1159,13 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1246,14 +1173,13 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1263,7 +1189,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1271,7 +1197,6 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1279,28 +1204,25 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1311,14 +1233,13 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1326,14 +1247,13 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1343,7 +1263,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1351,7 +1271,6 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1359,28 +1278,25 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1391,14 +1307,13 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1406,14 +1321,13 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1423,7 +1337,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1431,7 +1345,6 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1439,26 +1352,23 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", @@ -1468,13 +1378,12 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1482,13 +1391,12 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1498,47 +1406,42 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1546,12 +1449,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(SyncSinglePage[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1561,48 +1463,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1610,13 +1507,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1626,50 +1522,45 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1677,13 +1568,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1693,50 +1583,45 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_revoke_tokens(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(object, application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_revoke_tokens_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(object, application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_revoke_tokens(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1744,13 +1629,12 @@ def test_raw_response_revoke_tokens(self, client: Cloudflare) -> None: application = response.parse() assert_matches_type(object, application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_revoke_tokens(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1760,46 +1644,42 @@ def test_streaming_response_revoke_tokens(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_revoke_tokens(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) class TestAsyncApplications: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1841,14 +1721,13 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1856,14 +1735,13 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1873,7 +1751,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1881,7 +1759,6 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="self_hosted", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1889,24 +1766,21 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1951,12 +1825,11 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1964,12 +1837,11 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1979,40 +1851,36 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2054,14 +1922,13 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2069,14 +1936,13 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2086,7 +1952,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2094,7 +1960,6 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="ssh", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2102,28 +1967,25 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2165,14 +2027,13 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2180,14 +2041,13 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2197,7 +2057,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2205,7 +2065,6 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="vnc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2213,26 +2072,23 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="app_launcher", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="app_launcher", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2243,13 +2099,12 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2257,13 +2112,12 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( type="app_launcher", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2273,40 +2127,36 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="warp", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="warp", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2317,13 +2167,12 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( type="warp", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2331,13 +2180,12 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( type="warp", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2347,40 +2195,36 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="warp", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="warp", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="biso", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="biso", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2391,13 +2235,12 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( type="biso", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2405,13 +2248,12 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( type="biso", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2421,38 +2263,34 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="biso", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="biso", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( account_id="string", - zone_id="string", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", @@ -2462,12 +2300,11 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2475,12 +2312,11 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2490,22 +2326,20 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( @@ -2513,11 +2347,10 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( @@ -2525,7 +2358,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2567,7 +2399,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( @@ -2575,7 +2407,6 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2583,7 +2414,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( @@ -2591,7 +2422,6 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2601,7 +2431,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2610,7 +2440,6 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="self_hosted", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2619,26 +2448,23 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2683,13 +2509,12 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2697,13 +2522,12 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2713,24 +2537,22 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( @@ -2738,11 +2560,10 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( @@ -2750,7 +2571,6 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2792,7 +2612,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( @@ -2800,7 +2620,6 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2808,7 +2627,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( @@ -2816,7 +2635,6 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2826,7 +2644,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2835,7 +2653,6 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="ssh", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2844,10 +2661,9 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( @@ -2855,11 +2671,10 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( @@ -2867,7 +2682,6 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2909,7 +2723,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( @@ -2917,7 +2731,6 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2925,7 +2738,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( @@ -2933,7 +2746,6 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2943,7 +2755,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2952,7 +2764,6 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="vnc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2961,28 +2772,25 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2993,14 +2801,13 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3008,14 +2815,13 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3025,7 +2831,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3033,7 +2839,6 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3041,28 +2846,25 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3073,14 +2875,13 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3088,14 +2889,13 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3105,7 +2905,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3113,7 +2913,6 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3121,28 +2920,25 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3153,14 +2949,13 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3168,14 +2963,13 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3185,7 +2979,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3193,7 +2987,6 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3201,26 +2994,23 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", @@ -3230,13 +3020,12 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3244,13 +3033,12 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3260,47 +3048,42 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3308,12 +3091,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: application = await response.parse() assert_matches_type(AsyncSinglePage[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3323,48 +3105,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3372,13 +3149,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: application = await response.parse() assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3388,50 +3164,45 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3439,13 +3210,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: application = await response.parse() assert_matches_type(Optional[Application], application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3455,50 +3225,45 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_revoke_tokens(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(object, application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_revoke_tokens_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(object, application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_revoke_tokens(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3506,13 +3271,12 @@ async def test_raw_response_revoke_tokens(self, async_client: AsyncCloudflare) - application = await response.parse() assert_matches_type(object, application, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_revoke_tokens(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3522,19 +3286,17 @@ async def test_streaming_response_revoke_tokens(self, async_client: AsyncCloudfl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_revoke_tokens(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/test_bookmarks.py b/tests/api_resources/zero_trust/access/test_bookmarks.py index 0c40732bd39..f063d8abf85 100644 --- a/tests/api_resources/zero_trust/access/test_bookmarks.py +++ b/tests/api_resources/zero_trust/access/test_bookmarks.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.bookmark import Bookmark -from cloudflare.types.zero_trust.access.bookmark_delete_response import BookmarkDeleteResponse +from cloudflare.types.zero_trust.access import ( + Bookmark, + BookmarkDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestBookmarks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.create( @@ -43,7 +43,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: bookmark = response.parse() assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.create( @@ -59,7 +58,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -76,7 +74,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.update( @@ -86,7 +83,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.update( @@ -100,7 +96,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: bookmark = response.parse() assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.update( @@ -116,7 +111,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -133,7 +127,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.list( @@ -141,7 +134,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.list( @@ -153,7 +145,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: bookmark = response.parse() assert_matches_type(SyncSinglePage[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.list( @@ -167,7 +158,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -175,23 +165,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -199,13 +185,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: bookmark = response.parse() assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -215,24 +199,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.delete( "", identifier="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.get( @@ -241,7 +221,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.get( @@ -254,7 +233,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: bookmark = response.parse() assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.get( @@ -269,7 +247,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -288,7 +265,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBookmarks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.create( @@ -298,7 +274,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.create( @@ -312,7 +287,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: bookmark = await response.parse() assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.create( @@ -328,7 +302,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -345,7 +318,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.update( @@ -355,7 +327,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.update( @@ -369,7 +340,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: bookmark = await response.parse() assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.update( @@ -385,7 +355,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -402,7 +371,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body={}, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.list( @@ -410,7 +378,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.list( @@ -422,7 +389,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: bookmark = await response.parse() assert_matches_type(AsyncSinglePage[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.list( @@ -436,7 +402,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -444,23 +409,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -468,13 +429,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: bookmark = await response.parse() assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -484,24 +443,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.delete( "", identifier="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.get( @@ -510,7 +465,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.get( @@ -523,7 +477,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: bookmark = await response.parse() assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.get( @@ -538,7 +491,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py index dd00efffe9e..14d5566332c 100644 --- a/tests/api_resources/zero_trust/access/test_certificates.py +++ b/tests/api_resources/zero_trust/access/test_certificates.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.certificate import Certificate -from cloudflare.types.zero_trust.access.certificate_delete_response import CertificateDeleteResponse +from cloudflare.types.zero_trust.access import ( + Certificate, + CertificateDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,37 +21,34 @@ class TestCertificates: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -57,14 +56,13 @@ def test_raw_response_create(self, client: Cloudflare) -> None: certificate = response.parse() assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -74,7 +72,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -82,7 +80,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -90,40 +87,36 @@ def test_path_params_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", name="Allow devs", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -131,14 +124,13 @@ def test_raw_response_update(self, client: Cloudflare) -> None: certificate = response.parse() assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -148,7 +140,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -156,7 +148,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -164,7 +155,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -172,33 +162,29 @@ def test_path_params_update(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -206,12 +192,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: certificate = response.parse() assert_matches_type(SyncSinglePage[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,48 +206,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -270,13 +250,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: certificate = response.parse() assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -286,57 +265,51 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.certificates.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -344,13 +317,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: certificate = response.parse() assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -360,65 +332,59 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.certificates.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) class TestAsyncCertificates: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -426,14 +392,13 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: certificate = await response.parse() assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -443,7 +408,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -451,7 +416,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -459,40 +423,36 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", name="Allow devs", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -500,14 +460,13 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: certificate = await response.parse() assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -517,7 +476,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -525,7 +484,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -533,7 +491,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -541,33 +498,29 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -575,12 +528,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: certificate = await response.parse() assert_matches_type(AsyncSinglePage[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -590,48 +542,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -639,13 +586,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: certificate = await response.parse() assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -655,57 +601,51 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -713,13 +653,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: certificate = await response.parse() assert_matches_type(Optional[Certificate], certificate, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -729,26 +668,23 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py index 42205be72fe..7c84edab1bc 100644 --- a/tests/api_resources/zero_trust/access/test_custom_pages.py +++ b/tests/api_resources/zero_trust/access/test_custom_pages.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.custom_page import CustomPage -from cloudflare.types.zero_trust.access.custom_page_without_html import CustomPageWithoutHTML -from cloudflare.types.zero_trust.access.custom_page_delete_response import CustomPageDeleteResponse +from cloudflare.types.zero_trust.access import ( + CustomPage, + CustomPageWithoutHTML, + CustomPageDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestCustomPages: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.create( @@ -31,7 +32,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.create( @@ -43,7 +43,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.create( @@ -58,7 +57,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: custom_page = response.parse() assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.create( @@ -75,7 +73,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -86,7 +83,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: type="identity_denied", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.update( @@ -98,7 +94,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.update( @@ -111,7 +106,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.update( @@ -127,7 +121,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: custom_page = response.parse() assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.update( @@ -145,7 +138,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -166,7 +158,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: type="identity_denied", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.list( @@ -174,7 +165,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.list( @@ -186,7 +176,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: custom_page = response.parse() assert_matches_type(SyncSinglePage[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.list( @@ -200,7 +189,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -208,7 +196,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.delete( @@ -217,7 +204,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.delete( @@ -230,7 +216,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: custom_page = response.parse() assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.delete( @@ -245,7 +230,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -260,7 +244,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.get( @@ -269,7 +252,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPage], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.get( @@ -282,7 +264,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: custom_page = response.parse() assert_matches_type(Optional[CustomPage], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.get( @@ -297,7 +278,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -316,7 +296,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomPages: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.create( @@ -327,7 +306,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.create( @@ -339,7 +317,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.create( @@ -354,7 +331,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: custom_page = await response.parse() assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.create( @@ -371,7 +347,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -382,7 +357,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: type="identity_denied", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.update( @@ -394,7 +368,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.update( @@ -407,7 +380,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.update( @@ -423,7 +395,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: custom_page = await response.parse() assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.update( @@ -441,7 +412,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -462,7 +432,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: type="identity_denied", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.list( @@ -470,7 +439,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.list( @@ -482,7 +450,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: custom_page = await response.parse() assert_matches_type(AsyncSinglePage[CustomPageWithoutHTML], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.list( @@ -496,7 +463,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -504,7 +470,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.delete( @@ -513,7 +478,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.delete( @@ -526,7 +490,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: custom_page = await response.parse() assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.delete( @@ -541,7 +504,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -556,7 +518,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.get( @@ -565,7 +526,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomPage], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.get( @@ -578,7 +538,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: custom_page = await response.parse() assert_matches_type(Optional[CustomPage], custom_page, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.get( @@ -593,7 +552,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py index 4c55c3fca81..f7be2db9428 100644 --- a/tests/api_resources/zero_trust/access/test_groups.py +++ b/tests/api_resources/zero_trust/access/test_groups.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.zero_trust_group import ZeroTrustGroup -from cloudflare.types.zero_trust.access.group_delete_response import GroupDeleteResponse +from cloudflare.types.zero_trust.access import ( + ZeroTrustGroup, + GroupDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,7 @@ class TestGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.create( @@ -30,11 +32,10 @@ def test_method_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.create( @@ -45,7 +46,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -60,7 +60,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.create( @@ -71,7 +71,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -79,7 +78,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: group = response.parse() assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.create( @@ -90,7 +89,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -100,7 +98,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -112,7 +110,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -124,10 +121,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.update( @@ -139,11 +135,10 @@ def test_method_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.update( @@ -155,7 +150,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -170,7 +164,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.update( @@ -182,7 +176,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -190,7 +183,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: group = response.parse() assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.update( @@ -202,7 +195,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -212,7 +204,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -225,7 +217,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -238,7 +229,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -251,33 +241,29 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -285,12 +271,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: group = response.parse() assert_matches_type(SyncSinglePage[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -300,48 +285,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.groups.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -349,13 +329,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: group = response.parse() assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -365,57 +344,51 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.groups.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.groups.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -423,13 +396,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: group = response.parse() assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -439,35 +411,32 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.groups.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.groups.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) class TestAsyncGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.create( @@ -478,11 +447,10 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.create( @@ -493,7 +461,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ], name="Allow devs", account_id="string", - zone_id="string", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -508,7 +475,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.create( @@ -519,7 +486,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -527,7 +493,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: group = await response.parse() assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.create( @@ -538,7 +504,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -548,7 +513,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -560,7 +525,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -572,10 +536,9 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.update( @@ -587,11 +550,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.update( @@ -603,7 +565,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ], name="Allow devs", account_id="string", - zone_id="string", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -618,7 +579,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.update( @@ -630,7 +591,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -638,7 +598,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: group = await response.parse() assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.update( @@ -650,7 +610,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -660,7 +619,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -673,7 +632,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -686,7 +644,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -699,33 +656,29 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -733,12 +686,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: group = await response.parse() assert_matches_type(AsyncSinglePage[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -748,48 +700,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -797,13 +744,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: group = await response.parse() assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -813,57 +759,51 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -871,13 +811,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: group = await response.parse() assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -887,26 +826,23 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/test_keys.py b/tests/api_resources/zero_trust/access/test_keys.py index 6b2ebb382a8..ccb5129562c 100644 --- a/tests/api_resources/zero_trust/access/test_keys.py +++ b/tests/api_resources/zero_trust/access/test_keys.py @@ -9,9 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access.key_get_response import KeyGetResponse -from cloudflare.types.zero_trust.access.key_rotate_response import KeyRotateResponse -from cloudflare.types.zero_trust.access.key_update_response import KeyUpdateResponse +from cloudflare.types.zero_trust.access import KeyGetResponse, KeyRotateResponse, KeyUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +17,6 @@ class TestKeys: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: key = client.zero_trust.access.keys.update( @@ -28,7 +25,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.keys.with_raw_response.update( @@ -41,7 +37,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.keys.with_streaming_response.update( @@ -56,7 +51,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -65,7 +59,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: key_rotation_interval_days=30, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: key = client.zero_trust.access.keys.get( @@ -73,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[KeyGetResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.keys.with_raw_response.get( @@ -85,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(Optional[KeyGetResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.keys.with_streaming_response.get( @@ -99,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -107,7 +97,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_rotate(self, client: Cloudflare) -> None: key = client.zero_trust.access.keys.rotate( @@ -115,7 +104,6 @@ def test_method_rotate(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[KeyRotateResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_rotate(self, client: Cloudflare) -> None: response = client.zero_trust.access.keys.with_raw_response.rotate( @@ -127,7 +115,6 @@ def test_raw_response_rotate(self, client: Cloudflare) -> None: key = response.parse() assert_matches_type(Optional[KeyRotateResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_rotate(self, client: Cloudflare) -> None: with client.zero_trust.access.keys.with_streaming_response.rotate( @@ -141,7 +128,6 @@ def test_streaming_response_rotate(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_rotate(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -153,7 +139,6 @@ def test_path_params_rotate(self, client: Cloudflare) -> None: class TestAsyncKeys: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: key = await async_client.zero_trust.access.keys.update( @@ -162,7 +147,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.keys.with_raw_response.update( @@ -175,7 +159,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.keys.with_streaming_response.update( @@ -190,7 +173,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -199,7 +181,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: key_rotation_interval_days=30, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: key = await async_client.zero_trust.access.keys.get( @@ -207,7 +188,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[KeyGetResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.keys.with_raw_response.get( @@ -219,7 +199,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(Optional[KeyGetResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.keys.with_streaming_response.get( @@ -233,7 +212,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -241,7 +219,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_rotate(self, async_client: AsyncCloudflare) -> None: key = await async_client.zero_trust.access.keys.rotate( @@ -249,7 +226,6 @@ async def test_method_rotate(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[KeyRotateResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.keys.with_raw_response.rotate( @@ -261,7 +237,6 @@ async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None: key = await response.parse() assert_matches_type(Optional[KeyRotateResponse], key, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.keys.with_streaming_response.rotate( @@ -275,7 +250,6 @@ async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_rotate(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/access/test_service_tokens.py b/tests/api_resources/zero_trust/access/test_service_tokens.py index b35650734ab..1eb404eb5ef 100644 --- a/tests/api_resources/zero_trust/access/test_service_tokens.py +++ b/tests/api_resources/zero_trust/access/test_service_tokens.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.service_token import ServiceToken -from cloudflare.types.zero_trust.access.service_token_create_response import ServiceTokenCreateResponse -from cloudflare.types.zero_trust.access.service_token_rotate_response import ServiceTokenRotateResponse +from cloudflare.types.zero_trust.access import ( + ServiceToken, + ServiceTokenCreateResponse, + ServiceTokenRotateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,34 +22,31 @@ class TestServiceTokens: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.create( name="CI/CD token", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.create( name="CI/CD token", account_id="string", - zone_id="string", duration="60m", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -55,13 +54,12 @@ def test_raw_response_create(self, client: Cloudflare) -> None: service_token = response.parse() assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.create( name="CI/CD token", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -71,52 +69,47 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", duration="60m", name="CI/CD token", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -124,13 +117,12 @@ def test_raw_response_update(self, client: Cloudflare) -> None: service_token = response.parse() assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,54 +132,48 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.update( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -195,12 +181,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: service_token = response.parse() assert_matches_type(SyncSinglePage[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -210,48 +195,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -259,13 +239,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: service_token = response.parse() assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -275,31 +254,27 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_refresh(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.refresh( @@ -308,7 +283,6 @@ def test_method_refresh(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_refresh(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.refresh( @@ -321,7 +295,6 @@ def test_raw_response_refresh(self, client: Cloudflare) -> None: service_token = response.parse() assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_refresh(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.refresh( @@ -336,7 +309,6 @@ def test_streaming_response_refresh(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_refresh(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -351,7 +323,6 @@ def test_path_params_refresh(self, client: Cloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_rotate(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.rotate( @@ -360,7 +331,6 @@ def test_method_rotate(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_rotate(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.rotate( @@ -373,7 +343,6 @@ def test_raw_response_rotate(self, client: Cloudflare) -> None: service_token = response.parse() assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_rotate(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.rotate( @@ -388,7 +357,6 @@ def test_streaming_response_rotate(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_rotate(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -407,34 +375,31 @@ def test_path_params_rotate(self, client: Cloudflare) -> None: class TestAsyncServiceTokens: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.create( name="CI/CD token", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.create( name="CI/CD token", account_id="string", - zone_id="string", duration="60m", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -442,13 +407,12 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: service_token = await response.parse() assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.create( name="CI/CD token", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -458,52 +422,47 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", duration="60m", name="CI/CD token", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -511,13 +470,12 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: service_token = await response.parse() assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -527,54 +485,48 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.update( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -582,12 +534,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: service_token = await response.parse() assert_matches_type(AsyncSinglePage[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -597,48 +548,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -646,13 +592,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: service_token = await response.parse() assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -662,31 +607,27 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_refresh(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.refresh( @@ -695,7 +636,6 @@ async def test_method_refresh(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_refresh(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.refresh( @@ -708,7 +648,6 @@ async def test_raw_response_refresh(self, async_client: AsyncCloudflare) -> None service_token = await response.parse() assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_refresh(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.refresh( @@ -723,7 +662,6 @@ async def test_streaming_response_refresh(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_refresh(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -738,7 +676,6 @@ async def test_path_params_refresh(self, async_client: AsyncCloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_rotate(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.rotate( @@ -747,7 +684,6 @@ async def test_method_rotate(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.rotate( @@ -760,7 +696,6 @@ async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None: service_token = await response.parse() assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.rotate( @@ -775,7 +710,6 @@ async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_rotate(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py index 0f7d13bba95..c81e4b77bcb 100644 --- a/tests/api_resources/zero_trust/access/test_tags.py +++ b/tests/api_resources/zero_trust/access/test_tags.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.tag import Tag -from cloudflare.types.zero_trust.access.tag_delete_response import TagDeleteResponse +from cloudflare.types.zero_trust.access import Tag, TagDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestTags: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.create( @@ -28,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.create( @@ -41,7 +38,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: tag = response.parse() assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.create( @@ -56,7 +52,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -65,7 +60,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="engineers", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.update( @@ -75,7 +69,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.update( @@ -89,7 +82,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: tag = response.parse() assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.update( @@ -105,7 +97,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -122,7 +113,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.list( @@ -130,7 +120,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.list( @@ -142,7 +131,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: tag = response.parse() assert_matches_type(SyncSinglePage[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.list( @@ -156,7 +144,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -164,7 +151,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.delete( @@ -173,7 +159,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.delete( @@ -186,7 +171,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: tag = response.parse() assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.delete( @@ -201,7 +185,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -216,7 +199,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.get( @@ -225,7 +207,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.get( @@ -238,7 +219,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tag = response.parse() assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.get( @@ -253,7 +233,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -272,7 +251,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTags: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.create( @@ -281,7 +259,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.create( @@ -294,7 +271,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: tag = await response.parse() assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.create( @@ -309,7 +285,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -318,7 +293,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="engineers", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.update( @@ -328,7 +302,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.update( @@ -342,7 +315,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: tag = await response.parse() assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.update( @@ -358,7 +330,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -375,7 +346,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.list( @@ -383,7 +353,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.list( @@ -395,7 +364,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: tag = await response.parse() assert_matches_type(AsyncSinglePage[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.list( @@ -409,7 +377,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -417,7 +384,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.delete( @@ -426,7 +392,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.delete( @@ -439,7 +404,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: tag = await response.parse() assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.delete( @@ -454,7 +418,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -469,7 +432,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.get( @@ -478,7 +440,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.get( @@ -491,7 +452,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tag = await response.parse() assert_matches_type(Optional[Tag], tag, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.get( @@ -506,7 +466,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/access/test_users.py b/tests/api_resources/zero_trust/access/test_users.py index 91e89a0c449..502300c4919 100644 --- a/tests/api_resources/zero_trust/access/test_users.py +++ b/tests/api_resources/zero_trust/access/test_users.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.access_user import AccessUser +from cloudflare.types.zero_trust.access import AccessUser base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestUsers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: user = client.zero_trust.access.users.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[AccessUser], user, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.with_raw_response.list( @@ -38,7 +36,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: user = response.parse() assert_matches_type(SyncSinglePage[AccessUser], user, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.users.with_streaming_response.list( @@ -52,7 +49,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -64,7 +60,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUsers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: user = await async_client.zero_trust.access.users.list( @@ -72,7 +67,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[AccessUser], user, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.with_raw_response.list( @@ -84,7 +78,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: user = await response.parse() assert_matches_type(AsyncSinglePage[AccessUser], user, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.with_streaming_response.list( @@ -98,7 +91,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/access/users/test_active_sessions.py b/tests/api_resources/zero_trust/access/users/test_active_sessions.py index 8c769851b4b..257192ec0de 100644 --- a/tests/api_resources/zero_trust/access/users/test_active_sessions.py +++ b/tests/api_resources/zero_trust/access/users/test_active_sessions.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.users.active_session_get_response import ActiveSessionGetResponse -from cloudflare.types.zero_trust.access.users.active_session_list_response import ActiveSessionListResponse +from cloudflare.types.zero_trust.access.users import ActiveSessionGetResponse, ActiveSessionListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestActiveSessions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: active_session = client.zero_trust.access.users.active_sessions.list( @@ -28,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.active_sessions.with_raw_response.list( @@ -41,7 +38,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: active_session = response.parse() assert_matches_type(SyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.users.active_sessions.with_streaming_response.list( @@ -56,7 +52,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -71,7 +66,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: active_session = client.zero_trust.access.users.active_sessions.get( @@ -81,7 +75,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.active_sessions.with_raw_response.get( @@ -95,7 +88,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: active_session = response.parse() assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.users.active_sessions.with_streaming_response.get( @@ -111,7 +103,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -139,7 +130,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncActiveSessions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: active_session = await async_client.zero_trust.access.users.active_sessions.list( @@ -148,7 +138,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.active_sessions.with_raw_response.list( @@ -161,7 +150,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: active_session = await response.parse() assert_matches_type(AsyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.active_sessions.with_streaming_response.list( @@ -176,7 +164,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -191,7 +178,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: active_session = await async_client.zero_trust.access.users.active_sessions.get( @@ -201,7 +187,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.active_sessions.with_raw_response.get( @@ -215,7 +200,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: active_session = await response.parse() assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.active_sessions.with_streaming_response.get( @@ -231,7 +215,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/access/users/test_failed_logins.py b/tests/api_resources/zero_trust/access/users/test_failed_logins.py index dbecf1080b5..466bb95ca07 100644 --- a/tests/api_resources/zero_trust/access/users/test_failed_logins.py +++ b/tests/api_resources/zero_trust/access/users/test_failed_logins.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.access.users.failed_login_list_response import FailedLoginListResponse +from cloudflare.types.zero_trust.access.users import FailedLoginListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestFailedLogins: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: failed_login = client.zero_trust.access.users.failed_logins.list( @@ -27,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.failed_logins.with_raw_response.list( @@ -40,7 +38,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: failed_login = response.parse() assert_matches_type(SyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.users.failed_logins.with_streaming_response.list( @@ -55,7 +52,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -74,7 +70,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncFailedLogins: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: failed_login = await async_client.zero_trust.access.users.failed_logins.list( @@ -83,7 +78,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.failed_logins.with_raw_response.list( @@ -96,7 +90,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: failed_login = await response.parse() assert_matches_type(AsyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.failed_logins.with_streaming_response.list( @@ -111,7 +104,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py index 14ec1729a0f..e23146df8d6 100644 --- a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py +++ b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access.users.identity import Identity +from cloudflare.types.zero_trust.access.users import Identity base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestLastSeenIdentity: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: last_seen_identity = client.zero_trust.access.users.last_seen_identity.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Identity], last_seen_identity, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.last_seen_identity.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: last_seen_identity = response.parse() assert_matches_type(Optional[Identity], last_seen_identity, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.users.last_seen_identity.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLastSeenIdentity: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: last_seen_identity = await async_client.zero_trust.access.users.last_seen_identity.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Identity], last_seen_identity, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.last_seen_identity.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: last_seen_identity = await response.parse() assert_matches_type(Optional[Identity], last_seen_identity, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.last_seen_identity.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/policies/test_default_policy.py b/tests/api_resources/zero_trust/devices/policies/test_default_policy.py index de33297f451..51bc7a1bf6c 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_default_policy.py +++ b/tests/api_resources/zero_trust/devices/policies/test_default_policy.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.devices.policies.default_policy_get_response import DefaultPolicyGetResponse +from cloudflare.types.zero_trust.devices.policies import DefaultPolicyGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestDefaultPolicy: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: default_policy = client.zero_trust.devices.policies.default_policy.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DefaultPolicyGetResponse], default_policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.default_policy.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: default_policy = response.parse() assert_matches_type(Optional[DefaultPolicyGetResponse], default_policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.default_policy.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDefaultPolicy: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: default_policy = await async_client.zero_trust.devices.policies.default_policy.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DefaultPolicyGetResponse], default_policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.default_policy.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: default_policy = await response.parse() assert_matches_type(Optional[DefaultPolicyGetResponse], default_policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.default_policy.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/policies/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/test_excludes.py index 8f08940c2de..b1a2f9aa2eb 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_excludes.py +++ b/tests/api_resources/zero_trust/devices/policies/test_excludes.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.devices.policies.exclude_get_response import ExcludeGetResponse -from cloudflare.types.zero_trust.devices.policies.split_tunnel_exclude import SplitTunnelExclude -from cloudflare.types.zero_trust.devices.policies.exclude_update_response import ExcludeUpdateResponse +from cloudflare.types.zero_trust.devices.policies import ( + ExcludeGetResponse, + SplitTunnelExclude, + ExcludeUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestExcludes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: exclude = client.zero_trust.devices.policies.excludes.update( @@ -42,7 +43,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ExcludeUpdateResponse], exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.excludes.with_raw_response.update( @@ -68,7 +68,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: exclude = response.parse() assert_matches_type(Optional[ExcludeUpdateResponse], exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.excludes.with_streaming_response.update( @@ -96,7 +95,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -118,7 +116,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: exclude = client.zero_trust.devices.policies.excludes.list( @@ -126,7 +123,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[SplitTunnelExclude], exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.excludes.with_raw_response.list( @@ -138,7 +134,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: exclude = response.parse() assert_matches_type(SyncSinglePage[SplitTunnelExclude], exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.excludes.with_streaming_response.list( @@ -152,7 +147,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -160,7 +154,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: exclude = client.zero_trust.devices.policies.excludes.get( @@ -169,7 +162,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ExcludeGetResponse], exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.excludes.with_raw_response.get( @@ -182,7 +174,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: exclude = response.parse() assert_matches_type(Optional[ExcludeGetResponse], exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.excludes.with_streaming_response.get( @@ -197,7 +188,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -216,7 +206,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncExcludes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: exclude = await async_client.zero_trust.devices.policies.excludes.update( @@ -238,7 +227,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ExcludeUpdateResponse], exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.excludes.with_raw_response.update( @@ -264,7 +252,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: exclude = await response.parse() assert_matches_type(Optional[ExcludeUpdateResponse], exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.excludes.with_streaming_response.update( @@ -292,7 +279,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -314,7 +300,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: exclude = await async_client.zero_trust.devices.policies.excludes.list( @@ -322,7 +307,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[SplitTunnelExclude], exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.excludes.with_raw_response.list( @@ -334,7 +318,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: exclude = await response.parse() assert_matches_type(AsyncSinglePage[SplitTunnelExclude], exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.excludes.with_streaming_response.list( @@ -348,7 +331,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -356,7 +338,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: exclude = await async_client.zero_trust.devices.policies.excludes.get( @@ -365,7 +346,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ExcludeGetResponse], exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.excludes.with_raw_response.get( @@ -378,7 +358,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: exclude = await response.parse() assert_matches_type(Optional[ExcludeGetResponse], exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.excludes.with_streaming_response.get( @@ -393,7 +372,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py index f5482786d61..353bee364cd 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py +++ b/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.devices.policies.fallback_domain import FallbackDomain -from cloudflare.types.zero_trust.devices.policies.fallback_domain_get_response import FallbackDomainGetResponse -from cloudflare.types.zero_trust.devices.policies.fallback_domain_update_response import FallbackDomainUpdateResponse +from cloudflare.types.zero_trust.devices.policies import ( + FallbackDomain, + FallbackDomainGetResponse, + FallbackDomainUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestFallbackDomains: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: fallback_domain = client.zero_trust.devices.policies.fallback_domains.update( @@ -30,7 +31,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[FallbackDomainUpdateResponse], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( @@ -44,7 +44,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: fallback_domain = response.parse() assert_matches_type(Optional[FallbackDomainUpdateResponse], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.fallback_domains.with_streaming_response.update( @@ -60,7 +59,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -77,7 +75,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: fallback_domain = client.zero_trust.devices.policies.fallback_domains.list( @@ -85,7 +82,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[FallbackDomain], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.fallback_domains.with_raw_response.list( @@ -97,7 +93,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: fallback_domain = response.parse() assert_matches_type(SyncSinglePage[FallbackDomain], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.fallback_domains.with_streaming_response.list( @@ -111,7 +106,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -119,7 +113,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: fallback_domain = client.zero_trust.devices.policies.fallback_domains.get( @@ -128,7 +121,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[FallbackDomainGetResponse], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( @@ -141,7 +133,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: fallback_domain = response.parse() assert_matches_type(Optional[FallbackDomainGetResponse], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.fallback_domains.with_streaming_response.get( @@ -156,7 +147,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -175,7 +165,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFallbackDomains: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: fallback_domain = await async_client.zero_trust.devices.policies.fallback_domains.update( @@ -185,7 +174,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[FallbackDomainUpdateResponse], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( @@ -199,7 +187,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: fallback_domain = await response.parse() assert_matches_type(Optional[FallbackDomainUpdateResponse], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.fallback_domains.with_streaming_response.update( @@ -215,7 +202,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -232,7 +218,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: fallback_domain = await async_client.zero_trust.devices.policies.fallback_domains.list( @@ -240,7 +225,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[FallbackDomain], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.list( @@ -252,7 +236,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: fallback_domain = await response.parse() assert_matches_type(AsyncSinglePage[FallbackDomain], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.fallback_domains.with_streaming_response.list( @@ -266,7 +249,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -274,7 +256,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: fallback_domain = await async_client.zero_trust.devices.policies.fallback_domains.get( @@ -283,7 +264,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[FallbackDomainGetResponse], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( @@ -296,7 +276,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: fallback_domain = await response.parse() assert_matches_type(Optional[FallbackDomainGetResponse], fallback_domain, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.fallback_domains.with_streaming_response.get( @@ -311,7 +290,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/policies/test_includes.py b/tests/api_resources/zero_trust/devices/policies/test_includes.py index 26b065c0f39..76833b163c9 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_includes.py +++ b/tests/api_resources/zero_trust/devices/policies/test_includes.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.devices.policies.include_get_response import IncludeGetResponse -from cloudflare.types.zero_trust.devices.policies.split_tunnel_include import SplitTunnelInclude -from cloudflare.types.zero_trust.devices.policies.include_update_response import IncludeUpdateResponse +from cloudflare.types.zero_trust.devices.policies import ( + IncludeGetResponse, + SplitTunnelInclude, + IncludeUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestIncludes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: include = client.zero_trust.devices.policies.includes.update( @@ -42,7 +43,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IncludeUpdateResponse], include, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.includes.with_raw_response.update( @@ -68,7 +68,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: include = response.parse() assert_matches_type(Optional[IncludeUpdateResponse], include, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.includes.with_streaming_response.update( @@ -96,7 +95,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -118,7 +116,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: include = client.zero_trust.devices.policies.includes.list( @@ -126,7 +123,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[SplitTunnelInclude], include, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.includes.with_raw_response.list( @@ -138,7 +134,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: include = response.parse() assert_matches_type(SyncSinglePage[SplitTunnelInclude], include, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.includes.with_streaming_response.list( @@ -152,7 +147,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -160,7 +154,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: include = client.zero_trust.devices.policies.includes.get( @@ -169,7 +162,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IncludeGetResponse], include, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.includes.with_raw_response.get( @@ -182,7 +174,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: include = response.parse() assert_matches_type(Optional[IncludeGetResponse], include, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.includes.with_streaming_response.get( @@ -197,7 +188,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -216,7 +206,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIncludes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: include = await async_client.zero_trust.devices.policies.includes.update( @@ -238,7 +227,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IncludeUpdateResponse], include, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.includes.with_raw_response.update( @@ -264,7 +252,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: include = await response.parse() assert_matches_type(Optional[IncludeUpdateResponse], include, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.includes.with_streaming_response.update( @@ -292,7 +279,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -314,7 +300,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: include = await async_client.zero_trust.devices.policies.includes.list( @@ -322,7 +307,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[SplitTunnelInclude], include, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.includes.with_raw_response.list( @@ -334,7 +318,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: include = await response.parse() assert_matches_type(AsyncSinglePage[SplitTunnelInclude], include, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.includes.with_streaming_response.list( @@ -348,7 +331,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -356,7 +338,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: include = await async_client.zero_trust.devices.policies.includes.get( @@ -365,7 +346,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IncludeGetResponse], include, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.includes.with_raw_response.get( @@ -378,7 +358,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: include = await response.parse() assert_matches_type(Optional[IncludeGetResponse], include, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.includes.with_streaming_response.get( @@ -393,7 +372,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/posture/test_integrations.py b/tests/api_resources/zero_trust/devices/posture/test_integrations.py index 25043b98783..eda7def2266 100644 --- a/tests/api_resources/zero_trust/devices/posture/test_integrations.py +++ b/tests/api_resources/zero_trust/devices/posture/test_integrations.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.devices.posture.integration import Integration -from cloudflare.types.zero_trust.devices.posture.integration_delete_response import IntegrationDeleteResponse +from cloudflare.types.zero_trust.devices.posture import ( + Integration, + IntegrationDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestIntegrations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.create( @@ -36,7 +37,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.create( @@ -53,7 +53,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.create( @@ -74,7 +73,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: integration = response.parse() assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.create( @@ -97,7 +95,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -114,7 +111,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: type="workspace_one", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.list( @@ -122,7 +118,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.list( @@ -134,7 +129,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: integration = response.parse() assert_matches_type(SyncSinglePage[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.list( @@ -148,7 +142,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -156,23 +149,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(IntegrationDeleteResponse, integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -180,13 +169,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: integration = response.parse() assert_matches_type(IntegrationDeleteResponse, integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -196,24 +183,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.edit( @@ -222,7 +205,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.edit( @@ -240,7 +222,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.edit( @@ -253,7 +234,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: integration = response.parse() assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.edit( @@ -268,7 +248,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -283,7 +262,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.get( @@ -292,7 +270,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.get( @@ -305,7 +282,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: integration = response.parse() assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.get( @@ -320,7 +296,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -339,7 +314,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIntegrations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.create( @@ -356,7 +330,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.create( @@ -373,7 +346,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.create( @@ -394,7 +366,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: integration = await response.parse() assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.create( @@ -417,7 +388,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -434,7 +404,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: type="workspace_one", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.list( @@ -442,7 +411,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.list( @@ -454,7 +422,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: integration = await response.parse() assert_matches_type(AsyncSinglePage[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.list( @@ -468,7 +435,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -476,23 +442,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(IntegrationDeleteResponse, integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -500,13 +462,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: integration = await response.parse() assert_matches_type(IntegrationDeleteResponse, integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -516,24 +476,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.edit( @@ -542,7 +498,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.edit( @@ -560,7 +515,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.edit( @@ -573,7 +527,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: integration = await response.parse() assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.edit( @@ -588,7 +541,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -603,7 +555,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.get( @@ -612,7 +563,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.get( @@ -625,7 +575,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: integration = await response.parse() assert_matches_type(Optional[Integration], integration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.get( @@ -640,7 +589,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/test_dex_tests.py b/tests/api_resources/zero_trust/devices/test_dex_tests.py index 32788a4a1d0..314ea6a8316 100644 --- a/tests/api_resources/zero_trust/devices/test_dex_tests.py +++ b/tests/api_resources/zero_trust/devices/test_dex_tests.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.devices.schema_http import SchemaHTTP -from cloudflare.types.zero_trust.devices.dex_test_delete_response import DEXTestDeleteResponse +from cloudflare.types.zero_trust.devices import ( + SchemaHTTP, + DEXTestDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestDEXTests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.create( @@ -31,7 +32,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.create( @@ -66,7 +66,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.create( @@ -82,7 +81,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: dex_test = response.parse() assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.create( @@ -100,7 +98,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -112,7 +109,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="HTTP dash health check", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.update( @@ -125,7 +121,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.update( @@ -161,7 +156,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.update( @@ -178,7 +172,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: dex_test = response.parse() assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.update( @@ -197,7 +190,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -220,7 +212,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="HTTP dash health check", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.list( @@ -228,7 +219,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.list( @@ -240,7 +230,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: dex_test = response.parse() assert_matches_type(SyncSinglePage[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.list( @@ -254,7 +243,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -262,7 +250,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.delete( @@ -271,7 +258,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DEXTestDeleteResponse], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.delete( @@ -284,7 +270,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: dex_test = response.parse() assert_matches_type(Optional[DEXTestDeleteResponse], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.delete( @@ -299,7 +284,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -314,7 +298,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.get( @@ -323,7 +306,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.get( @@ -336,7 +318,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: dex_test = response.parse() assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.get( @@ -351,7 +332,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -370,7 +350,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDEXTests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.create( @@ -382,7 +361,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.create( @@ -417,7 +395,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.create( @@ -433,7 +410,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: dex_test = await response.parse() assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.create( @@ -451,7 +427,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -463,7 +438,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="HTTP dash health check", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.update( @@ -476,7 +450,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.update( @@ -512,7 +485,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.update( @@ -529,7 +501,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: dex_test = await response.parse() assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.update( @@ -548,7 +519,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -571,7 +541,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="HTTP dash health check", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.list( @@ -579,7 +548,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.list( @@ -591,7 +559,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: dex_test = await response.parse() assert_matches_type(AsyncSinglePage[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.list( @@ -605,7 +572,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -613,7 +579,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.delete( @@ -622,7 +587,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DEXTestDeleteResponse], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.delete( @@ -635,7 +599,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: dex_test = await response.parse() assert_matches_type(Optional[DEXTestDeleteResponse], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.delete( @@ -650,7 +613,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -665,7 +627,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.get( @@ -674,7 +635,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.get( @@ -687,7 +647,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: dex_test = await response.parse() assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.get( @@ -702,7 +661,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/test_networks.py b/tests/api_resources/zero_trust/devices/test_networks.py index 30701ddf3ff..0b6ac3bd334 100644 --- a/tests/api_resources/zero_trust/devices/test_networks.py +++ b/tests/api_resources/zero_trust/devices/test_networks.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.devices.device_network import DeviceNetwork -from cloudflare.types.zero_trust.devices.network_delete_response import NetworkDeleteResponse +from cloudflare.types.zero_trust.devices import ( + DeviceNetwork, + NetworkDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestNetworks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.create( @@ -30,7 +31,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.create( @@ -44,7 +44,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.create( @@ -59,7 +58,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: network = response.parse() assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.create( @@ -76,7 +74,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -87,7 +84,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: type="tls", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.update( @@ -96,7 +92,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.update( @@ -111,7 +106,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.update( @@ -124,7 +118,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: network = response.parse() assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.update( @@ -139,7 +132,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -154,7 +146,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.list( @@ -162,7 +153,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.list( @@ -174,7 +164,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: network = response.parse() assert_matches_type(SyncSinglePage[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.list( @@ -188,7 +177,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -196,23 +184,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[NetworkDeleteResponse], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -220,13 +204,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: network = response.parse() assert_matches_type(Optional[NetworkDeleteResponse], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -236,24 +218,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.get( @@ -262,7 +240,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.get( @@ -275,7 +252,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: network = response.parse() assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.get( @@ -290,7 +266,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -309,7 +284,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNetworks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.create( @@ -320,7 +294,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.create( @@ -334,7 +307,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.create( @@ -349,7 +321,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: network = await response.parse() assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.create( @@ -366,7 +337,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -377,7 +347,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: type="tls", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.update( @@ -386,7 +355,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.update( @@ -401,7 +369,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.update( @@ -414,7 +381,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: network = await response.parse() assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.update( @@ -429,7 +395,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -444,7 +409,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.list( @@ -452,7 +416,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.list( @@ -464,7 +427,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: network = await response.parse() assert_matches_type(AsyncSinglePage[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.list( @@ -478,7 +440,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -486,23 +447,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[NetworkDeleteResponse], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -510,13 +467,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: network = await response.parse() assert_matches_type(Optional[NetworkDeleteResponse], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -526,24 +481,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.get( @@ -552,7 +503,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.get( @@ -565,7 +515,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: network = await response.parse() assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.get( @@ -580,7 +529,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/test_override_codes.py b/tests/api_resources/zero_trust/devices/test_override_codes.py index fe5f06f0744..c7ee58f5b0d 100644 --- a/tests/api_resources/zero_trust/devices/test_override_codes.py +++ b/tests/api_resources/zero_trust/devices/test_override_codes.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.devices.override_code_list_response import OverrideCodeListResponse +from cloudflare.types.zero_trust.devices import OverrideCodeListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestOverrideCodes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: override_code = client.zero_trust.devices.override_codes.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OverrideCodeListResponse], override_code, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.override_codes.with_raw_response.list( @@ -39,7 +37,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: override_code = response.parse() assert_matches_type(Optional[OverrideCodeListResponse], override_code, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.override_codes.with_streaming_response.list( @@ -54,7 +51,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncOverrideCodes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: override_code = await async_client.zero_trust.devices.override_codes.list( @@ -82,7 +77,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OverrideCodeListResponse], override_code, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.override_codes.with_raw_response.list( @@ -95,7 +89,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: override_code = await response.parse() assert_matches_type(Optional[OverrideCodeListResponse], override_code, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.override_codes.with_streaming_response.list( @@ -110,7 +103,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/test_policies.py b/tests/api_resources/zero_trust/devices/test_policies.py index af7e8c718c5..0261a6987c7 100644 --- a/tests/api_resources/zero_trust/devices/test_policies.py +++ b/tests/api_resources/zero_trust/devices/test_policies.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.devices.settings_policy import SettingsPolicy -from cloudflare.types.zero_trust.devices.policy_delete_response import PolicyDeleteResponse +from cloudflare.types.zero_trust.devices import ( + SettingsPolicy, + PolicyDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,7 @@ class TestPolicies: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.create( @@ -30,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.create( @@ -58,7 +60,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.create( @@ -73,7 +75,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.create( @@ -90,7 +92,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -101,7 +103,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: precedence=100, ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.list( @@ -109,7 +110,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.list( @@ -121,7 +121,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(SyncSinglePage[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.list( @@ -135,7 +134,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -143,23 +141,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -167,13 +161,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -183,24 +175,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.edit( @@ -209,7 +198,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.edit( @@ -236,7 +225,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.edit( @@ -249,7 +238,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.edit( @@ -264,7 +253,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -279,7 +268,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.get( @@ -288,7 +277,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.get( @@ -301,7 +290,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: policy = response.parse() assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.get( @@ -316,7 +305,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -335,7 +324,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.create( @@ -346,7 +335,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.create( @@ -374,7 +363,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.create( @@ -389,7 +378,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.create( @@ -406,7 +395,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -417,7 +406,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: precedence=100, ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.list( @@ -425,7 +413,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.list( @@ -437,7 +424,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(AsyncSinglePage[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.list( @@ -451,7 +437,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -459,23 +444,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -483,13 +464,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -499,24 +478,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.edit( @@ -525,7 +501,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.edit( @@ -552,7 +528,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.edit( @@ -565,7 +541,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.edit( @@ -580,7 +556,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -595,7 +571,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.get( @@ -604,7 +580,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.get( @@ -617,7 +593,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: policy = await response.parse() assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.get( @@ -632,7 +608,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/test_posture.py b/tests/api_resources/zero_trust/devices/test_posture.py index 6fa27d73207..7f171f6c382 100644 --- a/tests/api_resources/zero_trust/devices/test_posture.py +++ b/tests/api_resources/zero_trust/devices/test_posture.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.devices.device_posture_rule import DevicePostureRule -from cloudflare.types.zero_trust.devices.posture_delete_response import PostureDeleteResponse +from cloudflare.types.zero_trust.devices import ( + DevicePostureRule, + PostureDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestPosture: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.create( @@ -50,7 +50,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.create( @@ -64,7 +63,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: posture = response.parse() assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.create( @@ -80,7 +78,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -90,7 +87,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: type="file", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.update( @@ -101,7 +97,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.update( @@ -123,7 +118,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.update( @@ -138,7 +132,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: posture = response.parse() assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.update( @@ -155,7 +148,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -174,7 +166,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: type="file", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.list( @@ -182,7 +173,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.list( @@ -194,7 +184,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: posture = response.parse() assert_matches_type(SyncSinglePage[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.list( @@ -208,7 +197,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -216,23 +204,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[PostureDeleteResponse], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -240,13 +224,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: posture = response.parse() assert_matches_type(Optional[PostureDeleteResponse], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -256,24 +238,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.get( @@ -282,7 +260,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.get( @@ -295,7 +272,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: posture = response.parse() assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.get( @@ -310,7 +286,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -329,7 +304,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPosture: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.create( @@ -339,7 +313,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.create( @@ -360,7 +333,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.create( @@ -374,7 +346,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: posture = await response.parse() assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.create( @@ -390,7 +361,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -400,7 +370,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: type="file", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.update( @@ -411,7 +380,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.update( @@ -433,7 +401,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.update( @@ -448,7 +415,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: posture = await response.parse() assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.update( @@ -465,7 +431,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -484,7 +449,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: type="file", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.list( @@ -492,7 +456,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.list( @@ -504,7 +467,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: posture = await response.parse() assert_matches_type(AsyncSinglePage[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.list( @@ -518,7 +480,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -526,23 +487,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[PostureDeleteResponse], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -550,13 +507,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: posture = await response.parse() assert_matches_type(Optional[PostureDeleteResponse], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -566,24 +521,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.get( @@ -592,7 +543,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.get( @@ -605,7 +555,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: posture = await response.parse() assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.get( @@ -620,7 +569,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/test_revoke.py b/tests/api_resources/zero_trust/devices/test_revoke.py index 0809adcd5b0..27aa2002b99 100644 --- a/tests/api_resources/zero_trust/devices/test_revoke.py +++ b/tests/api_resources/zero_trust/devices/test_revoke.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.devices.revoke_create_response import RevokeCreateResponse +from cloudflare.types.zero_trust.devices import RevokeCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestRevoke: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: revoke = client.zero_trust.devices.revoke.create( @@ -30,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(RevokeCreateResponse, revoke, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.devices.revoke.with_raw_response.create( @@ -47,7 +45,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: revoke = response.parse() assert_matches_type(RevokeCreateResponse, revoke, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.devices.revoke.with_streaming_response.create( @@ -66,7 +63,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -83,7 +79,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncRevoke: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: revoke = await async_client.zero_trust.devices.revoke.create( @@ -96,7 +91,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RevokeCreateResponse, revoke, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.revoke.with_raw_response.create( @@ -113,7 +107,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: revoke = await response.parse() assert_matches_type(RevokeCreateResponse, revoke, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.revoke.with_streaming_response.create( @@ -132,7 +125,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/test_settings.py b/tests/api_resources/zero_trust/devices/test_settings.py index 4ce4bb96e6b..398d23683a3 100644 --- a/tests/api_resources/zero_trust/devices/test_settings.py +++ b/tests/api_resources/zero_trust/devices/test_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.devices.device_settings import DeviceSettings +from cloudflare.types.zero_trust.devices import DeviceSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: setting = client.zero_trust.devices.settings.update( @@ -25,7 +24,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: setting = client.zero_trust.devices.settings.update( @@ -37,7 +35,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.settings.with_raw_response.update( @@ -49,7 +46,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.settings.with_streaming_response.update( @@ -63,7 +59,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -71,7 +66,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: setting = client.zero_trust.devices.settings.list( @@ -79,7 +73,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.settings.with_raw_response.list( @@ -91,7 +84,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: setting = response.parse() assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.settings.with_streaming_response.list( @@ -105,7 +97,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -117,7 +108,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.devices.settings.update( @@ -125,7 +115,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.devices.settings.update( @@ -137,7 +126,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.settings.with_raw_response.update( @@ -149,7 +137,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.settings.with_streaming_response.update( @@ -163,7 +150,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -171,7 +157,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.devices.settings.list( @@ -179,7 +164,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.settings.with_raw_response.list( @@ -191,7 +175,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: setting = await response.parse() assert_matches_type(Optional[DeviceSettings], setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.settings.with_streaming_response.list( @@ -205,7 +188,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/devices/test_unrevoke.py b/tests/api_resources/zero_trust/devices/test_unrevoke.py index 488d82eca21..f3b7f43a733 100644 --- a/tests/api_resources/zero_trust/devices/test_unrevoke.py +++ b/tests/api_resources/zero_trust/devices/test_unrevoke.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.devices.unrevoke_create_response import UnrevokeCreateResponse +from cloudflare.types.zero_trust.devices import UnrevokeCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestUnrevoke: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: unrevoke = client.zero_trust.devices.unrevoke.create( @@ -30,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(UnrevokeCreateResponse, unrevoke, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.devices.unrevoke.with_raw_response.create( @@ -47,7 +45,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: unrevoke = response.parse() assert_matches_type(UnrevokeCreateResponse, unrevoke, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.devices.unrevoke.with_streaming_response.create( @@ -66,7 +63,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -83,7 +79,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncUnrevoke: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: unrevoke = await async_client.zero_trust.devices.unrevoke.create( @@ -96,7 +91,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(UnrevokeCreateResponse, unrevoke, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.unrevoke.with_raw_response.create( @@ -113,7 +107,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: unrevoke = await response.parse() assert_matches_type(UnrevokeCreateResponse, unrevoke, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.unrevoke.with_streaming_response.create( @@ -132,7 +125,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py index 4ce0b0c2511..3f7e10dbbc6 100644 --- a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py +++ b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.zero_trust.dex.fleet_status.device_list_response import DeviceListResponse +from cloudflare.types.zero_trust.dex.fleet_status import DeviceListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,7 @@ class TestDevices: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: device = client.zero_trust.dex.fleet_status.devices.list( @@ -30,7 +30,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: device = client.zero_trust.dex.fleet_status.devices.list( @@ -49,7 +49,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dex.fleet_status.devices.with_raw_response.list( @@ -65,7 +65,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: device = response.parse() assert_matches_type(SyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dex.fleet_status.devices.with_streaming_response.list( @@ -83,7 +83,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -99,7 +99,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncDevices: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: device = await async_client.zero_trust.dex.fleet_status.devices.list( @@ -111,7 +111,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: device = await async_client.zero_trust.dex.fleet_status.devices.list( @@ -130,7 +130,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.fleet_status.devices.with_raw_response.list( @@ -146,7 +146,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: device = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.fleet_status.devices.with_streaming_response.list( @@ -164,7 +164,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py index e74e9c6070c..417e9fe4ec4 100644 --- a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py +++ b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex.http_tests.http_details_percentiles import HTTPDetailsPercentiles +from cloudflare.types.zero_trust.dex.http_tests import HTTPDetailsPercentiles base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestPercentiles: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: percentile = client.zero_trust.dex.http_tests.percentiles.get( @@ -28,7 +27,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: percentile = client.zero_trust.dex.http_tests.percentiles.get( @@ -41,7 +39,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( @@ -56,7 +53,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: percentile = response.parse() assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.http_tests.percentiles.with_streaming_response.get( @@ -73,7 +69,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -96,7 +91,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPercentiles: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: percentile = await async_client.zero_trust.dex.http_tests.percentiles.get( @@ -107,7 +101,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: percentile = await async_client.zero_trust.dex.http_tests.percentiles.get( @@ -120,7 +113,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( @@ -135,7 +127,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: percentile = await response.parse() assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.http_tests.percentiles.with_streaming_response.get( @@ -152,7 +143,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dex/test_colos.py b/tests/api_resources/zero_trust/dex/test_colos.py index 2a700707496..ea3b48d65ae 100644 --- a/tests/api_resources/zero_trust/dex/test_colos.py +++ b/tests/api_resources/zero_trust/dex/test_colos.py @@ -17,7 +17,6 @@ class TestColos: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: colo = client.zero_trust.dex.colos.list( @@ -27,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[object], colo, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: colo = client.zero_trust.dex.colos.list( @@ -38,7 +36,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[object], colo, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dex.colos.with_raw_response.list( @@ -52,7 +49,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: colo = response.parse() assert_matches_type(SyncSinglePage[object], colo, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dex.colos.with_streaming_response.list( @@ -68,7 +64,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -82,7 +77,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncColos: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: colo = await async_client.zero_trust.dex.colos.list( @@ -92,7 +86,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[object], colo, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: colo = await async_client.zero_trust.dex.colos.list( @@ -103,7 +96,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[object], colo, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.colos.with_raw_response.list( @@ -117,7 +109,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: colo = await response.parse() assert_matches_type(AsyncSinglePage[object], colo, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.colos.with_streaming_response.list( @@ -133,7 +124,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dex/test_fleet_status.py b/tests/api_resources/zero_trust/dex/test_fleet_status.py index 1712bcb2669..c8810f5404b 100644 --- a/tests/api_resources/zero_trust/dex/test_fleet_status.py +++ b/tests/api_resources/zero_trust/dex/test_fleet_status.py @@ -9,7 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex.fleet_status_live_response import FleetStatusLiveResponse +from cloudflare.types.zero_trust.dex import ( + FleetStatusLiveResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +19,6 @@ class TestFleetStatus: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_live(self, client: Cloudflare) -> None: fleet_status = client.zero_trust.dex.fleet_status.live( @@ -26,7 +27,6 @@ def test_method_live(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[FleetStatusLiveResponse], fleet_status, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_live(self, client: Cloudflare) -> None: response = client.zero_trust.dex.fleet_status.with_raw_response.live( @@ -39,7 +39,6 @@ def test_raw_response_live(self, client: Cloudflare) -> None: fleet_status = response.parse() assert_matches_type(Optional[FleetStatusLiveResponse], fleet_status, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_live(self, client: Cloudflare) -> None: with client.zero_trust.dex.fleet_status.with_streaming_response.live( @@ -54,7 +53,6 @@ def test_streaming_response_live(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_live(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -63,7 +61,6 @@ def test_path_params_live(self, client: Cloudflare) -> None: since_minutes=10, ) - @pytest.mark.skip() @parametrize def test_method_over_time(self, client: Cloudflare) -> None: fleet_status = client.zero_trust.dex.fleet_status.over_time( @@ -73,7 +70,6 @@ def test_method_over_time(self, client: Cloudflare) -> None: ) assert fleet_status is None - @pytest.mark.skip() @parametrize def test_method_over_time_with_all_params(self, client: Cloudflare) -> None: fleet_status = client.zero_trust.dex.fleet_status.over_time( @@ -85,7 +81,6 @@ def test_method_over_time_with_all_params(self, client: Cloudflare) -> None: ) assert fleet_status is None - @pytest.mark.skip() @parametrize def test_raw_response_over_time(self, client: Cloudflare) -> None: response = client.zero_trust.dex.fleet_status.with_raw_response.over_time( @@ -99,7 +94,6 @@ def test_raw_response_over_time(self, client: Cloudflare) -> None: fleet_status = response.parse() assert fleet_status is None - @pytest.mark.skip() @parametrize def test_streaming_response_over_time(self, client: Cloudflare) -> None: with client.zero_trust.dex.fleet_status.with_streaming_response.over_time( @@ -115,7 +109,6 @@ def test_streaming_response_over_time(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_over_time(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -129,7 +122,6 @@ def test_path_params_over_time(self, client: Cloudflare) -> None: class TestAsyncFleetStatus: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_live(self, async_client: AsyncCloudflare) -> None: fleet_status = await async_client.zero_trust.dex.fleet_status.live( @@ -138,7 +130,6 @@ async def test_method_live(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[FleetStatusLiveResponse], fleet_status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_live(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.fleet_status.with_raw_response.live( @@ -151,7 +142,6 @@ async def test_raw_response_live(self, async_client: AsyncCloudflare) -> None: fleet_status = await response.parse() assert_matches_type(Optional[FleetStatusLiveResponse], fleet_status, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_live(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.fleet_status.with_streaming_response.live( @@ -166,7 +156,6 @@ async def test_streaming_response_live(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_live(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -175,7 +164,6 @@ async def test_path_params_live(self, async_client: AsyncCloudflare) -> None: since_minutes=10, ) - @pytest.mark.skip() @parametrize async def test_method_over_time(self, async_client: AsyncCloudflare) -> None: fleet_status = await async_client.zero_trust.dex.fleet_status.over_time( @@ -185,7 +173,6 @@ async def test_method_over_time(self, async_client: AsyncCloudflare) -> None: ) assert fleet_status is None - @pytest.mark.skip() @parametrize async def test_method_over_time_with_all_params(self, async_client: AsyncCloudflare) -> None: fleet_status = await async_client.zero_trust.dex.fleet_status.over_time( @@ -197,7 +184,6 @@ async def test_method_over_time_with_all_params(self, async_client: AsyncCloudfl ) assert fleet_status is None - @pytest.mark.skip() @parametrize async def test_raw_response_over_time(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.fleet_status.with_raw_response.over_time( @@ -211,7 +197,6 @@ async def test_raw_response_over_time(self, async_client: AsyncCloudflare) -> No fleet_status = await response.parse() assert fleet_status is None - @pytest.mark.skip() @parametrize async def test_streaming_response_over_time(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.fleet_status.with_streaming_response.over_time( @@ -227,7 +212,6 @@ async def test_streaming_response_over_time(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_over_time(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dex/test_http_tests.py b/tests/api_resources/zero_trust/dex/test_http_tests.py index 0b852d34967..48a2fa21dfe 100644 --- a/tests/api_resources/zero_trust/dex/test_http_tests.py +++ b/tests/api_resources/zero_trust/dex/test_http_tests.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex.http_details import HTTPDetails +from cloudflare.types.zero_trust.dex import HTTPDetails base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,41 +17,38 @@ class TestHTTPTests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: http_test = client.zero_trust.dex.http_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_test = client.zero_trust.dex.http_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", colo="string", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.http_tests.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -59,15 +56,14 @@ def test_raw_response_get(self, client: Cloudflare) -> None: http_test = response.parse() assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.http_tests.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -77,7 +73,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -85,8 +80,8 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -94,49 +89,46 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) class TestAsyncHTTPTests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_test = await async_client.zero_trust.dex.http_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_test = await async_client.zero_trust.dex.http_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", colo="string", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.http_tests.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -144,15 +136,14 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: http_test = await response.parse() assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.http_tests.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -162,7 +153,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -170,8 +160,8 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -179,6 +169,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) diff --git a/tests/api_resources/zero_trust/dex/test_tests.py b/tests/api_resources/zero_trust/dex/test_tests.py index 4b1bd5ec38f..71f56cc7e84 100644 --- a/tests/api_resources/zero_trust/dex/test_tests.py +++ b/tests/api_resources/zero_trust/dex/test_tests.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePagination, AsyncV4PagePagination -from cloudflare.types.zero_trust.dex.test_list_response import TestListResponse +from cloudflare.types.zero_trust.dex import TestListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestTests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: test = client.zero_trust.dex.tests.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[TestListResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: test = client.zero_trust.dex.tests.list( @@ -39,7 +37,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[TestListResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dex.tests.with_raw_response.list( @@ -51,7 +48,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: test = response.parse() assert_matches_type(SyncV4PagePagination[TestListResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dex.tests.with_streaming_response.list( @@ -65,7 +61,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -77,7 +72,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncTests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: test = await async_client.zero_trust.dex.tests.list( @@ -85,7 +79,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePagination[TestListResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: test = await async_client.zero_trust.dex.tests.list( @@ -98,7 +91,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePagination[TestListResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.tests.with_raw_response.list( @@ -110,7 +102,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: test = await response.parse() assert_matches_type(AsyncV4PagePagination[TestListResponse], test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.tests.with_streaming_response.list( @@ -124,7 +115,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py index ea3673d3c1e..687a44e7675 100644 --- a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py +++ b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex.traceroute import Traceroute -from cloudflare.types.zero_trust.network_path_response import NetworkPathResponse -from cloudflare.types.zero_trust.dex.traceroute_test_percentiles_response import TracerouteTestPercentilesResponse +from cloudflare.types.zero_trust import NetworkPathResponse +from cloudflare.types.zero_trust.dex import ( + Traceroute, + TracerouteTestPercentilesResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,41 +21,38 @@ class TestTracerouteTests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", colo="string", device_id=["string", "string", "string"], ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_tests.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -61,15 +60,14 @@ def test_raw_response_get(self, client: Cloudflare) -> None: traceroute_test = response.parse() assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_tests.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -79,7 +77,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -87,8 +84,8 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -96,11 +93,10 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) - @pytest.mark.skip() @parametrize def test_method_network_path(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.network_path( @@ -108,12 +104,11 @@ def test_method_network_path(self, client: Cloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[NetworkPathResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_network_path(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( @@ -121,8 +116,8 @@ def test_raw_response_network_path(self, client: Cloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -130,7 +125,6 @@ def test_raw_response_network_path(self, client: Cloudflare) -> None: traceroute_test = response.parse() assert_matches_type(Optional[NetworkPathResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_network_path(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_tests.with_streaming_response.network_path( @@ -138,8 +132,8 @@ def test_streaming_response_network_path(self, client: Cloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -149,7 +143,6 @@ def test_streaming_response_network_path(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_network_path(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -158,8 +151,8 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: account_id="", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -168,11 +161,10 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) - @pytest.mark.skip() @parametrize def test_method_percentiles(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.percentiles( @@ -183,7 +175,6 @@ def test_method_percentiles(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_percentiles_with_all_params(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.percentiles( @@ -196,7 +187,6 @@ def test_method_percentiles_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_percentiles(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( @@ -211,7 +201,6 @@ def test_raw_response_percentiles(self, client: Cloudflare) -> None: traceroute_test = response.parse() assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_percentiles(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_tests.with_streaming_response.percentiles( @@ -228,7 +217,6 @@ def test_streaming_response_percentiles(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_percentiles(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -251,41 +239,38 @@ def test_path_params_percentiles(self, client: Cloudflare) -> None: class TestAsyncTracerouteTests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", colo="string", device_id=["string", "string", "string"], ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -293,15 +278,14 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: traceroute_test = await response.parse() assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -311,7 +295,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -319,8 +302,8 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -328,11 +311,10 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) - @pytest.mark.skip() @parametrize async def test_method_network_path(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.network_path( @@ -340,12 +322,11 @@ async def test_method_network_path(self, async_client: AsyncCloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[NetworkPathResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_network_path(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( @@ -353,8 +334,8 @@ async def test_raw_response_network_path(self, async_client: AsyncCloudflare) -> account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -362,7 +343,6 @@ async def test_raw_response_network_path(self, async_client: AsyncCloudflare) -> traceroute_test = await response.parse() assert_matches_type(Optional[NetworkPathResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_network_path(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.network_path( @@ -370,8 +350,8 @@ async def test_streaming_response_network_path(self, async_client: AsyncCloudfla account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -381,7 +361,6 @@ async def test_streaming_response_network_path(self, async_client: AsyncCloudfla assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -390,8 +369,8 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> account_id="", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -400,11 +379,10 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) - @pytest.mark.skip() @parametrize async def test_method_percentiles(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.percentiles( @@ -415,7 +393,6 @@ async def test_method_percentiles(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_percentiles_with_all_params(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.percentiles( @@ -428,7 +405,6 @@ async def test_method_percentiles_with_all_params(self, async_client: AsyncCloud ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_percentiles(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( @@ -443,7 +419,6 @@ async def test_raw_response_percentiles(self, async_client: AsyncCloudflare) -> traceroute_test = await response.parse() assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_percentiles(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.percentiles( @@ -460,7 +435,6 @@ async def test_streaming_response_percentiles(self, async_client: AsyncCloudflar assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_percentiles(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py index 182a51a8a51..849b8c5cc07 100644 --- a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py +++ b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex.tests.unique_devices import UniqueDevices +from cloudflare.types.zero_trust.dex.tests import UniqueDevices base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestUniqueDevices: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: unique_device = client.zero_trust.dex.tests.unique_devices.list( @@ -25,7 +24,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: unique_device = client.zero_trust.dex.tests.unique_devices.list( @@ -35,7 +33,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dex.tests.unique_devices.with_raw_response.list( @@ -47,7 +44,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: unique_device = response.parse() assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dex.tests.unique_devices.with_streaming_response.list( @@ -61,7 +57,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +68,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUniqueDevices: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: unique_device = await async_client.zero_trust.dex.tests.unique_devices.list( @@ -81,7 +75,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: unique_device = await async_client.zero_trust.dex.tests.unique_devices.list( @@ -91,7 +84,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.tests.unique_devices.with_raw_response.list( @@ -103,7 +95,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: unique_device = await response.parse() assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.tests.unique_devices.with_streaming_response.list( @@ -117,7 +108,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py index d9f51e98cfe..0a12a7ccea1 100644 --- a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py +++ b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex.traceroute_test_results.network_path_get_response import NetworkPathGetResponse +from cloudflare.types.zero_trust.dex.traceroute_test_results import NetworkPathGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestNetworkPath: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: network_path = client.zero_trust.dex.traceroute_test_results.network_path.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[NetworkPathGetResponse], network_path, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: network_path = response.parse() assert_matches_type(Optional[NetworkPathGetResponse], network_path, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_test_results.network_path.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNetworkPath: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: network_path = await async_client.zero_trust.dex.traceroute_test_results.network_path.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[NetworkPathGetResponse], network_path, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: network_path = await response.parse() assert_matches_type(Optional[NetworkPathGetResponse], network_path, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_test_results.network_path.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py index 4664f9456fb..df7a9832ab3 100644 --- a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py +++ b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dlp.dataset import Dataset -from cloudflare.types.zero_trust.dlp.datasets.new_version import NewVersion +from cloudflare.types.zero_trust.dlp import Dataset +from cloudflare.types.zero_trust.dlp.datasets import NewVersion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestUpload: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: upload = client.zero_trust.dlp.datasets.upload.create( @@ -27,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[NewVersion], upload, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.upload.with_raw_response.create( @@ -40,7 +38,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: upload = response.parse() assert_matches_type(Optional[NewVersion], upload, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.upload.with_streaming_response.create( @@ -55,7 +52,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -70,7 +66,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="string", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: upload = client.zero_trust.dlp.datasets.upload.edit( @@ -81,7 +77,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Dataset], upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.upload.with_raw_response.edit( @@ -96,7 +92,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: upload = response.parse() assert_matches_type(Optional[Dataset], upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.upload.with_streaming_response.edit( @@ -113,7 +109,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -136,7 +132,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncUpload: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: upload = await async_client.zero_trust.dlp.datasets.upload.create( @@ -145,7 +140,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[NewVersion], upload, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.upload.with_raw_response.create( @@ -158,7 +152,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: upload = await response.parse() assert_matches_type(Optional[NewVersion], upload, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.upload.with_streaming_response.create( @@ -173,7 +166,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -188,7 +180,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="string", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: upload = await async_client.zero_trust.dlp.datasets.upload.edit( @@ -199,7 +191,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Dataset], upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit( @@ -214,7 +206,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: upload = await response.parse() assert_matches_type(Optional[Dataset], upload, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.upload.with_streaming_response.edit( @@ -231,7 +223,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py index e0ca3b9e2da..fdf6e69b362 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dlp.profiles.custom_profile import CustomProfile -from cloudflare.types.zero_trust.dlp.profiles.custom_create_response import CustomCreateResponse -from cloudflare.types.zero_trust.dlp.profiles.custom_delete_response import CustomDeleteResponse +from cloudflare.types.zero_trust.dlp.profiles import ( + CustomProfile, + CustomCreateResponse, + CustomDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestCustom: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.create( @@ -28,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.create( @@ -41,7 +41,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: custom = response.parse() assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.create( @@ -56,7 +55,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -65,7 +63,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: profiles=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.update( @@ -74,7 +71,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.update( @@ -121,7 +117,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.update( @@ -134,7 +129,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: custom = response.parse() assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.update( @@ -149,7 +143,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -164,23 +157,19 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.delete( "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(CustomDeleteResponse, custom, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.delete( "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -188,13 +177,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: custom = response.parse() assert_matches_type(CustomDeleteResponse, custom, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.delete( "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,24 +191,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.delete( "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.get( @@ -230,7 +213,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.get( @@ -243,7 +225,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: custom = response.parse() assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.get( @@ -258,7 +239,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -277,7 +257,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustom: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.create( @@ -286,7 +265,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.create( @@ -299,7 +277,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: custom = await response.parse() assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.create( @@ -314,7 +291,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -323,7 +299,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: profiles=[{}, {}, {}], ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.update( @@ -332,7 +307,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.update( @@ -379,7 +353,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.update( @@ -392,7 +365,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: custom = await response.parse() assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.update( @@ -407,7 +379,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -422,23 +393,19 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.delete( "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert_matches_type(CustomDeleteResponse, custom, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete( "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) assert response.is_closed is True @@ -446,13 +413,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: custom = await response.parse() assert_matches_type(CustomDeleteResponse, custom, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.delete( "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -462,24 +427,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete( "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.get( @@ -488,7 +449,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.get( @@ -501,7 +461,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: custom = await response.parse() assert_matches_type(CustomProfile, custom, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.get( @@ -516,7 +475,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py index 85a2e4248c7..b8209257160 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dlp.profiles.predefined_profile import PredefinedProfile +from cloudflare.types.zero_trust.dlp.profiles import PredefinedProfile base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestPredefined: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.update( @@ -26,7 +25,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.update( @@ -42,7 +40,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.predefined.with_raw_response.update( @@ -55,7 +52,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: predefined = response.parse() assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.predefined.with_streaming_response.update( @@ -70,7 +66,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -85,7 +80,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.get( @@ -94,7 +88,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.predefined.with_raw_response.get( @@ -107,7 +100,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: predefined = response.parse() assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.predefined.with_streaming_response.get( @@ -122,7 +114,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -141,7 +132,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPredefined: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.update( @@ -150,7 +140,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.update( @@ -166,7 +155,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.update( @@ -179,7 +167,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: predefined = await response.parse() assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.update( @@ -194,7 +181,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -209,7 +195,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.get( @@ -218,7 +203,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.get( @@ -231,7 +215,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: predefined = await response.parse() assert_matches_type(PredefinedProfile, predefined, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.get( @@ -246,7 +229,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dlp/test_datasets.py b/tests/api_resources/zero_trust/dlp/test_datasets.py index 59f4bdb519f..1e41d7f1260 100644 --- a/tests/api_resources/zero_trust/dlp/test_datasets.py +++ b/tests/api_resources/zero_trust/dlp/test_datasets.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.dlp.dataset import Dataset -from cloudflare.types.zero_trust.dlp.dataset_creation import DatasetCreation +from cloudflare.types.zero_trust.dlp import Dataset, DatasetCreation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestDatasets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.create( @@ -28,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.create( @@ -39,7 +36,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.create( @@ -52,7 +48,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.create( @@ -67,7 +62,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -76,7 +70,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="string", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.update( @@ -85,7 +78,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.update( @@ -96,7 +88,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.update( @@ -109,7 +100,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.update( @@ -124,7 +114,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -139,7 +128,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="string", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.list( @@ -147,7 +135,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.list( @@ -159,7 +146,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(SyncSinglePage[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.list( @@ -173,7 +159,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -181,7 +166,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.delete( @@ -190,7 +174,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert dataset is None - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.delete( @@ -203,7 +186,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: dataset = response.parse() assert dataset is None - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.delete( @@ -218,7 +200,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -233,7 +214,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="string", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.get( @@ -242,7 +222,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.get( @@ -255,7 +234,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.get( @@ -270,7 +248,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -289,7 +266,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDatasets: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.create( @@ -298,7 +274,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.create( @@ -309,7 +284,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.create( @@ -322,7 +296,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.create( @@ -337,7 +310,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -346,7 +318,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="string", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.update( @@ -355,7 +326,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.update( @@ -366,7 +336,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.update( @@ -379,7 +348,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.update( @@ -394,7 +362,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -409,7 +376,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="string", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.list( @@ -417,7 +383,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.list( @@ -429,7 +394,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(AsyncSinglePage[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.list( @@ -443,7 +407,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -451,7 +414,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.delete( @@ -460,7 +422,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert dataset is None - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.delete( @@ -473,7 +434,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert dataset is None - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.delete( @@ -488,7 +448,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -503,7 +462,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="string", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.get( @@ -512,7 +470,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.get( @@ -525,7 +482,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(Optional[Dataset], dataset, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.get( @@ -540,7 +496,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dlp/test_patterns.py b/tests/api_resources/zero_trust/dlp/test_patterns.py index 8f2493a8767..1455ec80499 100644 --- a/tests/api_resources/zero_trust/dlp/test_patterns.py +++ b/tests/api_resources/zero_trust/dlp/test_patterns.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logpush.ownership_validation import OwnershipValidation +from cloudflare.types.logpush import OwnershipValidation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestPatterns: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_validate(self, client: Cloudflare) -> None: pattern = client.zero_trust.dlp.patterns.validate( @@ -26,7 +25,6 @@ def test_method_validate(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OwnershipValidation], pattern, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_validate(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.patterns.with_raw_response.validate( @@ -39,7 +37,6 @@ def test_raw_response_validate(self, client: Cloudflare) -> None: pattern = response.parse() assert_matches_type(Optional[OwnershipValidation], pattern, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_validate(self, client: Cloudflare) -> None: with client.zero_trust.dlp.patterns.with_streaming_response.validate( @@ -54,7 +51,6 @@ def test_streaming_response_validate(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_validate(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -67,7 +63,6 @@ def test_path_params_validate(self, client: Cloudflare) -> None: class TestAsyncPatterns: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_validate(self, async_client: AsyncCloudflare) -> None: pattern = await async_client.zero_trust.dlp.patterns.validate( @@ -76,7 +71,6 @@ async def test_method_validate(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OwnershipValidation], pattern, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.patterns.with_raw_response.validate( @@ -89,7 +83,6 @@ async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> Non pattern = await response.parse() assert_matches_type(Optional[OwnershipValidation], pattern, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_validate(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.patterns.with_streaming_response.validate( @@ -104,7 +97,6 @@ async def test_streaming_response_validate(self, async_client: AsyncCloudflare) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dlp/test_payload_logs.py b/tests/api_resources/zero_trust/dlp/test_payload_logs.py index 10b34cadfef..cdc88d7f84d 100644 --- a/tests/api_resources/zero_trust/dlp/test_payload_logs.py +++ b/tests/api_resources/zero_trust/dlp/test_payload_logs.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dlp.payload_log_get_response import PayloadLogGetResponse -from cloudflare.types.zero_trust.dlp.payload_log_update_response import PayloadLogUpdateResponse +from cloudflare.types.zero_trust.dlp import PayloadLogGetResponse, PayloadLogUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestPayloadLogs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: payload_log = client.zero_trust.dlp.payload_logs.update( @@ -27,7 +25,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(PayloadLogUpdateResponse, payload_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.payload_logs.with_raw_response.update( @@ -40,7 +37,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: payload_log = response.parse() assert_matches_type(PayloadLogUpdateResponse, payload_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.payload_logs.with_streaming_response.update( @@ -55,7 +51,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +59,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: public_key="EmpOvSXw8BfbrGCi0fhGiD/3yXk2SiV1Nzg2lru3oj0=", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: payload_log = client.zero_trust.dlp.payload_logs.get( @@ -72,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(PayloadLogGetResponse, payload_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.payload_logs.with_raw_response.get( @@ -84,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: payload_log = response.parse() assert_matches_type(PayloadLogGetResponse, payload_log, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.payload_logs.with_streaming_response.get( @@ -98,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -110,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPayloadLogs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: payload_log = await async_client.zero_trust.dlp.payload_logs.update( @@ -119,7 +109,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PayloadLogUpdateResponse, payload_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.payload_logs.with_raw_response.update( @@ -132,7 +121,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: payload_log = await response.parse() assert_matches_type(PayloadLogUpdateResponse, payload_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.payload_logs.with_streaming_response.update( @@ -147,7 +135,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -156,7 +143,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: public_key="EmpOvSXw8BfbrGCi0fhGiD/3yXk2SiV1Nzg2lru3oj0=", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: payload_log = await async_client.zero_trust.dlp.payload_logs.get( @@ -164,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(PayloadLogGetResponse, payload_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.payload_logs.with_raw_response.get( @@ -176,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: payload_log = await response.parse() assert_matches_type(PayloadLogGetResponse, payload_log, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.payload_logs.with_streaming_response.get( @@ -190,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/dlp/test_profiles.py b/tests/api_resources/zero_trust/dlp/test_profiles.py index a4f33dc2987..5984f84df7c 100644 --- a/tests/api_resources/zero_trust/dlp/test_profiles.py +++ b/tests/api_resources/zero_trust/dlp/test_profiles.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.dlp.profile import Profile -from cloudflare.types.zero_trust.dlp.profile_get_response import ProfileGetResponse +from cloudflare.types.zero_trust.dlp import Profile, ProfileGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestProfiles: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: profile = client.zero_trust.dlp.profiles.list( @@ -27,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Profile], profile, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.with_raw_response.list( @@ -39,7 +36,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: profile = response.parse() assert_matches_type(SyncSinglePage[Profile], profile, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.with_streaming_response.list( @@ -53,7 +49,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -61,7 +56,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: profile = client.zero_trust.dlp.profiles.get( @@ -70,7 +64,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.with_raw_response.get( @@ -83,7 +76,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: profile = response.parse() assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.with_streaming_response.get( @@ -98,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -117,7 +108,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncProfiles: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: profile = await async_client.zero_trust.dlp.profiles.list( @@ -125,7 +115,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Profile], profile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.with_raw_response.list( @@ -137,7 +126,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: profile = await response.parse() assert_matches_type(AsyncSinglePage[Profile], profile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.with_streaming_response.list( @@ -151,7 +139,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -159,7 +146,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: profile = await async_client.zero_trust.dlp.profiles.get( @@ -168,7 +154,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.with_raw_response.get( @@ -181,7 +166,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: profile = await response.parse() assert_matches_type(ProfileGetResponse, profile, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.with_streaming_response.get( @@ -196,7 +180,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/lists/test_items.py b/tests/api_resources/zero_trust/gateway/lists/test_items.py index 468ec04bab5..776794c88f4 100644 --- a/tests/api_resources/zero_trust/gateway/lists/test_items.py +++ b/tests/api_resources/zero_trust/gateway/lists/test_items.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.gateway.lists.item_list_response import ItemListResponse +from cloudflare.types.zero_trust.gateway.lists import ItemListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestItems: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: item = client.zero_trust.gateway.lists.items.list( @@ -27,7 +26,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[ItemListResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.items.with_raw_response.list( @@ -40,7 +38,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: item = response.parse() assert_matches_type(SyncSinglePage[ItemListResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.items.with_streaming_response.list( @@ -55,7 +52,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -74,7 +70,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncItems: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: item = await async_client.zero_trust.gateway.lists.items.list( @@ -83,7 +78,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[ItemListResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.items.with_raw_response.list( @@ -96,7 +90,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: item = await response.parse() assert_matches_type(AsyncSinglePage[ItemListResponse], item, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.items.with_streaming_response.list( @@ -111,7 +104,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/test_app_types.py b/tests/api_resources/zero_trust/gateway/test_app_types.py index 50cdc7d5443..166d36defcd 100644 --- a/tests/api_resources/zero_trust/gateway/test_app_types.py +++ b/tests/api_resources/zero_trust/gateway/test_app_types.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.gateway.app_type import AppType +from cloudflare.types.zero_trust.gateway import AppType base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestAppTypes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: app_type = client.zero_trust.gateway.app_types.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[AppType], app_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.app_types.with_raw_response.list( @@ -38,7 +36,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: app_type = response.parse() assert_matches_type(SyncSinglePage[AppType], app_type, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.app_types.with_streaming_response.list( @@ -52,7 +49,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +60,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAppTypes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: app_type = await async_client.zero_trust.gateway.app_types.list( @@ -72,7 +67,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[AppType], app_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.app_types.with_raw_response.list( @@ -84,7 +78,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: app_type = await response.parse() assert_matches_type(AsyncSinglePage[AppType], app_type, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.app_types.with_streaming_response.list( @@ -98,7 +91,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py index dfff2c64800..a25bf37430d 100644 --- a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py +++ b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.gateway.gateway_settings import GatewaySettings +from cloudflare.types.zero_trust.gateway import GatewaySettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAuditSSHSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: audit_ssh_setting = client.zero_trust.gateway.audit_ssh_settings.update( @@ -26,7 +25,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: audit_ssh_setting = client.zero_trust.gateway.audit_ssh_settings.update( @@ -36,7 +34,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.audit_ssh_settings.with_raw_response.update( @@ -49,7 +46,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: audit_ssh_setting = response.parse() assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.audit_ssh_settings.with_streaming_response.update( @@ -64,7 +60,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +68,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: public_key="1pyl6I1tL7xfJuFYVzXlUW8uXXlpxegHXBzGCBKaSFA=", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: audit_ssh_setting = client.zero_trust.gateway.audit_ssh_settings.get( @@ -81,7 +75,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.audit_ssh_settings.with_raw_response.get( @@ -93,7 +86,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: audit_ssh_setting = response.parse() assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.audit_ssh_settings.with_streaming_response.get( @@ -107,7 +99,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -119,7 +110,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAuditSSHSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: audit_ssh_setting = await async_client.zero_trust.gateway.audit_ssh_settings.update( @@ -128,7 +118,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: audit_ssh_setting = await async_client.zero_trust.gateway.audit_ssh_settings.update( @@ -138,7 +127,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.audit_ssh_settings.with_raw_response.update( @@ -151,7 +139,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: audit_ssh_setting = await response.parse() assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.audit_ssh_settings.with_streaming_response.update( @@ -166,7 +153,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -175,7 +161,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: public_key="1pyl6I1tL7xfJuFYVzXlUW8uXXlpxegHXBzGCBKaSFA=", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: audit_ssh_setting = await async_client.zero_trust.gateway.audit_ssh_settings.get( @@ -183,7 +168,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.audit_ssh_settings.with_raw_response.get( @@ -195,7 +179,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: audit_ssh_setting = await response.parse() assert_matches_type(Optional[GatewaySettings], audit_ssh_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.audit_ssh_settings.with_streaming_response.get( @@ -209,7 +192,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/test_categories.py b/tests/api_resources/zero_trust/gateway/test_categories.py index 493145345f8..42d6ae3b4db 100644 --- a/tests/api_resources/zero_trust/gateway/test_categories.py +++ b/tests/api_resources/zero_trust/gateway/test_categories.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.gateway.category import Category +from cloudflare.types.zero_trust.gateway import Category base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +18,6 @@ class TestCategories: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: category = client.zero_trust.gateway.categories.list( @@ -26,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Category], category, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.categories.with_raw_response.list( @@ -38,7 +36,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: category = response.parse() assert_matches_type(SyncSinglePage[Category], category, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.categories.with_streaming_response.list( @@ -52,7 +49,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -64,7 +60,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncCategories: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: category = await async_client.zero_trust.gateway.categories.list( @@ -72,7 +67,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Category], category, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.categories.with_raw_response.list( @@ -84,7 +78,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: category = await response.parse() assert_matches_type(AsyncSinglePage[Category], category, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.categories.with_streaming_response.list( @@ -98,7 +91,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py index fdb2189a5ed..62f30e964a0 100644 --- a/tests/api_resources/zero_trust/gateway/test_configurations.py +++ b/tests/api_resources/zero_trust/gateway/test_configurations.py @@ -9,9 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.gateway.configuration_get_response import ConfigurationGetResponse -from cloudflare.types.zero_trust.gateway.configuration_edit_response import ConfigurationEditResponse -from cloudflare.types.zero_trust.gateway.configuration_update_response import ConfigurationUpdateResponse +from cloudflare.types.zero_trust.gateway import ( + ConfigurationGetResponse, + ConfigurationEditResponse, + ConfigurationUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestConfigurations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: configuration = client.zero_trust.gateway.configurations.update( @@ -27,7 +28,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ConfigurationUpdateResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: configuration = client.zero_trust.gateway.configurations.update( @@ -72,7 +72,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ConfigurationUpdateResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.configurations.with_raw_response.update( @@ -84,7 +83,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: configuration = response.parse() assert_matches_type(Optional[ConfigurationUpdateResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.configurations.with_streaming_response.update( @@ -98,7 +96,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -106,7 +103,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: configuration = client.zero_trust.gateway.configurations.edit( @@ -114,7 +110,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ConfigurationEditResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: configuration = client.zero_trust.gateway.configurations.edit( @@ -159,7 +154,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ConfigurationEditResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.configurations.with_raw_response.edit( @@ -171,7 +165,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: configuration = response.parse() assert_matches_type(Optional[ConfigurationEditResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.gateway.configurations.with_streaming_response.edit( @@ -185,7 +178,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -193,7 +185,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: configuration = client.zero_trust.gateway.configurations.get( @@ -201,7 +192,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ConfigurationGetResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.configurations.with_raw_response.get( @@ -213,7 +203,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: configuration = response.parse() assert_matches_type(Optional[ConfigurationGetResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.configurations.with_streaming_response.get( @@ -227,7 +216,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -239,7 +227,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigurations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.gateway.configurations.update( @@ -247,7 +234,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ConfigurationUpdateResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.gateway.configurations.update( @@ -292,7 +278,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[ConfigurationUpdateResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.configurations.with_raw_response.update( @@ -304,7 +289,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: configuration = await response.parse() assert_matches_type(Optional[ConfigurationUpdateResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.configurations.with_streaming_response.update( @@ -318,7 +302,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -326,7 +309,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.gateway.configurations.edit( @@ -334,7 +316,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ConfigurationEditResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.gateway.configurations.edit( @@ -379,7 +360,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[ConfigurationEditResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.configurations.with_raw_response.edit( @@ -391,7 +371,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: configuration = await response.parse() assert_matches_type(Optional[ConfigurationEditResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.configurations.with_streaming_response.edit( @@ -405,7 +384,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -413,7 +391,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.gateway.configurations.get( @@ -421,7 +398,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ConfigurationGetResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.configurations.with_raw_response.get( @@ -433,7 +409,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: configuration = await response.parse() assert_matches_type(Optional[ConfigurationGetResponse], configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.configurations.with_streaming_response.get( @@ -447,7 +422,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index 7881181bdad..cfd4e978d0f 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.gateway.gateway_list import GatewayList -from cloudflare.types.zero_trust.gateway.list_create_response import ListCreateResponse -from cloudflare.types.zero_trust.gateway.list_delete_response import ListDeleteResponse +from cloudflare.types.zero_trust.gateway import ( + GatewayList, + ListCreateResponse, + ListDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,29 +22,26 @@ class TestLists: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: - list = client.zero_trust.gateway.lists.create( + list_ = client.zero_trust.gateway.lists.create( account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="SERIAL", ) - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: - list = client.zero_trust.gateway.lists.create( + list_ = client.zero_trust.gateway.lists.create( account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="SERIAL", description="The serial numbers for administrators", items=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], ) - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.create( @@ -53,10 +52,9 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.create( @@ -67,12 +65,11 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -82,28 +79,25 @@ def test_path_params_create(self, client: Cloudflare) -> None: type="SERIAL", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: - list = client.zero_trust.gateway.lists.update( + list_ = client.zero_trust.gateway.lists.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: - list = client.zero_trust.gateway.lists.update( + list_ = client.zero_trust.gateway.lists.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", description="The serial numbers for administrators", ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.update( @@ -114,10 +108,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.update( @@ -128,12 +121,11 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -150,15 +142,13 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="Admin Serial Numbers", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: - list = client.zero_trust.gateway.lists.list( + list_ = client.zero_trust.gateway.lists.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(SyncSinglePage[GatewayList], list, path=["response"]) + assert_matches_type(SyncSinglePage[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.list( @@ -167,10 +157,9 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(SyncSinglePage[GatewayList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(SyncSinglePage[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.list( @@ -179,12 +168,11 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(SyncSinglePage[GatewayList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(SyncSinglePage[GatewayList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -192,84 +180,72 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: - list = client.zero_trust.gateway.lists.delete( + list_ = client.zero_trust.gateway.lists.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: - list = client.zero_trust.gateway.lists.edit( + list_ = client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - list = client.zero_trust.gateway.lists.edit( + list_ = client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.edit( @@ -279,10 +255,9 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.edit( @@ -292,12 +267,11 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -312,16 +286,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: - list = client.zero_trust.gateway.lists.get( + list_ = client.zero_trust.gateway.lists.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.get( @@ -331,10 +303,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.get( @@ -344,12 +315,11 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -368,29 +338,26 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLists: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: - list = await async_client.zero_trust.gateway.lists.create( + list_ = await async_client.zero_trust.gateway.lists.create( account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="SERIAL", ) - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: - list = await async_client.zero_trust.gateway.lists.create( + list_ = await async_client.zero_trust.gateway.lists.create( account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="SERIAL", description="The serial numbers for administrators", items=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], ) - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.create( @@ -401,10 +368,9 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.create( @@ -415,12 +381,11 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -430,28 +395,25 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: type="SERIAL", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: - list = await async_client.zero_trust.gateway.lists.update( + list_ = await async_client.zero_trust.gateway.lists.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - list = await async_client.zero_trust.gateway.lists.update( + list_ = await async_client.zero_trust.gateway.lists.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", description="The serial numbers for administrators", ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.update( @@ -462,10 +424,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.update( @@ -476,12 +437,11 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -498,15 +458,13 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="Admin Serial Numbers", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: - list = await async_client.zero_trust.gateway.lists.list( + list_ = await async_client.zero_trust.gateway.lists.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AsyncSinglePage[GatewayList], list, path=["response"]) + assert_matches_type(AsyncSinglePage[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.list( @@ -515,10 +473,9 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(AsyncSinglePage[GatewayList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(AsyncSinglePage[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.list( @@ -527,12 +484,11 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(AsyncSinglePage[GatewayList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(AsyncSinglePage[GatewayList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -540,84 +496,72 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - list = await async_client.zero_trust.gateway.lists.delete( + list_ = await async_client.zero_trust.gateway.lists.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[ListDeleteResponse], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - list = await async_client.zero_trust.gateway.lists.edit( + list_ = await async_client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - list = await async_client.zero_trust.gateway.lists.edit( + list_ = await async_client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.edit( @@ -627,10 +571,9 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.edit( @@ -640,12 +583,11 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -660,16 +602,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: - list = await async_client.zero_trust.gateway.lists.get( + list_ = await async_client.zero_trust.gateway.lists.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[GatewayList], list, path=["response"]) + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.get( @@ -679,10 +619,9 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.get( @@ -692,12 +631,11 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - list = await response.parse() - assert_matches_type(Optional[GatewayList], list, path=["response"]) + list_ = await response.parse() + assert_matches_type(Optional[GatewayList], list_, path=["response"]) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/test_locations.py b/tests/api_resources/zero_trust/gateway/test_locations.py index 4049a984b30..6051b87485f 100644 --- a/tests/api_resources/zero_trust/gateway/test_locations.py +++ b/tests/api_resources/zero_trust/gateway/test_locations.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.gateway.location import Location -from cloudflare.types.zero_trust.gateway.location_delete_response import LocationDeleteResponse +from cloudflare.types.zero_trust.gateway import ( + Location, + LocationDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestLocations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.create( @@ -28,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.create( @@ -40,7 +40,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.create( @@ -53,7 +52,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.create( @@ -68,7 +66,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -77,7 +74,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="Austin Office Location", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.update( @@ -87,7 +83,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.update( @@ -100,7 +95,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.update( @@ -114,7 +108,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.update( @@ -130,7 +123,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -147,7 +139,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="Austin Office Location", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.list( @@ -155,7 +146,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.list( @@ -167,7 +157,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(SyncSinglePage[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.list( @@ -181,7 +170,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -189,23 +177,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[LocationDeleteResponse], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -213,13 +197,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(Optional[LocationDeleteResponse], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -229,24 +211,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.get( @@ -255,7 +233,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.get( @@ -268,7 +245,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: location = response.parse() assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.get( @@ -283,7 +259,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -302,7 +277,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLocations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.create( @@ -311,7 +285,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.create( @@ -323,7 +296,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.create( @@ -336,7 +308,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.create( @@ -351,7 +322,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -360,7 +330,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="Austin Office Location", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.update( @@ -370,7 +339,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.update( @@ -383,7 +351,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.update( @@ -397,7 +364,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.update( @@ -413,7 +379,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -430,7 +395,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="Austin Office Location", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.list( @@ -438,7 +402,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.list( @@ -450,7 +413,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(AsyncSinglePage[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.list( @@ -464,7 +426,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -472,23 +433,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[LocationDeleteResponse], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -496,13 +453,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(Optional[LocationDeleteResponse], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -512,24 +467,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.get( @@ -538,7 +489,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.get( @@ -551,7 +501,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: location = await response.parse() assert_matches_type(Optional[Location], location, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.get( @@ -566,7 +515,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/test_logging.py b/tests/api_resources/zero_trust/gateway/test_logging.py index 456b0289c8b..a157696ec07 100644 --- a/tests/api_resources/zero_trust/gateway/test_logging.py +++ b/tests/api_resources/zero_trust/gateway/test_logging.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.gateway.logging_setting import LoggingSetting +from cloudflare.types.zero_trust.gateway import LoggingSetting base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestLogging: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: logging = client.zero_trust.gateway.logging.update( @@ -25,7 +24,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: logging = client.zero_trust.gateway.logging.update( @@ -39,7 +37,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.logging.with_raw_response.update( @@ -51,7 +48,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: logging = response.parse() assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.logging.with_streaming_response.update( @@ -65,7 +61,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +68,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: logging = client.zero_trust.gateway.logging.get( @@ -81,7 +75,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.logging.with_raw_response.get( @@ -93,7 +86,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: logging = response.parse() assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.logging.with_streaming_response.get( @@ -107,7 +99,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -119,7 +110,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLogging: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: logging = await async_client.zero_trust.gateway.logging.update( @@ -127,7 +117,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: logging = await async_client.zero_trust.gateway.logging.update( @@ -141,7 +130,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.logging.with_raw_response.update( @@ -153,7 +141,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: logging = await response.parse() assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.logging.with_streaming_response.update( @@ -167,7 +154,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -175,7 +161,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: logging = await async_client.zero_trust.gateway.logging.get( @@ -183,7 +168,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.logging.with_raw_response.get( @@ -195,7 +179,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: logging = await response.parse() assert_matches_type(Optional[LoggingSetting], logging, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.logging.with_streaming_response.get( @@ -209,7 +192,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py index ebc9df85eb6..d46c4b8884e 100644 --- a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py +++ b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.gateway.proxy_endpoint import ProxyEndpoint -from cloudflare.types.zero_trust.gateway.proxy_endpoint_delete_response import ProxyEndpointDeleteResponse +from cloudflare.types.zero_trust.gateway import ( + ProxyEndpoint, + ProxyEndpointDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestProxyEndpoints: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.create( @@ -43,7 +43,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: proxy_endpoint = response.parse() assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.create( @@ -59,7 +58,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -69,7 +67,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="Devops team", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.list( @@ -77,7 +74,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.list( @@ -89,7 +85,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: proxy_endpoint = response.parse() assert_matches_type(SyncSinglePage[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.list( @@ -103,7 +98,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -111,23 +105,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[ProxyEndpointDeleteResponse], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -135,13 +125,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: proxy_endpoint = response.parse() assert_matches_type(Optional[ProxyEndpointDeleteResponse], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -151,24 +139,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.edit( @@ -177,7 +161,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.edit( @@ -188,7 +171,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( @@ -201,7 +183,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: proxy_endpoint = response.parse() assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.edit( @@ -216,7 +197,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -231,7 +211,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.get( @@ -240,7 +219,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( @@ -253,7 +231,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: proxy_endpoint = response.parse() assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.get( @@ -268,7 +245,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -287,7 +263,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncProxyEndpoints: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.create( @@ -297,7 +272,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.create( @@ -311,7 +285,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await response.parse() assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.create( @@ -327,7 +300,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -337,7 +309,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="Devops team", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.list( @@ -345,7 +316,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.list( @@ -357,7 +327,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await response.parse() assert_matches_type(AsyncSinglePage[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.list( @@ -371,7 +340,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -379,23 +347,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[ProxyEndpointDeleteResponse], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -403,13 +367,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await response.parse() assert_matches_type(Optional[ProxyEndpointDeleteResponse], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -419,24 +381,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( "ed35569b41ce4d1facfe683550f54086", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.edit( @@ -445,7 +403,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.edit( @@ -456,7 +413,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( @@ -469,7 +425,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await response.parse() assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.edit( @@ -484,7 +439,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -499,7 +453,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.get( @@ -508,7 +461,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( @@ -521,7 +473,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await response.parse() assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.get( @@ -536,7 +487,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index 06386fffc8a..b83694ffb9f 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -10,8 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.gateway.gateway_rule import GatewayRule -from cloudflare.types.zero_trust.gateway.rule_delete_response import RuleDeleteResponse +from cloudflare.types.zero_trust.gateway import ( + GatewayRule, + RuleDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +21,6 @@ class TestRules: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.create( @@ -142,7 +142,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.create( @@ -156,7 +155,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.create( @@ -172,7 +170,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -182,7 +179,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="block bad websites", ) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.update( @@ -193,7 +189,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.update( @@ -307,7 +302,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.update( @@ -322,7 +316,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.update( @@ -339,7 +332,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -358,7 +350,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: name="block bad websites", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.list( @@ -366,7 +357,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.list( @@ -378,7 +368,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(SyncSinglePage[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.list( @@ -392,7 +381,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -400,23 +388,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -424,13 +408,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -440,24 +422,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.get( @@ -466,7 +444,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.get( @@ -479,7 +456,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: rule = response.parse() assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.get( @@ -494,7 +470,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -513,7 +488,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.create( @@ -523,7 +497,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.create( @@ -636,7 +609,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.create( @@ -650,7 +622,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.create( @@ -666,7 +637,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -676,7 +646,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="block bad websites", ) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.update( @@ -687,7 +656,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.update( @@ -801,7 +769,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.update( @@ -816,7 +783,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.update( @@ -833,7 +799,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -852,7 +817,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: name="block bad websites", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.list( @@ -860,7 +824,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.list( @@ -872,7 +835,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(AsyncSinglePage[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.list( @@ -886,7 +848,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -894,23 +855,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -918,13 +875,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -934,24 +889,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.get( @@ -960,7 +911,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.get( @@ -973,7 +923,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: rule = await response.parse() assert_matches_type(Optional[GatewayRule], rule, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.get( @@ -988,7 +937,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/networks/routes/test_ips.py b/tests/api_resources/zero_trust/networks/routes/test_ips.py index a9e502c1168..c21dd1b14b1 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_ips.py +++ b/tests/api_resources/zero_trust/networks/routes/test_ips.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.networks.teamnet import Teamnet +from cloudflare.types.zero_trust.networks import Teamnet base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestIPs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ip = client.zero_trust.networks.routes.ips.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Teamnet, ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip = client.zero_trust.networks.routes.ips.get( @@ -36,7 +34,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Teamnet, ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.ips.with_raw_response.get( @@ -49,7 +46,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ip = response.parse() assert_matches_type(Teamnet, ip, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.ips.with_streaming_response.get( @@ -64,7 +60,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -83,7 +78,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip = await async_client.zero_trust.networks.routes.ips.get( @@ -92,7 +86,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Teamnet, ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip = await async_client.zero_trust.networks.routes.ips.get( @@ -102,7 +95,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Teamnet, ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.ips.with_raw_response.get( @@ -115,7 +107,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ip = await response.parse() assert_matches_type(Teamnet, ip, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.ips.with_streaming_response.get( @@ -130,7 +121,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/networks/routes/test_networks.py b/tests/api_resources/zero_trust/networks/routes/test_networks.py index 080b8b57b6b..e00d2809cc0 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_networks.py +++ b/tests/api_resources/zero_trust/networks/routes/test_networks.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.networks.route import Route +from cloudflare.types.zero_trust.networks import Route base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestNetworks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.create( @@ -26,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.create( @@ -37,7 +35,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.create( @@ -50,7 +47,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: network = response.parse() assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.create( @@ -65,7 +61,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -80,7 +75,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.delete( @@ -89,7 +83,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.delete( @@ -101,7 +94,6 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.delete( @@ -114,7 +106,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: network = response.parse() assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.delete( @@ -129,7 +120,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -144,7 +134,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.edit( @@ -153,7 +142,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.edit( @@ -166,7 +154,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: network = response.parse() assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.edit( @@ -181,7 +168,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -200,7 +186,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncNetworks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.create( @@ -209,7 +194,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.create( @@ -220,7 +204,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.create( @@ -233,7 +216,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: network = await response.parse() assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.networks.with_streaming_response.create( @@ -248,7 +230,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -263,7 +244,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.delete( @@ -272,7 +252,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.delete( @@ -284,7 +263,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.delete( @@ -297,7 +275,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: network = await response.parse() assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.networks.with_streaming_response.delete( @@ -312,7 +289,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -327,7 +303,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.edit( @@ -336,7 +311,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.edit( @@ -349,7 +323,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: network = await response.parse() assert_matches_type(Route, network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.networks.with_streaming_response.edit( @@ -364,7 +337,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/networks/test_routes.py b/tests/api_resources/zero_trust/networks/test_routes.py index ce54749d1d8..8406fdd7204 100644 --- a/tests/api_resources/zero_trust/networks/test_routes.py +++ b/tests/api_resources/zero_trust/networks/test_routes.py @@ -11,8 +11,10 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.zero_trust.networks.route import Route -from cloudflare.types.zero_trust.networks.teamnet import Teamnet +from cloudflare.types.zero_trust.networks import ( + Route, + Teamnet, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,6 @@ class TestRoutes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.create( @@ -29,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.create( @@ -40,7 +40,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.with_raw_response.create( @@ -53,7 +52,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.with_streaming_response.create( @@ -68,7 +66,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -77,7 +74,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: network="172.16.0.0/16", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.list( @@ -85,7 +81,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Teamnet], route, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.list( @@ -104,7 +99,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[Teamnet], route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.with_raw_response.list( @@ -116,7 +110,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(SyncV4PagePaginationArray[Teamnet], route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.with_streaming_response.list( @@ -130,7 +123,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -138,7 +130,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.delete( @@ -147,7 +138,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.with_raw_response.delete( @@ -160,7 +150,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.with_streaming_response.delete( @@ -175,7 +164,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -190,7 +178,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.edit( @@ -199,7 +186,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.edit( @@ -211,7 +197,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.with_raw_response.edit( @@ -224,7 +209,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: route = response.parse() assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.with_streaming_response.edit( @@ -239,7 +223,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -258,7 +241,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncRoutes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.create( @@ -267,7 +249,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.create( @@ -278,7 +259,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.with_raw_response.create( @@ -291,7 +271,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.with_streaming_response.create( @@ -306,7 +285,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -315,7 +293,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: network="172.16.0.0/16", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.list( @@ -323,7 +300,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[Teamnet], route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.list( @@ -342,7 +318,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[Teamnet], route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.with_raw_response.list( @@ -354,7 +329,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[Teamnet], route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.with_streaming_response.list( @@ -368,7 +342,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -376,7 +349,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.delete( @@ -385,7 +357,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.with_raw_response.delete( @@ -398,7 +369,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.with_streaming_response.delete( @@ -413,7 +383,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -428,7 +397,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.edit( @@ -437,7 +405,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.edit( @@ -449,7 +416,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.with_raw_response.edit( @@ -462,7 +428,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: route = await response.parse() assert_matches_type(Route, route, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.with_streaming_response.edit( @@ -477,7 +442,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/networks/test_virtual_networks.py b/tests/api_resources/zero_trust/networks/test_virtual_networks.py index 0605b0ea6c5..3bb59293bd8 100644 --- a/tests/api_resources/zero_trust/networks/test_virtual_networks.py +++ b/tests/api_resources/zero_trust/networks/test_virtual_networks.py @@ -10,10 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.networks.virtual_network import VirtualNetwork -from cloudflare.types.zero_trust.networks.virtual_network_edit_response import VirtualNetworkEditResponse -from cloudflare.types.zero_trust.networks.virtual_network_create_response import VirtualNetworkCreateResponse -from cloudflare.types.zero_trust.networks.virtual_network_delete_response import VirtualNetworkDeleteResponse +from cloudflare.types.zero_trust.networks import ( + VirtualNetwork, + VirtualNetworkEditResponse, + VirtualNetworkCreateResponse, + VirtualNetworkDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +23,6 @@ class TestVirtualNetworks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.create( @@ -30,7 +31,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(VirtualNetworkCreateResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.create( @@ -41,7 +41,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(VirtualNetworkCreateResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.networks.virtual_networks.with_raw_response.create( @@ -54,7 +53,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: virtual_network = response.parse() assert_matches_type(VirtualNetworkCreateResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.networks.virtual_networks.with_streaming_response.create( @@ -69,7 +67,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -78,7 +75,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="us-east-1-vpc", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.list( @@ -86,7 +82,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[VirtualNetwork], virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.list( @@ -98,7 +93,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[VirtualNetwork], virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.networks.virtual_networks.with_raw_response.list( @@ -110,7 +104,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: virtual_network = response.parse() assert_matches_type(SyncSinglePage[VirtualNetwork], virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.networks.virtual_networks.with_streaming_response.list( @@ -124,7 +117,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -132,23 +124,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(VirtualNetworkDeleteResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.networks.virtual_networks.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -156,13 +144,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: virtual_network = response.parse() assert_matches_type(VirtualNetworkDeleteResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.networks.virtual_networks.with_streaming_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -172,24 +158,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.networks.virtual_networks.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): client.zero_trust.networks.virtual_networks.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.edit( @@ -198,7 +180,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.edit( @@ -210,7 +191,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.networks.virtual_networks.with_raw_response.edit( @@ -223,7 +203,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: virtual_network = response.parse() assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.networks.virtual_networks.with_streaming_response.edit( @@ -238,7 +217,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -257,7 +235,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncVirtualNetworks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.create( @@ -266,7 +243,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(VirtualNetworkCreateResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.create( @@ -277,7 +253,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(VirtualNetworkCreateResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.virtual_networks.with_raw_response.create( @@ -290,7 +265,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: virtual_network = await response.parse() assert_matches_type(VirtualNetworkCreateResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.virtual_networks.with_streaming_response.create( @@ -305,7 +279,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -314,7 +287,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="us-east-1-vpc", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.list( @@ -322,7 +294,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[VirtualNetwork], virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.list( @@ -334,7 +305,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[VirtualNetwork], virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.virtual_networks.with_raw_response.list( @@ -346,7 +316,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: virtual_network = await response.parse() assert_matches_type(AsyncSinglePage[VirtualNetwork], virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.virtual_networks.with_streaming_response.list( @@ -360,7 +329,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -368,23 +336,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(VirtualNetworkDeleteResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.virtual_networks.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -392,13 +356,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: virtual_network = await response.parse() assert_matches_type(VirtualNetworkDeleteResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.virtual_networks.with_streaming_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -408,24 +370,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.networks.virtual_networks.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): await async_client.zero_trust.networks.virtual_networks.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.edit( @@ -434,7 +392,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.edit( @@ -446,7 +403,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.virtual_networks.with_raw_response.edit( @@ -459,7 +415,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: virtual_network = await response.parse() assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.virtual_networks.with_streaming_response.edit( @@ -474,7 +429,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py index b3a3f782a81..f9d0bf7503f 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.risk_scoring.behaviour_get_response import BehaviourGetResponse -from cloudflare.types.zero_trust.risk_scoring.behaviour_update_response import BehaviourUpdateResponse +from cloudflare.types.zero_trust.risk_scoring import ( + BehaviourGetResponse, + BehaviourUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestBehaviours: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: behaviour = client.zero_trust.risk_scoring.behaviours.update( @@ -26,7 +27,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: behaviour = client.zero_trust.risk_scoring.behaviours.update( @@ -40,7 +40,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.behaviours.with_raw_response.update( @@ -52,7 +51,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: behaviour = response.parse() assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.behaviours.with_streaming_response.update( @@ -66,7 +64,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -74,7 +71,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: behaviour = client.zero_trust.risk_scoring.behaviours.get( @@ -82,7 +78,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(BehaviourGetResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.behaviours.with_raw_response.get( @@ -94,7 +89,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: behaviour = response.parse() assert_matches_type(BehaviourGetResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.behaviours.with_streaming_response.get( @@ -108,7 +102,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -120,7 +113,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBehaviours: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: behaviour = await async_client.zero_trust.risk_scoring.behaviours.update( @@ -128,7 +120,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: behaviour = await async_client.zero_trust.risk_scoring.behaviours.update( @@ -142,7 +133,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.behaviours.with_raw_response.update( @@ -154,7 +144,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: behaviour = await response.parse() assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.behaviours.with_streaming_response.update( @@ -168,7 +157,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -176,7 +164,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: behaviour = await async_client.zero_trust.risk_scoring.behaviours.get( @@ -184,7 +171,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(BehaviourGetResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.behaviours.with_raw_response.get( @@ -196,7 +182,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: behaviour = await response.parse() assert_matches_type(BehaviourGetResponse, behaviour, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.behaviours.with_streaming_response.get( @@ -210,7 +195,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/risk_scoring/test_summary.py b/tests/api_resources/zero_trust/risk_scoring/test_summary.py index b10f5fe4b9c..1ae273a5a8c 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_summary.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_summary.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.risk_scoring.summary_get_response import SummaryGetResponse +from cloudflare.types.zero_trust.risk_scoring import SummaryGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSummary: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: summary = client.zero_trust.risk_scoring.summary.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: summary = client.zero_trust.risk_scoring.summary.get( @@ -37,7 +35,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.summary.with_raw_response.get( @@ -49,7 +46,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: summary = response.parse() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.summary.with_streaming_response.get( @@ -63,7 +59,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -75,7 +70,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSummary: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: summary = await async_client.zero_trust.risk_scoring.summary.get( @@ -83,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.zero_trust.risk_scoring.summary.get( @@ -95,7 +88,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.summary.with_raw_response.get( @@ -107,7 +99,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: summary = await response.parse() assert_matches_type(SummaryGetResponse, summary, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.summary.with_streaming_response.get( @@ -121,7 +112,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/test_connectivity_settings.py b/tests/api_resources/zero_trust/test_connectivity_settings.py index 5c129dd44c4..310f4319091 100644 --- a/tests/api_resources/zero_trust/test_connectivity_settings.py +++ b/tests/api_resources/zero_trust/test_connectivity_settings.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.connectivity_setting_get_response import ConnectivitySettingGetResponse -from cloudflare.types.zero_trust.connectivity_setting_edit_response import ConnectivitySettingEditResponse +from cloudflare.types.zero_trust import ( + ConnectivitySettingGetResponse, + ConnectivitySettingEditResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestConnectivitySettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: connectivity_setting = client.zero_trust.connectivity_settings.edit( @@ -26,7 +27,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(ConnectivitySettingEditResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: connectivity_setting = client.zero_trust.connectivity_settings.edit( @@ -36,7 +36,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ConnectivitySettingEditResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.connectivity_settings.with_raw_response.edit( @@ -48,7 +47,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: connectivity_setting = response.parse() assert_matches_type(ConnectivitySettingEditResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.connectivity_settings.with_streaming_response.edit( @@ -62,7 +60,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -70,7 +67,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: connectivity_setting = client.zero_trust.connectivity_settings.get( @@ -78,7 +74,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ConnectivitySettingGetResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.connectivity_settings.with_raw_response.get( @@ -90,7 +85,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: connectivity_setting = response.parse() assert_matches_type(ConnectivitySettingGetResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.connectivity_settings.with_streaming_response.get( @@ -104,7 +98,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -116,7 +109,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnectivitySettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: connectivity_setting = await async_client.zero_trust.connectivity_settings.edit( @@ -124,7 +116,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ConnectivitySettingEditResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: connectivity_setting = await async_client.zero_trust.connectivity_settings.edit( @@ -134,7 +125,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(ConnectivitySettingEditResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.connectivity_settings.with_raw_response.edit( @@ -146,7 +136,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: connectivity_setting = await response.parse() assert_matches_type(ConnectivitySettingEditResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.connectivity_settings.with_streaming_response.edit( @@ -160,7 +149,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -168,7 +156,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connectivity_setting = await async_client.zero_trust.connectivity_settings.get( @@ -176,7 +163,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ConnectivitySettingGetResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.connectivity_settings.with_raw_response.get( @@ -188,7 +174,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: connectivity_setting = await response.parse() assert_matches_type(ConnectivitySettingGetResponse, connectivity_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.connectivity_settings.with_streaming_response.get( @@ -202,7 +187,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/test_devices.py b/tests/api_resources/zero_trust/test_devices.py index 9e3bbc48c25..6b0adb03848 100644 --- a/tests/api_resources/zero_trust/test_devices.py +++ b/tests/api_resources/zero_trust/test_devices.py @@ -10,8 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.device import Device -from cloudflare.types.zero_trust.device_get_response import DeviceGetResponse +from cloudflare.types.zero_trust import Device, DeviceGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,7 +18,6 @@ class TestDevices: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: device = client.zero_trust.devices.list( @@ -27,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Device], device, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.with_raw_response.list( @@ -39,7 +36,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: device = response.parse() assert_matches_type(SyncSinglePage[Device], device, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.with_streaming_response.list( @@ -53,7 +49,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -61,7 +56,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: device = client.zero_trust.devices.get( @@ -70,7 +64,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(DeviceGetResponse, device, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.with_raw_response.get( @@ -83,7 +76,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: device = response.parse() assert_matches_type(DeviceGetResponse, device, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.with_streaming_response.get( @@ -98,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -117,7 +108,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDevices: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: device = await async_client.zero_trust.devices.list( @@ -125,7 +115,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Device], device, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.with_raw_response.list( @@ -137,7 +126,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: device = await response.parse() assert_matches_type(AsyncSinglePage[Device], device, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.with_streaming_response.list( @@ -151,7 +139,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -159,7 +146,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: device = await async_client.zero_trust.devices.get( @@ -168,7 +154,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DeviceGetResponse, device, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.with_raw_response.get( @@ -181,7 +166,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: device = await response.parse() assert_matches_type(DeviceGetResponse, device, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.with_streaming_response.get( @@ -196,7 +180,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/test_gateway.py b/tests/api_resources/zero_trust/test_gateway.py index 9089bb0f26d..4f68a4f6c2c 100644 --- a/tests/api_resources/zero_trust/test_gateway.py +++ b/tests/api_resources/zero_trust/test_gateway.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.gateway_list_response import GatewayListResponse -from cloudflare.types.zero_trust.gateway_create_response import GatewayCreateResponse +from cloudflare.types.zero_trust import GatewayListResponse, GatewayCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestGateway: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: gateway = client.zero_trust.gateway.create( @@ -26,7 +24,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewayCreateResponse], gateway, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.with_raw_response.create( @@ -38,7 +35,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: gateway = response.parse() assert_matches_type(Optional[GatewayCreateResponse], gateway, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.gateway.with_streaming_response.create( @@ -52,7 +48,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -60,7 +55,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: gateway = client.zero_trust.gateway.list( @@ -68,7 +62,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[GatewayListResponse], gateway, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.with_raw_response.list( @@ -80,7 +73,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: gateway = response.parse() assert_matches_type(Optional[GatewayListResponse], gateway, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.with_streaming_response.list( @@ -94,7 +86,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -106,7 +97,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncGateway: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: gateway = await async_client.zero_trust.gateway.create( @@ -114,7 +104,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[GatewayCreateResponse], gateway, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.with_raw_response.create( @@ -126,7 +115,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: gateway = await response.parse() assert_matches_type(Optional[GatewayCreateResponse], gateway, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.with_streaming_response.create( @@ -140,7 +128,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -148,7 +135,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: gateway = await async_client.zero_trust.gateway.list( @@ -156,7 +142,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[GatewayListResponse], gateway, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.with_raw_response.list( @@ -168,7 +153,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: gateway = await response.parse() assert_matches_type(Optional[GatewayListResponse], gateway, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.with_streaming_response.list( @@ -182,7 +166,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py index 82ace384f03..7204c198113 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -10,9 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.zero_trust.identity_provider import IdentityProvider -from cloudflare.types.zero_trust.identity_provider_list_response import IdentityProviderListResponse -from cloudflare.types.zero_trust.identity_provider_delete_response import IdentityProviderDeleteResponse +from cloudflare.types.zero_trust import ( + IdentityProvider, + IdentityProviderListResponse, + IdentityProviderDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +22,7 @@ class TestIdentityProviders: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -28,11 +30,10 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -49,7 +50,6 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -60,7 +60,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -68,7 +68,6 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -76,7 +75,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -84,7 +83,6 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -94,7 +92,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -103,7 +101,6 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -112,10 +109,9 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -123,11 +119,10 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -142,7 +137,6 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -153,7 +147,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -161,7 +155,6 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -169,7 +162,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -177,7 +170,6 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -187,7 +179,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -196,7 +188,6 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -205,10 +196,9 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_3(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -216,11 +206,10 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -231,7 +220,6 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -242,7 +230,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -250,7 +238,6 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -258,7 +245,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -266,7 +253,6 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -276,7 +262,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -285,7 +271,6 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -294,10 +279,9 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_4(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -305,11 +289,10 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -320,7 +303,6 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -331,7 +313,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -339,7 +321,6 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -347,7 +328,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -355,7 +336,6 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -365,7 +345,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -374,7 +354,6 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -383,10 +362,9 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_5(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -394,11 +372,10 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -411,7 +388,6 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -422,7 +398,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -430,7 +406,6 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -438,7 +413,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -446,7 +421,6 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -456,7 +430,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -465,7 +439,6 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -474,10 +447,9 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_6(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -485,11 +457,10 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -503,7 +474,6 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -514,7 +484,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -522,7 +492,6 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -530,7 +499,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -538,7 +507,6 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -548,7 +516,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -557,7 +525,6 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -566,10 +533,9 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_7(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -577,11 +543,10 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -592,7 +557,6 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -603,7 +567,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -611,7 +575,6 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -619,7 +582,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -627,7 +590,6 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -637,7 +599,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -646,7 +608,6 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -655,10 +616,9 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -666,11 +626,10 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -687,7 +646,6 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -698,7 +656,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -706,7 +664,6 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -714,7 +671,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -722,7 +679,6 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -732,7 +688,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -741,7 +697,6 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -750,10 +705,9 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_9(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -761,11 +715,10 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -780,7 +733,6 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -791,7 +743,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -799,7 +751,6 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -807,7 +758,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -815,7 +766,6 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -825,7 +775,7 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -834,7 +784,6 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -843,10 +792,9 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_10(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -854,11 +802,10 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -872,7 +819,6 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -883,7 +829,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -891,7 +837,6 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -899,7 +844,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -907,7 +852,6 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -917,7 +861,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -926,7 +870,6 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -935,10 +878,9 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_11(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -946,11 +888,10 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -964,7 +905,6 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -975,7 +915,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -983,7 +923,6 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -991,7 +930,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -999,7 +938,6 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1009,7 +947,7 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1018,7 +956,6 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1027,10 +964,9 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_12(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -1038,11 +974,10 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -1071,7 +1006,6 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1082,7 +1016,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -1090,7 +1024,6 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1098,7 +1031,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -1106,7 +1039,6 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1116,7 +1048,7 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1125,7 +1057,6 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1134,10 +1065,9 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_13(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -1145,11 +1075,10 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -1160,7 +1089,6 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1171,7 +1099,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -1179,7 +1107,6 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1187,7 +1114,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -1195,7 +1122,6 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1205,7 +1131,7 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1214,7 +1140,6 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1223,10 +1148,9 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_14(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -1234,11 +1158,10 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.create( @@ -1246,7 +1169,6 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1257,7 +1179,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.create( @@ -1265,7 +1187,6 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1273,7 +1194,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.create( @@ -1281,7 +1202,6 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1291,7 +1211,7 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1300,7 +1220,6 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1309,10 +1228,9 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1321,11 +1239,10 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1343,7 +1260,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1354,7 +1270,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -1363,7 +1279,6 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1371,7 +1286,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -1380,7 +1295,6 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1390,7 +1304,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1400,7 +1314,6 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1410,7 +1323,6 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1420,10 +1332,9 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1432,11 +1343,10 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1452,7 +1362,6 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1463,7 +1372,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -1472,7 +1381,6 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1480,7 +1388,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -1489,7 +1397,6 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1499,7 +1406,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1509,7 +1416,6 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1519,7 +1425,6 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1529,10 +1434,9 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1541,11 +1445,10 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1557,7 +1460,6 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1568,7 +1470,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -1577,7 +1479,6 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1585,7 +1486,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -1594,7 +1495,6 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1604,7 +1504,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1614,7 +1514,6 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1624,7 +1523,6 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1634,10 +1532,9 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1646,11 +1543,10 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1662,7 +1558,6 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1673,7 +1568,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -1682,7 +1577,6 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1690,7 +1584,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -1699,7 +1593,6 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1709,7 +1602,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1719,7 +1612,6 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1729,7 +1621,6 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1739,10 +1630,9 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_5(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1751,11 +1641,10 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1769,7 +1658,6 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1780,7 +1668,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -1789,7 +1677,6 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1797,7 +1684,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -1806,7 +1693,6 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1816,7 +1702,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1826,7 +1712,6 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1836,7 +1721,6 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1846,10 +1730,9 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_6(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1858,11 +1741,10 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1877,7 +1759,6 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1888,7 +1769,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -1897,7 +1778,6 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1905,7 +1785,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -1914,7 +1794,6 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1924,7 +1803,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1934,7 +1813,6 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1944,7 +1822,6 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1954,10 +1831,9 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_7(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1966,11 +1842,10 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -1982,7 +1857,6 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1993,7 +1867,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -2002,7 +1876,6 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2010,7 +1883,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -2019,7 +1892,6 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2029,7 +1901,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -2039,7 +1911,6 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2049,7 +1920,6 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2059,10 +1929,9 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_8(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2071,11 +1940,10 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2093,7 +1961,6 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2104,7 +1971,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -2113,7 +1980,6 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2121,7 +1987,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -2130,7 +1996,6 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2140,7 +2005,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -2150,7 +2015,6 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2160,7 +2024,6 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2170,10 +2033,9 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_9(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2182,11 +2044,10 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2202,7 +2063,6 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2213,7 +2073,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -2222,7 +2082,6 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2230,7 +2089,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -2239,7 +2098,6 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2249,7 +2107,7 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -2259,7 +2117,6 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2269,7 +2126,6 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2279,10 +2135,9 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_10(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2291,11 +2146,10 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2310,7 +2164,6 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2321,7 +2174,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -2330,7 +2183,6 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2338,7 +2190,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -2347,7 +2199,6 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2357,7 +2208,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -2367,7 +2218,6 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2377,7 +2227,6 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2387,10 +2236,9 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_11(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2399,11 +2247,10 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2418,7 +2265,6 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2429,7 +2275,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -2438,7 +2284,6 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2446,7 +2291,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -2455,7 +2300,6 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2465,7 +2309,7 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -2475,7 +2319,6 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2485,7 +2328,6 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2495,10 +2337,9 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_12(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2507,11 +2348,10 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2541,7 +2381,6 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2552,7 +2391,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -2561,7 +2400,6 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2569,7 +2407,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -2578,7 +2416,6 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2588,7 +2425,7 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -2598,7 +2435,6 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2608,7 +2444,6 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2618,10 +2453,9 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_13(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2630,11 +2464,10 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2646,7 +2479,6 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2657,7 +2489,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -2666,7 +2498,6 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2674,7 +2505,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -2683,7 +2514,6 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2693,7 +2523,7 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -2703,7 +2533,6 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2713,7 +2542,6 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2723,10 +2551,9 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_14(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2735,11 +2562,10 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( @@ -2748,7 +2574,6 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2759,7 +2584,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( @@ -2768,7 +2593,6 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2776,7 +2600,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( @@ -2785,7 +2609,6 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2795,7 +2618,7 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -2805,7 +2628,6 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2815,7 +2637,6 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2825,33 +2646,29 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2859,12 +2676,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2874,48 +2690,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2923,13 +2734,12 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2939,57 +2749,51 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.identity_providers.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2997,13 +2801,12 @@ def test_raw_response_get(self, client: Cloudflare) -> None: identity_provider = response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3013,35 +2816,32 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): client.zero_trust.identity_providers.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) class TestAsyncIdentityProviders: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3049,11 +2849,10 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3070,7 +2869,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3081,7 +2879,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3089,7 +2887,6 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3097,7 +2894,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3105,7 +2902,6 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3115,7 +2911,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3124,7 +2920,6 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3133,10 +2928,9 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3144,11 +2938,10 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3163,7 +2956,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3174,7 +2966,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3182,7 +2974,6 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3190,7 +2981,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3198,7 +2989,6 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3208,7 +2998,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3217,7 +3007,6 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3226,10 +3015,9 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3237,11 +3025,10 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3252,7 +3039,6 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3263,7 +3049,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3271,7 +3057,6 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3279,7 +3064,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3287,7 +3072,6 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3297,7 +3081,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3306,7 +3090,6 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3315,10 +3098,9 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3326,11 +3108,10 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3341,7 +3122,6 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3352,7 +3132,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3360,7 +3140,6 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3368,7 +3147,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3376,7 +3155,6 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3386,7 +3164,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3395,7 +3173,6 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3404,10 +3181,9 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3415,11 +3191,10 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3432,7 +3207,6 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3443,7 +3217,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3451,7 +3225,6 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3459,7 +3232,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3467,7 +3240,6 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3477,7 +3249,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3486,7 +3258,6 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3495,10 +3266,9 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3506,11 +3276,10 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3524,7 +3293,6 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3535,7 +3303,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3543,7 +3311,6 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3551,7 +3318,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3559,7 +3326,6 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3569,7 +3335,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3578,7 +3344,6 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3587,10 +3352,9 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3598,11 +3362,10 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3613,7 +3376,6 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3624,7 +3386,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3632,7 +3394,6 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3640,7 +3401,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3648,7 +3409,6 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3658,7 +3418,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3667,7 +3427,6 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3676,10 +3435,9 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3687,11 +3445,10 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3708,7 +3465,6 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3719,7 +3475,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3727,7 +3483,6 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3735,7 +3490,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3743,7 +3498,6 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3753,7 +3507,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3762,7 +3516,6 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3771,10 +3524,9 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3782,11 +3534,10 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3801,7 +3552,6 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3812,7 +3562,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3820,7 +3570,6 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3828,7 +3577,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3836,7 +3585,6 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3846,7 +3594,7 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3855,7 +3603,6 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3864,10 +3611,9 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3875,11 +3621,10 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3893,7 +3638,6 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3904,7 +3648,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -3912,7 +3656,6 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3920,7 +3663,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -3928,7 +3671,6 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3938,7 +3680,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3947,7 +3689,6 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3956,10 +3697,9 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3967,11 +3707,10 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -3985,7 +3724,6 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3996,7 +3734,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -4004,7 +3742,6 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4012,7 +3749,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -4020,7 +3757,6 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4030,7 +3766,7 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4039,7 +3775,6 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4048,10 +3783,9 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -4059,11 +3793,10 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -4092,7 +3825,6 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4103,7 +3835,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -4111,7 +3843,6 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4119,7 +3850,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -4127,7 +3858,6 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4137,7 +3867,7 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4146,7 +3876,6 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4155,10 +3884,9 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -4166,11 +3894,10 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -4181,7 +3908,6 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4192,7 +3918,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -4200,7 +3926,6 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4208,7 +3933,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -4216,7 +3941,6 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4226,7 +3950,7 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4235,7 +3959,6 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4244,10 +3967,9 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -4255,11 +3977,10 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.create( @@ -4267,7 +3988,6 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4278,7 +3998,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.create( @@ -4286,7 +4006,6 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4294,7 +4013,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.create( @@ -4302,7 +4021,6 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4312,7 +4030,7 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4321,7 +4039,6 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4330,10 +4047,9 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4342,11 +4058,10 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4364,7 +4079,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4375,7 +4089,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -4384,7 +4098,6 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4392,7 +4105,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -4401,7 +4114,6 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4411,7 +4123,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -4421,7 +4133,6 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4431,7 +4142,6 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4441,10 +4151,9 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4453,11 +4162,10 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4473,7 +4181,6 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4484,7 +4191,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -4493,7 +4200,6 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4501,7 +4207,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -4510,7 +4216,6 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4520,7 +4225,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -4530,7 +4235,6 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4540,7 +4244,6 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4550,10 +4253,9 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4562,11 +4264,10 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4578,7 +4279,6 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4589,7 +4289,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -4598,7 +4298,6 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4606,7 +4305,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -4615,7 +4314,6 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4625,7 +4323,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -4635,7 +4333,6 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4645,7 +4342,6 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4655,10 +4351,9 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4667,11 +4362,10 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4683,7 +4377,6 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4694,7 +4387,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -4703,7 +4396,6 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4711,7 +4403,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -4720,7 +4412,6 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4730,7 +4421,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -4740,7 +4431,6 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4750,7 +4440,6 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4760,10 +4449,9 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4772,11 +4460,10 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4790,7 +4477,6 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4801,7 +4487,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -4810,7 +4496,6 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4818,7 +4503,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -4827,7 +4512,6 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4837,7 +4521,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -4847,7 +4531,6 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4857,7 +4540,6 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4867,10 +4549,9 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4879,11 +4560,10 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4898,7 +4578,6 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4909,7 +4588,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -4918,7 +4597,6 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4926,7 +4604,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -4935,7 +4613,6 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4945,7 +4622,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -4955,7 +4632,6 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4965,7 +4641,6 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4975,10 +4650,9 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -4987,11 +4661,10 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5003,7 +4676,6 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5014,7 +4686,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -5023,7 +4695,6 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5031,7 +4702,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -5040,7 +4711,6 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5050,7 +4720,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -5060,7 +4730,6 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5070,7 +4739,6 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5080,10 +4748,9 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5092,11 +4759,10 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5114,7 +4780,6 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5125,7 +4790,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -5134,7 +4799,6 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5142,7 +4806,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -5151,7 +4815,6 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5161,7 +4824,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -5171,7 +4834,6 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5181,7 +4843,6 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5191,10 +4852,9 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5203,11 +4863,10 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5223,7 +4882,6 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5234,7 +4892,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -5243,7 +4901,6 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5251,7 +4908,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -5260,7 +4917,6 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5270,7 +4926,7 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -5280,7 +4936,6 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5290,7 +4945,6 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5300,10 +4954,9 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5312,11 +4965,10 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5331,7 +4983,6 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5342,7 +4993,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -5351,7 +5002,6 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5359,7 +5009,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -5368,7 +5018,6 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5378,7 +5027,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -5388,7 +5037,6 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5398,7 +5046,6 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5408,10 +5055,9 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5420,11 +5066,10 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5439,7 +5084,6 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5450,7 +5094,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -5459,7 +5103,6 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5467,7 +5110,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -5476,7 +5119,6 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5486,7 +5128,7 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -5496,7 +5138,6 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5506,7 +5147,6 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5516,10 +5156,9 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5528,11 +5167,10 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5562,7 +5200,6 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5573,7 +5210,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -5582,7 +5219,6 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5590,7 +5226,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -5599,7 +5235,6 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5609,7 +5244,7 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -5619,7 +5254,6 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5629,7 +5263,6 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5639,10 +5272,9 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5651,11 +5283,10 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5667,7 +5298,6 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5678,7 +5308,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -5687,7 +5317,6 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5695,7 +5324,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -5704,7 +5333,6 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5714,7 +5342,7 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -5724,7 +5352,6 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5734,7 +5361,6 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5744,10 +5370,9 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5756,11 +5381,10 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( @@ -5769,7 +5393,6 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5780,7 +5403,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( @@ -5789,7 +5412,6 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5797,7 +5419,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( @@ -5806,7 +5428,6 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5816,7 +5437,7 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -5826,7 +5447,6 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5836,7 +5456,6 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5846,33 +5465,29 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5880,12 +5495,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: identity_provider = await response.parse() assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5895,48 +5509,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5944,13 +5553,12 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: identity_provider = await response.parse() assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5960,57 +5568,51 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -6018,13 +5620,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: identity_provider = await response.parse() assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6034,26 +5635,23 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/test_organizations.py b/tests/api_resources/zero_trust/test_organizations.py index 8610b2484c8..ef9c6c862c3 100644 --- a/tests/api_resources/zero_trust/test_organizations.py +++ b/tests/api_resources/zero_trust/test_organizations.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.organization import Organization -from cloudflare.types.zero_trust.organization_revoke_users_response import OrganizationRevokeUsersResponse +from cloudflare.types.zero_trust import ( + Organization, + OrganizationRevokeUsersResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,25 +20,23 @@ class TestOrganizations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, auto_redirect_to_identity=True, is_ui_read_only=True, @@ -54,14 +54,13 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -69,14 +68,13 @@ def test_raw_response_create(self, client: Cloudflare) -> None: organization = response.parse() assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,7 +84,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -94,7 +92,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -102,24 +99,21 @@ def test_path_params_create(self, client: Cloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.update( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.update( account_id="string", - zone_id="string", allow_authenticate_via_warp=True, auth_domain="test.cloudflareaccess.com", auto_redirect_to_identity=True, @@ -143,12 +137,11 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.update( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -156,12 +149,11 @@ def test_raw_response_update(self, client: Cloudflare) -> None: organization = response.parse() assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.update( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -171,45 +163,40 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.organizations.with_raw_response.update( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.organizations.with_raw_response.update( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.list( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.list( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -217,12 +204,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: organization = response.parse() assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -232,48 +218,43 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.organizations.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.organizations.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_revoke_users(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_revoke_users_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_revoke_users(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -281,13 +262,12 @@ def test_raw_response_revoke_users(self, client: Cloudflare) -> None: organization = response.parse() assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_revoke_users(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -297,46 +277,42 @@ def test_streaming_response_revoke_users(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_revoke_users(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", account_id="string", - zone_id="", ) class TestAsyncOrganizations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, auto_redirect_to_identity=True, is_ui_read_only=True, @@ -354,14 +330,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -369,14 +344,13 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: organization = await response.parse() assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -386,7 +360,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -394,7 +368,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -402,24 +375,21 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.update( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.update( account_id="string", - zone_id="string", allow_authenticate_via_warp=True, auth_domain="test.cloudflareaccess.com", auto_redirect_to_identity=True, @@ -443,12 +413,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.update( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -456,12 +425,11 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: organization = await response.parse() assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.update( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -471,45 +439,40 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.update( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.update( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.list( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.list( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -517,12 +480,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: organization = await response.parse() assert_matches_type(Optional[Organization], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -532,48 +494,43 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.list( account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.list( account_id="string", - zone_id="", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_revoke_users(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_revoke_users_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_revoke_users(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -581,13 +538,12 @@ async def test_raw_response_revoke_users(self, async_client: AsyncCloudflare) -> organization = await response.parse() assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_revoke_users(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -597,19 +553,17 @@ async def test_streaming_response_revoke_users(self, async_client: AsyncCloudfla assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_revoke_users(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/test_risk_scoring.py b/tests/api_resources/zero_trust/test_risk_scoring.py index 9211f77cafd..7e5ce3f6646 100644 --- a/tests/api_resources/zero_trust/test_risk_scoring.py +++ b/tests/api_resources/zero_trust/test_risk_scoring.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.risk_scoring_get_response import RiskScoringGetResponse -from cloudflare.types.zero_trust.risk_scoring_reset_response import RiskScoringResetResponse +from cloudflare.types.zero_trust import RiskScoringGetResponse, RiskScoringResetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestRiskScoring: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: risk_scoring = client.zero_trust.risk_scoring.get( @@ -27,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: risk_scoring = client.zero_trust.risk_scoring.get( @@ -40,7 +37,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.with_raw_response.get( @@ -53,7 +49,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: risk_scoring = response.parse() assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.with_streaming_response.get( @@ -68,7 +63,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -83,7 +77,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize def test_method_reset(self, client: Cloudflare) -> None: risk_scoring = client.zero_trust.risk_scoring.reset( @@ -92,7 +85,6 @@ def test_method_reset(self, client: Cloudflare) -> None: ) assert_matches_type(RiskScoringResetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_reset(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.with_raw_response.reset( @@ -105,7 +97,6 @@ def test_raw_response_reset(self, client: Cloudflare) -> None: risk_scoring = response.parse() assert_matches_type(RiskScoringResetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_reset(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.with_streaming_response.reset( @@ -120,7 +111,6 @@ def test_streaming_response_reset(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_reset(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -139,7 +129,6 @@ def test_path_params_reset(self, client: Cloudflare) -> None: class TestAsyncRiskScoring: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: risk_scoring = await async_client.zero_trust.risk_scoring.get( @@ -148,7 +137,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: risk_scoring = await async_client.zero_trust.risk_scoring.get( @@ -161,7 +149,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.with_raw_response.get( @@ -174,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: risk_scoring = await response.parse() assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.with_streaming_response.get( @@ -189,7 +175,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -204,7 +189,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - @pytest.mark.skip() @parametrize async def test_method_reset(self, async_client: AsyncCloudflare) -> None: risk_scoring = await async_client.zero_trust.risk_scoring.reset( @@ -213,7 +197,6 @@ async def test_method_reset(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RiskScoringResetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_reset(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.with_raw_response.reset( @@ -226,7 +209,6 @@ async def test_raw_response_reset(self, async_client: AsyncCloudflare) -> None: risk_scoring = await response.parse() assert_matches_type(RiskScoringResetResponse, risk_scoring, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_reset(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.with_streaming_response.reset( @@ -241,7 +223,6 @@ async def test_streaming_response_reset(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_reset(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/test_seats.py b/tests/api_resources/zero_trust/test_seats.py index 224caa6609e..c609d0ab5a2 100644 --- a/tests/api_resources/zero_trust/test_seats.py +++ b/tests/api_resources/zero_trust/test_seats.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.seat_edit_response import SeatEditResponse +from cloudflare.types.zero_trust import SeatEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,7 @@ class TestSeats: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: seat = client.zero_trust.seats.edit( @@ -39,7 +39,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SeatEditResponse], seat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.seats.with_raw_response.edit( @@ -65,7 +65,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: seat = response.parse() assert_matches_type(Optional[SeatEditResponse], seat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.seats.with_streaming_response.edit( @@ -93,7 +93,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -119,7 +119,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncSeats: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: seat = await async_client.zero_trust.seats.edit( @@ -141,7 +141,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SeatEditResponse], seat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.seats.with_raw_response.edit( @@ -167,7 +167,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: seat = await response.parse() assert_matches_type(Optional[SeatEditResponse], seat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.seats.with_streaming_response.edit( @@ -195,7 +195,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/zero_trust/test_tunnels.py b/tests/api_resources/zero_trust/test_tunnels.py index 4a10e8cb8e1..ee77b47c681 100644 --- a/tests/api_resources/zero_trust/test_tunnels.py +++ b/tests/api_resources/zero_trust/test_tunnels.py @@ -11,11 +11,13 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.zero_trust.tunnel_get_response import TunnelGetResponse -from cloudflare.types.zero_trust.tunnel_edit_response import TunnelEditResponse -from cloudflare.types.zero_trust.tunnel_list_response import TunnelListResponse -from cloudflare.types.zero_trust.tunnel_create_response import TunnelCreateResponse -from cloudflare.types.zero_trust.tunnel_delete_response import TunnelDeleteResponse +from cloudflare.types.zero_trust import ( + TunnelGetResponse, + TunnelEditResponse, + TunnelListResponse, + TunnelCreateResponse, + TunnelDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +25,6 @@ class TestTunnels: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.create( @@ -33,7 +34,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.create( @@ -47,7 +47,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: tunnel = response.parse() assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.create( @@ -63,7 +62,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +71,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.list( @@ -81,7 +78,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[TunnelListResponse], tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.list( @@ -100,7 +96,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePaginationArray[TunnelListResponse], tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.list( @@ -112,7 +107,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: tunnel = response.parse() assert_matches_type(SyncV4PagePaginationArray[TunnelListResponse], tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.list( @@ -126,7 +120,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -134,23 +127,19 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -158,13 +147,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: tunnel = response.parse() assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -174,24 +161,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.edit( @@ -200,7 +183,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.edit( @@ -211,7 +193,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.edit( @@ -224,7 +205,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: tunnel = response.parse() assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.edit( @@ -239,7 +219,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -254,7 +233,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.get( @@ -263,7 +241,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.get( @@ -276,7 +253,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tunnel = response.parse() assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.get( @@ -291,7 +267,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -310,7 +285,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTunnels: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.create( @@ -320,7 +294,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.create( @@ -334,7 +307,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: tunnel = await response.parse() assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.create( @@ -350,7 +322,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -360,7 +331,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.list( @@ -368,7 +338,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePaginationArray[TunnelListResponse], tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.list( @@ -387,7 +356,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePaginationArray[TunnelListResponse], tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.list( @@ -399,7 +367,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: tunnel = await response.parse() assert_matches_type(AsyncV4PagePaginationArray[TunnelListResponse], tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.list( @@ -413,7 +380,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -421,23 +387,19 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -445,13 +407,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: tunnel = await response.parse() assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -461,24 +421,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.edit( @@ -487,7 +443,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.edit( @@ -498,7 +453,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.edit( @@ -511,7 +465,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: tunnel = await response.parse() assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.edit( @@ -526,7 +479,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -541,7 +493,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.get( @@ -550,7 +501,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.get( @@ -563,7 +513,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tunnel = await response.parse() assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.get( @@ -578,7 +527,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/tunnels/test_configurations.py b/tests/api_resources/zero_trust/tunnels/test_configurations.py index b79fa1154ca..66e8d63db41 100644 --- a/tests/api_resources/zero_trust/tunnels/test_configurations.py +++ b/tests/api_resources/zero_trust/tunnels/test_configurations.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.tunnels.configuration_get_response import ConfigurationGetResponse -from cloudflare.types.zero_trust.tunnels.configuration_update_response import ConfigurationUpdateResponse +from cloudflare.types.zero_trust.tunnels import ( + ConfigurationGetResponse, + ConfigurationUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestConfigurations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: configuration = client.zero_trust.tunnels.configurations.update( @@ -27,7 +28,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: configuration = client.zero_trust.tunnels.configurations.update( @@ -136,7 +136,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.configurations.with_raw_response.update( @@ -149,7 +148,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: configuration = response.parse() assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.configurations.with_streaming_response.update( @@ -164,7 +162,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -179,7 +176,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: configuration = client.zero_trust.tunnels.configurations.get( @@ -188,7 +184,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.configurations.with_raw_response.get( @@ -201,7 +196,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: configuration = response.parse() assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.configurations.with_streaming_response.get( @@ -216,7 +210,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -235,7 +228,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigurations: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.tunnels.configurations.update( @@ -244,7 +236,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.tunnels.configurations.update( @@ -353,7 +344,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.configurations.with_raw_response.update( @@ -366,7 +356,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: configuration = await response.parse() assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.configurations.with_streaming_response.update( @@ -381,7 +370,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -396,7 +384,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="699d98642c564d2e855e9661899b7252", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.tunnels.configurations.get( @@ -405,7 +392,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.configurations.with_raw_response.get( @@ -418,7 +404,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: configuration = await response.parse() assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.configurations.with_streaming_response.get( @@ -433,7 +418,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/tunnels/test_connections.py b/tests/api_resources/zero_trust/tunnels/test_connections.py index 26310f54f50..fd71588c59b 100644 --- a/tests/api_resources/zero_trust/tunnels/test_connections.py +++ b/tests/api_resources/zero_trust/tunnels/test_connections.py @@ -9,8 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.tunnels.connection_get_response import ConnectionGetResponse -from cloudflare.types.zero_trust.tunnels.connection_delete_response import ConnectionDeleteResponse +from cloudflare.types.zero_trust.tunnels import ConnectionGetResponse, ConnectionDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,23 +17,19 @@ class TestConnections: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: connection = client.zero_trust.tunnels.connections.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(ConnectionDeleteResponse, connection, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.connections.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -42,13 +37,11 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: connection = response.parse() assert_matches_type(ConnectionDeleteResponse, connection, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.connections.with_streaming_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -58,24 +51,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.connections.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.connections.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: connection = client.zero_trust.tunnels.connections.get( @@ -84,7 +73,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ConnectionGetResponse], connection, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.connections.with_raw_response.get( @@ -97,7 +85,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: connection = response.parse() assert_matches_type(Optional[ConnectionGetResponse], connection, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.connections.with_streaming_response.get( @@ -112,7 +99,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -131,23 +117,19 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnections: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: connection = await async_client.zero_trust.tunnels.connections.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert_matches_type(ConnectionDeleteResponse, connection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.connections.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) assert response.is_closed is True @@ -155,13 +137,11 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: connection = await response.parse() assert_matches_type(ConnectionDeleteResponse, connection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.connections.with_streaming_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -171,24 +151,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.connections.with_raw_response.delete( "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", - body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.connections.with_raw_response.delete( "", account_id="699d98642c564d2e855e9661899b7252", - body={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connection = await async_client.zero_trust.tunnels.connections.get( @@ -197,7 +173,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ConnectionGetResponse], connection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.connections.with_raw_response.get( @@ -210,7 +185,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: connection = await response.parse() assert_matches_type(Optional[ConnectionGetResponse], connection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.connections.with_streaming_response.get( @@ -225,7 +199,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/tunnels/test_connectors.py b/tests/api_resources/zero_trust/tunnels/test_connectors.py index d7932897680..ffd3b01b23b 100644 --- a/tests/api_resources/zero_trust/tunnels/test_connectors.py +++ b/tests/api_resources/zero_trust/tunnels/test_connectors.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.tunnels.client import Client +from cloudflare.types.zero_trust.tunnels import Client base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestConnectors: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: connector = client.zero_trust.tunnels.connectors.get( @@ -27,7 +26,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Client, connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.connectors.with_raw_response.get( @@ -41,7 +39,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: connector = response.parse() assert_matches_type(Client, connector, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.connectors.with_streaming_response.get( @@ -57,7 +54,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -85,7 +81,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnectors: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connector = await async_client.zero_trust.tunnels.connectors.get( @@ -95,7 +90,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Client, connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.connectors.with_raw_response.get( @@ -109,7 +103,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: connector = await response.parse() assert_matches_type(Client, connector, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.connectors.with_streaming_response.get( @@ -125,7 +118,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/tunnels/test_management.py b/tests/api_resources/zero_trust/tunnels/test_management.py index 7649ed32b24..7679e42dcb8 100644 --- a/tests/api_resources/zero_trust/tunnels/test_management.py +++ b/tests/api_resources/zero_trust/tunnels/test_management.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.tunnels.management_create_response import ManagementCreateResponse +from cloudflare.types.zero_trust.tunnels import ManagementCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestManagement: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: management = client.zero_trust.tunnels.management.create( @@ -27,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(ManagementCreateResponse, management, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.management.with_raw_response.create( @@ -41,7 +39,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: management = response.parse() assert_matches_type(ManagementCreateResponse, management, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.management.with_streaming_response.create( @@ -57,7 +54,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -78,7 +74,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncManagement: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: management = await async_client.zero_trust.tunnels.management.create( @@ -88,7 +83,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ManagementCreateResponse, management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.management.with_raw_response.create( @@ -102,7 +96,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: management = await response.parse() assert_matches_type(ManagementCreateResponse, management, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.management.with_streaming_response.create( @@ -118,7 +111,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zero_trust/tunnels/test_token.py b/tests/api_resources/zero_trust/tunnels/test_token.py index e9706ef7ec1..4a4ecd88189 100644 --- a/tests/api_resources/zero_trust/tunnels/test_token.py +++ b/tests/api_resources/zero_trust/tunnels/test_token.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.tunnels.token_get_response import TokenGetResponse +from cloudflare.types.zero_trust.tunnels import TokenGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestToken: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: token = client.zero_trust.tunnels.token.get( @@ -26,7 +25,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(TokenGetResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.token.with_raw_response.get( @@ -39,7 +37,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: token = response.parse() assert_matches_type(TokenGetResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.token.with_streaming_response.get( @@ -54,7 +51,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -73,7 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncToken: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: token = await async_client.zero_trust.tunnels.token.get( @@ -82,7 +77,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TokenGetResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.token.with_raw_response.get( @@ -95,7 +89,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: token = await response.parse() assert_matches_type(TokenGetResponse, token, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.token.with_streaming_response.get( @@ -110,7 +103,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_advanced_ddos.py b/tests/api_resources/zones/settings/test_advanced_ddos.py index fc550681946..0a02d5d3923 100644 --- a/tests/api_resources/zones/settings/test_advanced_ddos.py +++ b/tests/api_resources/zones/settings/test_advanced_ddos.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.advanced_ddos import AdvancedDDoS +from cloudflare.types.zones.settings import AdvancedDDoS base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAdvancedDDoS: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: advanced_ddos = client.zones.settings.advanced_ddos.get( @@ -25,7 +24,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.advanced_ddos.with_raw_response.get( @@ -37,7 +35,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: advanced_ddos = response.parse() assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.advanced_ddos.with_streaming_response.get( @@ -51,7 +48,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAdvancedDDoS: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: advanced_ddos = await async_client.zones.settings.advanced_ddos.get( @@ -71,7 +66,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.advanced_ddos.with_raw_response.get( @@ -83,7 +77,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: advanced_ddos = await response.parse() assert_matches_type(Optional[AdvancedDDoS], advanced_ddos, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.advanced_ddos.with_streaming_response.get( @@ -97,7 +90,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_always_online.py b/tests/api_resources/zones/settings/test_always_online.py index 34d3444f3ca..3f2165813c2 100644 --- a/tests/api_resources/zones/settings/test_always_online.py +++ b/tests/api_resources/zones/settings/test_always_online.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.always_online import AlwaysOnline +from cloudflare.types.zones.settings import AlwaysOnline base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAlwaysOnline: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: always_online = client.zones.settings.always_online.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.always_online.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: always_online = response.parse() assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.always_online.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: always_online = client.zones.settings.always_online.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.always_online.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: always_online = response.parse() assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.always_online.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAlwaysOnline: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: always_online = await async_client.zones.settings.always_online.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.always_online.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: always_online = await response.parse() assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.always_online.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: always_online = await async_client.zones.settings.always_online.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.always_online.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: always_online = await response.parse() assert_matches_type(Optional[AlwaysOnline], always_online, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.always_online.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_always_use_https.py b/tests/api_resources/zones/settings/test_always_use_https.py index b62a3d41140..3f800f69e91 100644 --- a/tests/api_resources/zones/settings/test_always_use_https.py +++ b/tests/api_resources/zones/settings/test_always_use_https.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.always_use_https import AlwaysUseHTTPS +from cloudflare.types.zones.settings import AlwaysUseHTTPS base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAlwaysUseHTTPS: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: always_use_https = client.zones.settings.always_use_https.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.always_use_https.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: always_use_https = response.parse() assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.always_use_https.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: always_use_https = client.zones.settings.always_use_https.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.always_use_https.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: always_use_https = response.parse() assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.always_use_https.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAlwaysUseHTTPS: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: always_use_https = await async_client.zones.settings.always_use_https.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.always_use_https.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: always_use_https = await response.parse() assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.always_use_https.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: always_use_https = await async_client.zones.settings.always_use_https.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.always_use_https.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: always_use_https = await response.parse() assert_matches_type(Optional[AlwaysUseHTTPS], always_use_https, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.always_use_https.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_automatic_https_rewrites.py b/tests/api_resources/zones/settings/test_automatic_https_rewrites.py index 7eb774fb8d6..727e05ba67a 100644 --- a/tests/api_resources/zones/settings/test_automatic_https_rewrites.py +++ b/tests/api_resources/zones/settings/test_automatic_https_rewrites.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.automatic_https_rewrites import AutomaticHTTPSRewrites +from cloudflare.types.zones.settings import AutomaticHTTPSRewrites base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestAutomaticHTTPSRewrites: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: automatic_https_rewrite = client.zones.settings.automatic_https_rewrites.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.automatic_https_rewrites.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: automatic_https_rewrite = response.parse() assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.automatic_https_rewrites.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: automatic_https_rewrite = client.zones.settings.automatic_https_rewrites.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.automatic_https_rewrites.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: automatic_https_rewrite = response.parse() assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.automatic_https_rewrites.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAutomaticHTTPSRewrites: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: automatic_https_rewrite = await async_client.zones.settings.automatic_https_rewrites.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.automatic_https_rewrites.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: automatic_https_rewrite = await response.parse() assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.automatic_https_rewrites.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: automatic_https_rewrite = await async_client.zones.settings.automatic_https_rewrites.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.automatic_https_rewrites.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: automatic_https_rewrite = await response.parse() assert_matches_type(Optional[AutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.automatic_https_rewrites.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_automatic_platform_optimization.py b/tests/api_resources/zones/settings/test_automatic_platform_optimization.py index 7249757a4c3..f642c020a35 100644 --- a/tests/api_resources/zones/settings/test_automatic_platform_optimization.py +++ b/tests/api_resources/zones/settings/test_automatic_platform_optimization.py @@ -10,7 +10,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import AutomaticPlatformOptimization -from cloudflare.types.zones.settings.automatic_platform_optimization import AutomaticPlatformOptimization base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestAutomaticPlatformOptimization: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: automatic_platform_optimization = client.zones.settings.automatic_platform_optimization.edit( @@ -34,7 +32,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.automatic_platform_optimization.with_raw_response.edit( @@ -54,7 +51,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: automatic_platform_optimization = response.parse() assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.automatic_platform_optimization.with_streaming_response.edit( @@ -78,7 +74,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -94,7 +89,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: automatic_platform_optimization = client.zones.settings.automatic_platform_optimization.get( @@ -102,7 +96,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.automatic_platform_optimization.with_raw_response.get( @@ -114,7 +107,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: automatic_platform_optimization = response.parse() assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.automatic_platform_optimization.with_streaming_response.get( @@ -130,7 +122,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -142,7 +133,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAutomaticPlatformOptimization: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: automatic_platform_optimization = await async_client.zones.settings.automatic_platform_optimization.edit( @@ -158,7 +148,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.automatic_platform_optimization.with_raw_response.edit( @@ -178,7 +167,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: automatic_platform_optimization = await response.parse() assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.automatic_platform_optimization.with_streaming_response.edit( @@ -202,7 +190,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -218,7 +205,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: automatic_platform_optimization = await async_client.zones.settings.automatic_platform_optimization.get( @@ -226,7 +212,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.automatic_platform_optimization.with_raw_response.get( @@ -238,7 +223,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: automatic_platform_optimization = await response.parse() assert_matches_type(Optional[AutomaticPlatformOptimization], automatic_platform_optimization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.automatic_platform_optimization.with_streaming_response.get( @@ -254,7 +238,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_brotli.py b/tests/api_resources/zones/settings/test_brotli.py index 38e2dec2bd5..692acd2ff7f 100644 --- a/tests/api_resources/zones/settings/test_brotli.py +++ b/tests/api_resources/zones/settings/test_brotli.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.brotli import Brotli +from cloudflare.types.zones.settings import Brotli base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestBrotli: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: brotli = client.zones.settings.brotli.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Brotli], brotli, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.brotli.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: brotli = response.parse() assert_matches_type(Optional[Brotli], brotli, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.brotli.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: brotli = client.zones.settings.brotli.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Brotli], brotli, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.brotli.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: brotli = response.parse() assert_matches_type(Optional[Brotli], brotli, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.brotli.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBrotli: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: brotli = await async_client.zones.settings.brotli.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Brotli], brotli, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.brotli.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: brotli = await response.parse() assert_matches_type(Optional[Brotli], brotli, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.brotli.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: brotli = await async_client.zones.settings.brotli.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Brotli], brotli, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.brotli.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: brotli = await response.parse() assert_matches_type(Optional[Brotli], brotli, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.brotli.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_browser_cache_ttl.py b/tests/api_resources/zones/settings/test_browser_cache_ttl.py index b3cba09de3a..b8bdfd7d4f3 100644 --- a/tests/api_resources/zones/settings/test_browser_cache_ttl.py +++ b/tests/api_resources/zones/settings/test_browser_cache_ttl.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.browser_cache_ttl import BrowserCacheTTL +from cloudflare.types.zones.settings import BrowserCacheTTL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestBrowserCacheTTL: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: browser_cache_ttl = client.zones.settings.browser_cache_ttl.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.browser_cache_ttl.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: browser_cache_ttl = response.parse() assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.browser_cache_ttl.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value=0, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: browser_cache_ttl = client.zones.settings.browser_cache_ttl.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.browser_cache_ttl.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: browser_cache_ttl = response.parse() assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.browser_cache_ttl.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBrowserCacheTTL: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: browser_cache_ttl = await async_client.zones.settings.browser_cache_ttl.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.browser_cache_ttl.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: browser_cache_ttl = await response.parse() assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.browser_cache_ttl.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value=0, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: browser_cache_ttl = await async_client.zones.settings.browser_cache_ttl.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.browser_cache_ttl.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: browser_cache_ttl = await response.parse() assert_matches_type(Optional[BrowserCacheTTL], browser_cache_ttl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.browser_cache_ttl.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_browser_check.py b/tests/api_resources/zones/settings/test_browser_check.py index d15b4289cc0..4f783e9ffb4 100644 --- a/tests/api_resources/zones/settings/test_browser_check.py +++ b/tests/api_resources/zones/settings/test_browser_check.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.browser_check import BrowserCheck +from cloudflare.types.zones.settings import BrowserCheck base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestBrowserCheck: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: browser_check = client.zones.settings.browser_check.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.browser_check.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: browser_check = response.parse() assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.browser_check.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: browser_check = client.zones.settings.browser_check.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.browser_check.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: browser_check = response.parse() assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.browser_check.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBrowserCheck: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: browser_check = await async_client.zones.settings.browser_check.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.browser_check.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: browser_check = await response.parse() assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.browser_check.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: browser_check = await async_client.zones.settings.browser_check.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.browser_check.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: browser_check = await response.parse() assert_matches_type(Optional[BrowserCheck], browser_check, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.browser_check.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_cache_level.py b/tests/api_resources/zones/settings/test_cache_level.py index e5d8076c2f7..e9b5c0b6674 100644 --- a/tests/api_resources/zones/settings/test_cache_level.py +++ b/tests/api_resources/zones/settings/test_cache_level.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.cache_level import CacheLevel +from cloudflare.types.zones.settings import CacheLevel base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestCacheLevel: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: cache_level = client.zones.settings.cache_level.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.cache_level.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: cache_level = response.parse() assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.cache_level.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="aggressive", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: cache_level = client.zones.settings.cache_level.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.cache_level.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: cache_level = response.parse() assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.cache_level.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCacheLevel: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: cache_level = await async_client.zones.settings.cache_level.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.cache_level.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: cache_level = await response.parse() assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.cache_level.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="aggressive", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: cache_level = await async_client.zones.settings.cache_level.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.cache_level.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: cache_level = await response.parse() assert_matches_type(Optional[CacheLevel], cache_level, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.cache_level.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_challenge_ttl.py b/tests/api_resources/zones/settings/test_challenge_ttl.py index 0ce0ad8750f..2a1b284b755 100644 --- a/tests/api_resources/zones/settings/test_challenge_ttl.py +++ b/tests/api_resources/zones/settings/test_challenge_ttl.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.challenge_ttl import ChallengeTTL +from cloudflare.types.zones.settings import ChallengeTTL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestChallengeTTL: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: challenge_ttl = client.zones.settings.challenge_ttl.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.challenge_ttl.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: challenge_ttl = response.parse() assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.challenge_ttl.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value=300, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: challenge_ttl = client.zones.settings.challenge_ttl.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.challenge_ttl.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: challenge_ttl = response.parse() assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.challenge_ttl.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncChallengeTTL: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: challenge_ttl = await async_client.zones.settings.challenge_ttl.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.challenge_ttl.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: challenge_ttl = await response.parse() assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.challenge_ttl.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value=300, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: challenge_ttl = await async_client.zones.settings.challenge_ttl.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.challenge_ttl.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: challenge_ttl = await response.parse() assert_matches_type(Optional[ChallengeTTL], challenge_ttl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.challenge_ttl.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_ciphers.py b/tests/api_resources/zones/settings/test_ciphers.py index 7e309733907..369f2870999 100644 --- a/tests/api_resources/zones/settings/test_ciphers.py +++ b/tests/api_resources/zones/settings/test_ciphers.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.ciphers import Ciphers +from cloudflare.types.zones.settings import Ciphers base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestCiphers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: cipher = client.zones.settings.ciphers.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.ciphers.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: cipher = response.parse() assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.ciphers.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: cipher = client.zones.settings.ciphers.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.ciphers.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: cipher = response.parse() assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.ciphers.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCiphers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: cipher = await async_client.zones.settings.ciphers.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ciphers.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: cipher = await response.parse() assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ciphers.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: cipher = await async_client.zones.settings.ciphers.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ciphers.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: cipher = await response.parse() assert_matches_type(Optional[Ciphers], cipher, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ciphers.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_development_mode.py b/tests/api_resources/zones/settings/test_development_mode.py index dbac3f8bf9b..c0dcd89d40f 100644 --- a/tests/api_resources/zones/settings/test_development_mode.py +++ b/tests/api_resources/zones/settings/test_development_mode.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.development_mode import DevelopmentMode +from cloudflare.types.zones.settings import DevelopmentMode base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestDevelopmentMode: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: development_mode = client.zones.settings.development_mode.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.development_mode.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: development_mode = response.parse() assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.development_mode.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: development_mode = client.zones.settings.development_mode.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.development_mode.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: development_mode = response.parse() assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.development_mode.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDevelopmentMode: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: development_mode = await async_client.zones.settings.development_mode.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.development_mode.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: development_mode = await response.parse() assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.development_mode.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: development_mode = await async_client.zones.settings.development_mode.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.development_mode.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: development_mode = await response.parse() assert_matches_type(Optional[DevelopmentMode], development_mode, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.development_mode.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_early_hints.py b/tests/api_resources/zones/settings/test_early_hints.py index 7991d96c9c8..a7979ce0e77 100644 --- a/tests/api_resources/zones/settings/test_early_hints.py +++ b/tests/api_resources/zones/settings/test_early_hints.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.early_hints import EarlyHints +from cloudflare.types.zones.settings import EarlyHints base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestEarlyHints: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: early_hint = client.zones.settings.early_hints.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.early_hints.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: early_hint = response.parse() assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.early_hints.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: early_hint = client.zones.settings.early_hints.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.early_hints.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: early_hint = response.parse() assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.early_hints.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEarlyHints: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: early_hint = await async_client.zones.settings.early_hints.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.early_hints.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: early_hint = await response.parse() assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.early_hints.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: early_hint = await async_client.zones.settings.early_hints.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.early_hints.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: early_hint = await response.parse() assert_matches_type(Optional[EarlyHints], early_hint, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.early_hints.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_email_obfuscation.py b/tests/api_resources/zones/settings/test_email_obfuscation.py index 386dd32f76d..c9ef6769ae1 100644 --- a/tests/api_resources/zones/settings/test_email_obfuscation.py +++ b/tests/api_resources/zones/settings/test_email_obfuscation.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.email_obfuscation import EmailObfuscation +from cloudflare.types.zones.settings import EmailObfuscation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestEmailObfuscation: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: email_obfuscation = client.zones.settings.email_obfuscation.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.email_obfuscation.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: email_obfuscation = response.parse() assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.email_obfuscation.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: email_obfuscation = client.zones.settings.email_obfuscation.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.email_obfuscation.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: email_obfuscation = response.parse() assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.email_obfuscation.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEmailObfuscation: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: email_obfuscation = await async_client.zones.settings.email_obfuscation.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.email_obfuscation.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: email_obfuscation = await response.parse() assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.email_obfuscation.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: email_obfuscation = await async_client.zones.settings.email_obfuscation.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.email_obfuscation.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: email_obfuscation = await response.parse() assert_matches_type(Optional[EmailObfuscation], email_obfuscation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.email_obfuscation.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_font_settings.py b/tests/api_resources/zones/settings/test_font_settings.py index 4e4a033836a..d80ff7b61db 100644 --- a/tests/api_resources/zones/settings/test_font_settings.py +++ b/tests/api_resources/zones/settings/test_font_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.font_settings import FontSettings +from cloudflare.types.zones.settings import FontSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestFontSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: font_setting = client.zones.settings.font_settings.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.font_settings.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: font_setting = response.parse() assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.font_settings.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: font_setting = client.zones.settings.font_settings.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.font_settings.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: font_setting = response.parse() assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.font_settings.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFontSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: font_setting = await async_client.zones.settings.font_settings.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.font_settings.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: font_setting = await response.parse() assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.font_settings.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: font_setting = await async_client.zones.settings.font_settings.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.font_settings.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: font_setting = await response.parse() assert_matches_type(Optional[FontSettings], font_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.font_settings.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_h2_prioritization.py b/tests/api_resources/zones/settings/test_h2_prioritization.py index cbd4afc631b..2500447e342 100644 --- a/tests/api_resources/zones/settings/test_h2_prioritization.py +++ b/tests/api_resources/zones/settings/test_h2_prioritization.py @@ -10,7 +10,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import H2Prioritization -from cloudflare.types.zones.settings.h2_prioritization import H2Prioritization base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestH2Prioritization: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: h2_prioritization = client.zones.settings.h2_prioritization.edit( @@ -30,7 +28,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: h2_prioritization = client.zones.settings.h2_prioritization.edit( @@ -42,7 +39,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.h2_prioritization.with_raw_response.edit( @@ -58,7 +54,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: h2_prioritization = response.parse() assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.h2_prioritization.with_streaming_response.edit( @@ -76,7 +71,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -88,7 +82,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: h2_prioritization = client.zones.settings.h2_prioritization.get( @@ -96,7 +89,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.h2_prioritization.with_raw_response.get( @@ -108,7 +100,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: h2_prioritization = response.parse() assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.h2_prioritization.with_streaming_response.get( @@ -122,7 +113,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -134,7 +124,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncH2Prioritization: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: h2_prioritization = await async_client.zones.settings.h2_prioritization.edit( @@ -146,7 +135,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: h2_prioritization = await async_client.zones.settings.h2_prioritization.edit( @@ -158,7 +146,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.h2_prioritization.with_raw_response.edit( @@ -174,7 +161,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: h2_prioritization = await response.parse() assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.h2_prioritization.with_streaming_response.edit( @@ -192,7 +178,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -204,7 +189,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: h2_prioritization = await async_client.zones.settings.h2_prioritization.get( @@ -212,7 +196,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.h2_prioritization.with_raw_response.get( @@ -224,7 +207,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: h2_prioritization = await response.parse() assert_matches_type(Optional[H2Prioritization], h2_prioritization, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.h2_prioritization.with_streaming_response.get( @@ -238,7 +220,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_hotlink_protection.py b/tests/api_resources/zones/settings/test_hotlink_protection.py index 369e33ef10a..8c077ae9b8f 100644 --- a/tests/api_resources/zones/settings/test_hotlink_protection.py +++ b/tests/api_resources/zones/settings/test_hotlink_protection.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.hotlink_protection import HotlinkProtection +from cloudflare.types.zones.settings import HotlinkProtection base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestHotlinkProtection: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: hotlink_protection = client.zones.settings.hotlink_protection.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.hotlink_protection.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: hotlink_protection = response.parse() assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.hotlink_protection.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: hotlink_protection = client.zones.settings.hotlink_protection.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.hotlink_protection.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: hotlink_protection = response.parse() assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.hotlink_protection.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHotlinkProtection: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: hotlink_protection = await async_client.zones.settings.hotlink_protection.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.hotlink_protection.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: hotlink_protection = await response.parse() assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.hotlink_protection.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: hotlink_protection = await async_client.zones.settings.hotlink_protection.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.hotlink_protection.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: hotlink_protection = await response.parse() assert_matches_type(Optional[HotlinkProtection], hotlink_protection, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.hotlink_protection.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_http2.py b/tests/api_resources/zones/settings/test_http2.py index fad9257b0bd..26aa47b9428 100644 --- a/tests/api_resources/zones/settings/test_http2.py +++ b/tests/api_resources/zones/settings/test_http2.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.http2 import HTTP2 +from cloudflare.types.zones.settings import HTTP2 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestHTTP2: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: http2 = client.zones.settings.http2.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[HTTP2], http2, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.http2.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: http2 = response.parse() assert_matches_type(Optional[HTTP2], http2, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.http2.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: http2 = client.zones.settings.http2.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[HTTP2], http2, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.http2.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: http2 = response.parse() assert_matches_type(Optional[HTTP2], http2, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.http2.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHTTP2: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: http2 = await async_client.zones.settings.http2.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[HTTP2], http2, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.http2.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: http2 = await response.parse() assert_matches_type(Optional[HTTP2], http2, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.http2.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http2 = await async_client.zones.settings.http2.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[HTTP2], http2, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.http2.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: http2 = await response.parse() assert_matches_type(Optional[HTTP2], http2, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.http2.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_http3.py b/tests/api_resources/zones/settings/test_http3.py index 639bb0bbc20..e30a60a4181 100644 --- a/tests/api_resources/zones/settings/test_http3.py +++ b/tests/api_resources/zones/settings/test_http3.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.http3 import HTTP3 +from cloudflare.types.zones.settings import HTTP3 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestHTTP3: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: http3 = client.zones.settings.http3.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[HTTP3], http3, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.http3.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: http3 = response.parse() assert_matches_type(Optional[HTTP3], http3, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.http3.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: http3 = client.zones.settings.http3.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[HTTP3], http3, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.http3.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: http3 = response.parse() assert_matches_type(Optional[HTTP3], http3, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.http3.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHTTP3: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: http3 = await async_client.zones.settings.http3.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[HTTP3], http3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.http3.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: http3 = await response.parse() assert_matches_type(Optional[HTTP3], http3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.http3.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http3 = await async_client.zones.settings.http3.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[HTTP3], http3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.http3.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: http3 = await response.parse() assert_matches_type(Optional[HTTP3], http3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.http3.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_image_resizing.py b/tests/api_resources/zones/settings/test_image_resizing.py index ff978b988a8..6d81d767869 100644 --- a/tests/api_resources/zones/settings/test_image_resizing.py +++ b/tests/api_resources/zones/settings/test_image_resizing.py @@ -10,7 +10,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import ImageResizing -from cloudflare.types.zones.settings.image_resizing import ImageResizing base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestImageResizing: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: image_resizing = client.zones.settings.image_resizing.edit( @@ -30,7 +28,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: image_resizing = client.zones.settings.image_resizing.edit( @@ -42,7 +39,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.image_resizing.with_raw_response.edit( @@ -58,7 +54,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: image_resizing = response.parse() assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.image_resizing.with_streaming_response.edit( @@ -76,7 +71,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -88,7 +82,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: image_resizing = client.zones.settings.image_resizing.get( @@ -96,7 +89,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.image_resizing.with_raw_response.get( @@ -108,7 +100,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: image_resizing = response.parse() assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.image_resizing.with_streaming_response.get( @@ -122,7 +113,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -134,7 +124,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncImageResizing: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: image_resizing = await async_client.zones.settings.image_resizing.edit( @@ -146,7 +135,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: image_resizing = await async_client.zones.settings.image_resizing.edit( @@ -158,7 +146,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.image_resizing.with_raw_response.edit( @@ -174,7 +161,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: image_resizing = await response.parse() assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.image_resizing.with_streaming_response.edit( @@ -192,7 +178,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -204,7 +189,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: image_resizing = await async_client.zones.settings.image_resizing.get( @@ -212,7 +196,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.image_resizing.with_raw_response.get( @@ -224,7 +207,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: image_resizing = await response.parse() assert_matches_type(Optional[ImageResizing], image_resizing, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.image_resizing.with_streaming_response.get( @@ -238,7 +220,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_ip_geolocation.py b/tests/api_resources/zones/settings/test_ip_geolocation.py index ecd99d6945b..20ff1c44111 100644 --- a/tests/api_resources/zones/settings/test_ip_geolocation.py +++ b/tests/api_resources/zones/settings/test_ip_geolocation.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.ip_geolocation import IPGeolocation +from cloudflare.types.zones.settings import IPGeolocation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestIPGeolocation: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: ip_geolocation = client.zones.settings.ip_geolocation.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.ip_geolocation.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: ip_geolocation = response.parse() assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.ip_geolocation.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ip_geolocation = client.zones.settings.ip_geolocation.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.ip_geolocation.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ip_geolocation = response.parse() assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.ip_geolocation.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPGeolocation: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ip_geolocation = await async_client.zones.settings.ip_geolocation.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ip_geolocation.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: ip_geolocation = await response.parse() assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ip_geolocation.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip_geolocation = await async_client.zones.settings.ip_geolocation.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ip_geolocation.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ip_geolocation = await response.parse() assert_matches_type(Optional[IPGeolocation], ip_geolocation, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ip_geolocation.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_ipv6.py b/tests/api_resources/zones/settings/test_ipv6.py index 21f94f4fad4..f2733ddfc77 100644 --- a/tests/api_resources/zones/settings/test_ipv6.py +++ b/tests/api_resources/zones/settings/test_ipv6.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.ipv6 import IPV6 +from cloudflare.types.zones.settings import IPV6 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestIPV6: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: ipv6 = client.zones.settings.ipv6.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.ipv6.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: ipv6 = response.parse() assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.ipv6.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ipv6 = client.zones.settings.ipv6.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.ipv6.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ipv6 = response.parse() assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.ipv6.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPV6: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ipv6 = await async_client.zones.settings.ipv6.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ipv6.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: ipv6 = await response.parse() assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ipv6.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ipv6 = await async_client.zones.settings.ipv6.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ipv6.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ipv6 = await response.parse() assert_matches_type(Optional[IPV6], ipv6, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ipv6.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_min_tls_version.py b/tests/api_resources/zones/settings/test_min_tls_version.py index ba6a0078318..043a46e0660 100644 --- a/tests/api_resources/zones/settings/test_min_tls_version.py +++ b/tests/api_resources/zones/settings/test_min_tls_version.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.min_tls_version import MinTLSVersion +from cloudflare.types.zones.settings import MinTLSVersion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestMinTLSVersion: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: min_tls_version = client.zones.settings.min_tls_version.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.min_tls_version.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: min_tls_version = response.parse() assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.min_tls_version.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="1.0", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: min_tls_version = client.zones.settings.min_tls_version.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.min_tls_version.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: min_tls_version = response.parse() assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.min_tls_version.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMinTLSVersion: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: min_tls_version = await async_client.zones.settings.min_tls_version.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.min_tls_version.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: min_tls_version = await response.parse() assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.min_tls_version.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="1.0", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: min_tls_version = await async_client.zones.settings.min_tls_version.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.min_tls_version.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: min_tls_version = await response.parse() assert_matches_type(Optional[MinTLSVersion], min_tls_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.min_tls_version.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_minify.py b/tests/api_resources/zones/settings/test_minify.py index e32be9f8a1d..fc2feb6e152 100644 --- a/tests/api_resources/zones/settings/test_minify.py +++ b/tests/api_resources/zones/settings/test_minify.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.minify import Minify +from cloudflare.types.zones.settings import Minify base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestMinify: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: minify = client.zones.settings.minify.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: minify = client.zones.settings.minify.edit( @@ -39,7 +37,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.minify.with_raw_response.edit( @@ -52,7 +49,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: minify = response.parse() assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.minify.with_streaming_response.edit( @@ -67,7 +63,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -76,7 +71,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: minify = client.zones.settings.minify.get( @@ -84,7 +78,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.minify.with_raw_response.get( @@ -96,7 +89,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: minify = response.parse() assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.minify.with_streaming_response.get( @@ -110,7 +102,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -122,7 +113,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMinify: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: minify = await async_client.zones.settings.minify.edit( @@ -131,7 +121,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: minify = await async_client.zones.settings.minify.edit( @@ -144,7 +133,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.minify.with_raw_response.edit( @@ -157,7 +145,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: minify = await response.parse() assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.minify.with_streaming_response.edit( @@ -172,7 +159,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -181,7 +167,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: minify = await async_client.zones.settings.minify.get( @@ -189,7 +174,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.minify.with_raw_response.get( @@ -201,7 +185,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: minify = await response.parse() assert_matches_type(Optional[Minify], minify, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.minify.with_streaming_response.get( @@ -215,7 +198,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_mirage.py b/tests/api_resources/zones/settings/test_mirage.py index df7e84f8584..57f995c5ca0 100644 --- a/tests/api_resources/zones/settings/test_mirage.py +++ b/tests/api_resources/zones/settings/test_mirage.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.mirage import Mirage +from cloudflare.types.zones.settings import Mirage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestMirage: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: mirage = client.zones.settings.mirage.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Mirage], mirage, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.mirage.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: mirage = response.parse() assert_matches_type(Optional[Mirage], mirage, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.mirage.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: mirage = client.zones.settings.mirage.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Mirage], mirage, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.mirage.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: mirage = response.parse() assert_matches_type(Optional[Mirage], mirage, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.mirage.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMirage: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: mirage = await async_client.zones.settings.mirage.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Mirage], mirage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.mirage.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: mirage = await response.parse() assert_matches_type(Optional[Mirage], mirage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.mirage.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: mirage = await async_client.zones.settings.mirage.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Mirage], mirage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.mirage.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: mirage = await response.parse() assert_matches_type(Optional[Mirage], mirage, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.mirage.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_mobile_redirect.py b/tests/api_resources/zones/settings/test_mobile_redirect.py index 5fd6a2731c5..b405bcd0582 100644 --- a/tests/api_resources/zones/settings/test_mobile_redirect.py +++ b/tests/api_resources/zones/settings/test_mobile_redirect.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.mobile_redirect import MobileRedirect +from cloudflare.types.zones.settings import MobileRedirect base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestMobileRedirect: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: mobile_redirect = client.zones.settings.mobile_redirect.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: mobile_redirect = client.zones.settings.mobile_redirect.edit( @@ -39,7 +37,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.mobile_redirect.with_raw_response.edit( @@ -52,7 +49,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: mobile_redirect = response.parse() assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.mobile_redirect.with_streaming_response.edit( @@ -67,7 +63,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -76,7 +71,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: mobile_redirect = client.zones.settings.mobile_redirect.get( @@ -84,7 +78,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.mobile_redirect.with_raw_response.get( @@ -96,7 +89,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: mobile_redirect = response.parse() assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.mobile_redirect.with_streaming_response.get( @@ -110,7 +102,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -122,7 +113,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMobileRedirect: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: mobile_redirect = await async_client.zones.settings.mobile_redirect.edit( @@ -131,7 +121,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: mobile_redirect = await async_client.zones.settings.mobile_redirect.edit( @@ -144,7 +133,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.mobile_redirect.with_raw_response.edit( @@ -157,7 +145,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: mobile_redirect = await response.parse() assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.mobile_redirect.with_streaming_response.edit( @@ -172,7 +159,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -181,7 +167,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: mobile_redirect = await async_client.zones.settings.mobile_redirect.get( @@ -189,7 +174,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.mobile_redirect.with_raw_response.get( @@ -201,7 +185,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: mobile_redirect = await response.parse() assert_matches_type(Optional[MobileRedirect], mobile_redirect, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.mobile_redirect.with_streaming_response.get( @@ -215,7 +198,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_nel.py b/tests/api_resources/zones/settings/test_nel.py index 5879cf8888c..e0e5f831a8f 100644 --- a/tests/api_resources/zones/settings/test_nel.py +++ b/tests/api_resources/zones/settings/test_nel.py @@ -10,7 +10,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import NEL -from cloudflare.types.zones.settings.nel import NEL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestNEL: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: nel = client.zones.settings.nel.edit( @@ -30,7 +28,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: nel = client.zones.settings.nel.edit( @@ -42,7 +39,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.nel.with_raw_response.edit( @@ -58,7 +54,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: nel = response.parse() assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.nel.with_streaming_response.edit( @@ -76,7 +71,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -88,7 +82,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: nel = client.zones.settings.nel.get( @@ -96,7 +89,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.nel.with_raw_response.get( @@ -108,7 +100,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: nel = response.parse() assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.nel.with_streaming_response.get( @@ -122,7 +113,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -134,7 +124,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNEL: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: nel = await async_client.zones.settings.nel.edit( @@ -146,7 +135,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: nel = await async_client.zones.settings.nel.edit( @@ -158,7 +146,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.nel.with_raw_response.edit( @@ -174,7 +161,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: nel = await response.parse() assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.nel.with_streaming_response.edit( @@ -192,7 +178,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -204,7 +189,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: nel = await async_client.zones.settings.nel.get( @@ -212,7 +196,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.nel.with_raw_response.get( @@ -224,7 +207,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: nel = await response.parse() assert_matches_type(Optional[NEL], nel, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.nel.with_streaming_response.get( @@ -238,7 +220,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_opportunistic_encryption.py b/tests/api_resources/zones/settings/test_opportunistic_encryption.py index ea85bed6d1b..41f4ff13934 100644 --- a/tests/api_resources/zones/settings/test_opportunistic_encryption.py +++ b/tests/api_resources/zones/settings/test_opportunistic_encryption.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.opportunistic_encryption import OpportunisticEncryption +from cloudflare.types.zones.settings import OpportunisticEncryption base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestOpportunisticEncryption: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: opportunistic_encryption = client.zones.settings.opportunistic_encryption.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.opportunistic_encryption.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: opportunistic_encryption = response.parse() assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.opportunistic_encryption.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: opportunistic_encryption = client.zones.settings.opportunistic_encryption.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.opportunistic_encryption.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: opportunistic_encryption = response.parse() assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.opportunistic_encryption.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOpportunisticEncryption: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: opportunistic_encryption = await async_client.zones.settings.opportunistic_encryption.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.opportunistic_encryption.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: opportunistic_encryption = await response.parse() assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.opportunistic_encryption.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: opportunistic_encryption = await async_client.zones.settings.opportunistic_encryption.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.opportunistic_encryption.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: opportunistic_encryption = await response.parse() assert_matches_type(Optional[OpportunisticEncryption], opportunistic_encryption, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.opportunistic_encryption.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_opportunistic_onion.py b/tests/api_resources/zones/settings/test_opportunistic_onion.py index 2f5e4d340e4..726c7245b59 100644 --- a/tests/api_resources/zones/settings/test_opportunistic_onion.py +++ b/tests/api_resources/zones/settings/test_opportunistic_onion.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.opportunistic_onion import OpportunisticOnion +from cloudflare.types.zones.settings import OpportunisticOnion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestOpportunisticOnion: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: opportunistic_onion = client.zones.settings.opportunistic_onion.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.opportunistic_onion.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: opportunistic_onion = response.parse() assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.opportunistic_onion.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: opportunistic_onion = client.zones.settings.opportunistic_onion.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.opportunistic_onion.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: opportunistic_onion = response.parse() assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.opportunistic_onion.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOpportunisticOnion: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: opportunistic_onion = await async_client.zones.settings.opportunistic_onion.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.opportunistic_onion.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: opportunistic_onion = await response.parse() assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.opportunistic_onion.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: opportunistic_onion = await async_client.zones.settings.opportunistic_onion.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.opportunistic_onion.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: opportunistic_onion = await response.parse() assert_matches_type(Optional[OpportunisticOnion], opportunistic_onion, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.opportunistic_onion.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_orange_to_orange.py b/tests/api_resources/zones/settings/test_orange_to_orange.py index 77f1b6c0d07..c96a6653f98 100644 --- a/tests/api_resources/zones/settings/test_orange_to_orange.py +++ b/tests/api_resources/zones/settings/test_orange_to_orange.py @@ -10,7 +10,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import OrangeToOrange -from cloudflare.types.zones.settings.orange_to_orange import OrangeToOrange base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestOrangeToOrange: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: orange_to_orange = client.zones.settings.orange_to_orange.edit( @@ -30,7 +28,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: orange_to_orange = client.zones.settings.orange_to_orange.edit( @@ -42,7 +39,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.orange_to_orange.with_raw_response.edit( @@ -58,7 +54,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: orange_to_orange = response.parse() assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.orange_to_orange.with_streaming_response.edit( @@ -76,7 +71,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -88,7 +82,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: orange_to_orange = client.zones.settings.orange_to_orange.get( @@ -96,7 +89,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.orange_to_orange.with_raw_response.get( @@ -108,7 +100,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: orange_to_orange = response.parse() assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.orange_to_orange.with_streaming_response.get( @@ -122,7 +113,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -134,7 +124,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOrangeToOrange: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: orange_to_orange = await async_client.zones.settings.orange_to_orange.edit( @@ -146,7 +135,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: orange_to_orange = await async_client.zones.settings.orange_to_orange.edit( @@ -158,7 +146,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.orange_to_orange.with_raw_response.edit( @@ -174,7 +161,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: orange_to_orange = await response.parse() assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.orange_to_orange.with_streaming_response.edit( @@ -192,7 +178,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -204,7 +189,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: orange_to_orange = await async_client.zones.settings.orange_to_orange.get( @@ -212,7 +196,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.orange_to_orange.with_raw_response.get( @@ -224,7 +207,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: orange_to_orange = await response.parse() assert_matches_type(Optional[OrangeToOrange], orange_to_orange, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.orange_to_orange.with_streaming_response.get( @@ -238,7 +220,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py b/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py index 5bd6bdfeabd..2b239031bc4 100644 --- a/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py +++ b/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.origin_error_page_pass_thru import OriginErrorPagePassThru +from cloudflare.types.zones.settings import OriginErrorPagePassThru base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestOriginErrorPagePassThru: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: origin_error_page_pass_thru = client.zones.settings.origin_error_page_pass_thru.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.origin_error_page_pass_thru.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: origin_error_page_pass_thru = response.parse() assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.origin_error_page_pass_thru.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: origin_error_page_pass_thru = client.zones.settings.origin_error_page_pass_thru.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.origin_error_page_pass_thru.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: origin_error_page_pass_thru = response.parse() assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.origin_error_page_pass_thru.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginErrorPagePassThru: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: origin_error_page_pass_thru = await async_client.zones.settings.origin_error_page_pass_thru.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.origin_error_page_pass_thru.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: origin_error_page_pass_thru = await response.parse() assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.origin_error_page_pass_thru.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: origin_error_page_pass_thru = await async_client.zones.settings.origin_error_page_pass_thru.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.origin_error_page_pass_thru.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: origin_error_page_pass_thru = await response.parse() assert_matches_type(Optional[OriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.origin_error_page_pass_thru.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_origin_max_http_version.py b/tests/api_resources/zones/settings/test_origin_max_http_version.py index 39ddb11a280..d8f14784104 100644 --- a/tests/api_resources/zones/settings/test_origin_max_http_version.py +++ b/tests/api_resources/zones/settings/test_origin_max_http_version.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.origin_max_http_version_get_response import OriginMaxHTTPVersionGetResponse -from cloudflare.types.zones.settings.origin_max_http_version_edit_response import OriginMaxHTTPVersionEditResponse +from cloudflare.types.zones.settings import ( + OriginMaxHTTPVersionGetResponse, + OriginMaxHTTPVersionEditResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestOriginMaxHTTPVersion: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: origin_max_http_version = client.zones.settings.origin_max_http_version.edit( @@ -27,7 +28,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.origin_max_http_version.with_raw_response.edit( @@ -40,7 +40,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: origin_max_http_version = response.parse() assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.origin_max_http_version.with_streaming_response.edit( @@ -55,7 +54,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -64,7 +62,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="2", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: origin_max_http_version = client.zones.settings.origin_max_http_version.get( @@ -72,7 +69,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.origin_max_http_version.with_raw_response.get( @@ -84,7 +80,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: origin_max_http_version = response.parse() assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.origin_max_http_version.with_streaming_response.get( @@ -98,7 +93,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -110,7 +104,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginMaxHTTPVersion: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: origin_max_http_version = await async_client.zones.settings.origin_max_http_version.edit( @@ -119,7 +112,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.origin_max_http_version.with_raw_response.edit( @@ -132,7 +124,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: origin_max_http_version = await response.parse() assert_matches_type(OriginMaxHTTPVersionEditResponse, origin_max_http_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.origin_max_http_version.with_streaming_response.edit( @@ -147,7 +138,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -156,7 +146,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="2", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: origin_max_http_version = await async_client.zones.settings.origin_max_http_version.get( @@ -164,7 +153,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.origin_max_http_version.with_raw_response.get( @@ -176,7 +164,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: origin_max_http_version = await response.parse() assert_matches_type(OriginMaxHTTPVersionGetResponse, origin_max_http_version, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.origin_max_http_version.with_streaming_response.get( @@ -190,7 +177,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_polish.py b/tests/api_resources/zones/settings/test_polish.py index f540a03c5ee..8b465821171 100644 --- a/tests/api_resources/zones/settings/test_polish.py +++ b/tests/api_resources/zones/settings/test_polish.py @@ -10,7 +10,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import Polish -from cloudflare.types.zones.settings.polish import Polish base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestPolish: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: polish = client.zones.settings.polish.edit( @@ -30,7 +28,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: polish = client.zones.settings.polish.edit( @@ -42,7 +39,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.polish.with_raw_response.edit( @@ -58,7 +54,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: polish = response.parse() assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.polish.with_streaming_response.edit( @@ -76,7 +71,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -88,7 +82,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: polish = client.zones.settings.polish.get( @@ -96,7 +89,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.polish.with_raw_response.get( @@ -108,7 +100,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: polish = response.parse() assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.polish.with_streaming_response.get( @@ -122,7 +113,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -134,7 +124,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolish: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: polish = await async_client.zones.settings.polish.edit( @@ -146,7 +135,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: polish = await async_client.zones.settings.polish.edit( @@ -158,7 +146,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.polish.with_raw_response.edit( @@ -174,7 +161,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: polish = await response.parse() assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.polish.with_streaming_response.edit( @@ -192,7 +178,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -204,7 +189,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: polish = await async_client.zones.settings.polish.get( @@ -212,7 +196,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.polish.with_raw_response.get( @@ -224,7 +207,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: polish = await response.parse() assert_matches_type(Optional[Polish], polish, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.polish.with_streaming_response.get( @@ -238,7 +220,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_prefetch_preload.py b/tests/api_resources/zones/settings/test_prefetch_preload.py index 89d23f4f328..274077451cc 100644 --- a/tests/api_resources/zones/settings/test_prefetch_preload.py +++ b/tests/api_resources/zones/settings/test_prefetch_preload.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.prefetch_preload import PrefetchPreload +from cloudflare.types.zones.settings import PrefetchPreload base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestPrefetchPreload: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: prefetch_preload = client.zones.settings.prefetch_preload.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.prefetch_preload.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: prefetch_preload = response.parse() assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.prefetch_preload.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: prefetch_preload = client.zones.settings.prefetch_preload.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.prefetch_preload.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: prefetch_preload = response.parse() assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.prefetch_preload.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPrefetchPreload: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: prefetch_preload = await async_client.zones.settings.prefetch_preload.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.prefetch_preload.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: prefetch_preload = await response.parse() assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.prefetch_preload.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: prefetch_preload = await async_client.zones.settings.prefetch_preload.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.prefetch_preload.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: prefetch_preload = await response.parse() assert_matches_type(Optional[PrefetchPreload], prefetch_preload, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.prefetch_preload.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_proxy_read_timeout.py b/tests/api_resources/zones/settings/test_proxy_read_timeout.py index 88ccb6cfeac..0d77c45109d 100644 --- a/tests/api_resources/zones/settings/test_proxy_read_timeout.py +++ b/tests/api_resources/zones/settings/test_proxy_read_timeout.py @@ -10,7 +10,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import ProxyReadTimeout -from cloudflare.types.zones.settings.proxy_read_timeout import ProxyReadTimeout base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestProxyReadTimeout: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: proxy_read_timeout = client.zones.settings.proxy_read_timeout.edit( @@ -30,7 +28,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: proxy_read_timeout = client.zones.settings.proxy_read_timeout.edit( @@ -42,7 +39,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.proxy_read_timeout.with_raw_response.edit( @@ -58,7 +54,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: proxy_read_timeout = response.parse() assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.proxy_read_timeout.with_streaming_response.edit( @@ -76,7 +71,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -88,7 +82,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: proxy_read_timeout = client.zones.settings.proxy_read_timeout.get( @@ -96,7 +89,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.proxy_read_timeout.with_raw_response.get( @@ -108,7 +100,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: proxy_read_timeout = response.parse() assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.proxy_read_timeout.with_streaming_response.get( @@ -122,7 +113,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -134,7 +124,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncProxyReadTimeout: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: proxy_read_timeout = await async_client.zones.settings.proxy_read_timeout.edit( @@ -146,7 +135,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: proxy_read_timeout = await async_client.zones.settings.proxy_read_timeout.edit( @@ -158,7 +146,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.proxy_read_timeout.with_raw_response.edit( @@ -174,7 +161,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: proxy_read_timeout = await response.parse() assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.proxy_read_timeout.with_streaming_response.edit( @@ -192,7 +178,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -204,7 +189,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: proxy_read_timeout = await async_client.zones.settings.proxy_read_timeout.get( @@ -212,7 +196,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.proxy_read_timeout.with_raw_response.get( @@ -224,7 +207,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: proxy_read_timeout = await response.parse() assert_matches_type(Optional[ProxyReadTimeout], proxy_read_timeout, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.proxy_read_timeout.with_streaming_response.get( @@ -238,7 +220,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_pseudo_ipv4.py b/tests/api_resources/zones/settings/test_pseudo_ipv4.py index 3877f9edf90..cec2b5def7d 100644 --- a/tests/api_resources/zones/settings/test_pseudo_ipv4.py +++ b/tests/api_resources/zones/settings/test_pseudo_ipv4.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.pseudo_ipv4 import PseudoIPV4 +from cloudflare.types.zones.settings import PseudoIPV4 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestPseudoIPV4: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: pseudo_ipv4 = client.zones.settings.pseudo_ipv4.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.pseudo_ipv4.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: pseudo_ipv4 = response.parse() assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.pseudo_ipv4.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: pseudo_ipv4 = client.zones.settings.pseudo_ipv4.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.pseudo_ipv4.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: pseudo_ipv4 = response.parse() assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.pseudo_ipv4.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPseudoIPV4: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: pseudo_ipv4 = await async_client.zones.settings.pseudo_ipv4.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.pseudo_ipv4.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: pseudo_ipv4 = await response.parse() assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.pseudo_ipv4.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: pseudo_ipv4 = await async_client.zones.settings.pseudo_ipv4.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.pseudo_ipv4.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: pseudo_ipv4 = await response.parse() assert_matches_type(Optional[PseudoIPV4], pseudo_ipv4, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.pseudo_ipv4.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_response_buffering.py b/tests/api_resources/zones/settings/test_response_buffering.py index 254e8ae809e..9fd7a863594 100644 --- a/tests/api_resources/zones/settings/test_response_buffering.py +++ b/tests/api_resources/zones/settings/test_response_buffering.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.response_buffering import ResponseBuffering +from cloudflare.types.zones.settings import ResponseBuffering base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestResponseBuffering: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: response_buffering = client.zones.settings.response_buffering.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.response_buffering.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: response_buffering = response.parse() assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.response_buffering.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: response_buffering = client.zones.settings.response_buffering.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.response_buffering.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: response_buffering = response.parse() assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.response_buffering.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResponseBuffering: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: response_buffering = await async_client.zones.settings.response_buffering.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.response_buffering.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response_buffering = await response.parse() assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.response_buffering.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: response_buffering = await async_client.zones.settings.response_buffering.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.response_buffering.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response_buffering = await response.parse() assert_matches_type(Optional[ResponseBuffering], response_buffering, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.response_buffering.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_rocket_loader.py b/tests/api_resources/zones/settings/test_rocket_loader.py index ea7f19e20dc..1cf85e80da2 100644 --- a/tests/api_resources/zones/settings/test_rocket_loader.py +++ b/tests/api_resources/zones/settings/test_rocket_loader.py @@ -10,7 +10,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import RocketLoader -from cloudflare.types.zones.settings.rocket_loader import RocketLoader base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestRocketLoader: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: rocket_loader = client.zones.settings.rocket_loader.edit( @@ -30,7 +28,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: rocket_loader = client.zones.settings.rocket_loader.edit( @@ -42,7 +39,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.rocket_loader.with_raw_response.edit( @@ -58,7 +54,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: rocket_loader = response.parse() assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.rocket_loader.with_streaming_response.edit( @@ -76,7 +71,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -88,7 +82,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: rocket_loader = client.zones.settings.rocket_loader.get( @@ -96,7 +89,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.rocket_loader.with_raw_response.get( @@ -108,7 +100,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: rocket_loader = response.parse() assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.rocket_loader.with_streaming_response.get( @@ -122,7 +113,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -134,7 +124,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRocketLoader: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rocket_loader = await async_client.zones.settings.rocket_loader.edit( @@ -146,7 +135,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: rocket_loader = await async_client.zones.settings.rocket_loader.edit( @@ -158,7 +146,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.rocket_loader.with_raw_response.edit( @@ -174,7 +161,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: rocket_loader = await response.parse() assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.rocket_loader.with_streaming_response.edit( @@ -192,7 +178,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -204,7 +189,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: }, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rocket_loader = await async_client.zones.settings.rocket_loader.get( @@ -212,7 +196,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.rocket_loader.with_raw_response.get( @@ -224,7 +207,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: rocket_loader = await response.parse() assert_matches_type(Optional[RocketLoader], rocket_loader, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.rocket_loader.with_streaming_response.get( @@ -238,7 +220,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_security_headers.py b/tests/api_resources/zones/settings/test_security_headers.py index 301408e2228..c6b2a4ca32d 100644 --- a/tests/api_resources/zones/settings/test_security_headers.py +++ b/tests/api_resources/zones/settings/test_security_headers.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.security_headers import SecurityHeaders +from cloudflare.types.zones.settings import SecurityHeaders base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSecurityHeaders: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: security_header = client.zones.settings.security_headers.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: security_header = client.zones.settings.security_headers.edit( @@ -42,7 +40,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.security_headers.with_raw_response.edit( @@ -55,7 +52,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: security_header = response.parse() assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.security_headers.with_streaming_response.edit( @@ -70,7 +66,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -79,7 +74,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: security_header = client.zones.settings.security_headers.get( @@ -87,7 +81,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.security_headers.with_raw_response.get( @@ -99,7 +92,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: security_header = response.parse() assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.security_headers.with_streaming_response.get( @@ -113,7 +105,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -125,7 +116,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecurityHeaders: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: security_header = await async_client.zones.settings.security_headers.edit( @@ -134,7 +124,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: security_header = await async_client.zones.settings.security_headers.edit( @@ -150,7 +139,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.security_headers.with_raw_response.edit( @@ -163,7 +151,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: security_header = await response.parse() assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.security_headers.with_streaming_response.edit( @@ -178,7 +165,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -187,7 +173,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: security_header = await async_client.zones.settings.security_headers.get( @@ -195,7 +180,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.security_headers.with_raw_response.get( @@ -207,7 +191,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: security_header = await response.parse() assert_matches_type(Optional[SecurityHeaders], security_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.security_headers.with_streaming_response.get( @@ -221,7 +204,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_security_level.py b/tests/api_resources/zones/settings/test_security_level.py index 46a85cf14e7..4fcd8c7f760 100644 --- a/tests/api_resources/zones/settings/test_security_level.py +++ b/tests/api_resources/zones/settings/test_security_level.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.security_level import SecurityLevel +from cloudflare.types.zones.settings import SecurityLevel base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSecurityLevel: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: security_level = client.zones.settings.security_level.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.security_level.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: security_level = response.parse() assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.security_level.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: security_level = client.zones.settings.security_level.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.security_level.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: security_level = response.parse() assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.security_level.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecurityLevel: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: security_level = await async_client.zones.settings.security_level.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.security_level.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: security_level = await response.parse() assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.security_level.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: security_level = await async_client.zones.settings.security_level.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.security_level.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: security_level = await response.parse() assert_matches_type(Optional[SecurityLevel], security_level, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.security_level.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_server_side_excludes.py b/tests/api_resources/zones/settings/test_server_side_excludes.py index 3590c69cbf4..f57a4aa6685 100644 --- a/tests/api_resources/zones/settings/test_server_side_excludes.py +++ b/tests/api_resources/zones/settings/test_server_side_excludes.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.server_side_excludes import ServerSideExcludes +from cloudflare.types.zones.settings import ServerSideExcludes base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestServerSideExcludes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: server_side_exclude = client.zones.settings.server_side_excludes.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.server_side_excludes.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: server_side_exclude = response.parse() assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.server_side_excludes.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: server_side_exclude = client.zones.settings.server_side_excludes.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.server_side_excludes.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: server_side_exclude = response.parse() assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.server_side_excludes.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncServerSideExcludes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: server_side_exclude = await async_client.zones.settings.server_side_excludes.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.server_side_excludes.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: server_side_exclude = await response.parse() assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.server_side_excludes.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: server_side_exclude = await async_client.zones.settings.server_side_excludes.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.server_side_excludes.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: server_side_exclude = await response.parse() assert_matches_type(Optional[ServerSideExcludes], server_side_exclude, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.server_side_excludes.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py b/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py index 76e531c39bb..99e3d2e9bcf 100644 --- a/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py +++ b/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.sort_query_string_for_cache import SortQueryStringForCache +from cloudflare.types.zones.settings import SortQueryStringForCache base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSortQueryStringForCache: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: sort_query_string_for_cache = client.zones.settings.sort_query_string_for_cache.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.sort_query_string_for_cache.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: sort_query_string_for_cache = response.parse() assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.sort_query_string_for_cache.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: sort_query_string_for_cache = client.zones.settings.sort_query_string_for_cache.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.sort_query_string_for_cache.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: sort_query_string_for_cache = response.parse() assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.sort_query_string_for_cache.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSortQueryStringForCache: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: sort_query_string_for_cache = await async_client.zones.settings.sort_query_string_for_cache.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.sort_query_string_for_cache.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: sort_query_string_for_cache = await response.parse() assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.sort_query_string_for_cache.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: sort_query_string_for_cache = await async_client.zones.settings.sort_query_string_for_cache.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.sort_query_string_for_cache.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: sort_query_string_for_cache = await response.parse() assert_matches_type(Optional[SortQueryStringForCache], sort_query_string_for_cache, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.sort_query_string_for_cache.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_ssl.py b/tests/api_resources/zones/settings/test_ssl.py index 9bdb64ce54a..812f91087f4 100644 --- a/tests/api_resources/zones/settings/test_ssl.py +++ b/tests/api_resources/zones/settings/test_ssl.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.ssl import SSL +from cloudflare.types.zones.settings import SSL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestSSL: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: ssl = client.zones.settings.ssl.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SSL], ssl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.ssl.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: ssl = response.parse() assert_matches_type(Optional[SSL], ssl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.ssl.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ssl = client.zones.settings.ssl.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SSL], ssl, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.ssl.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ssl = response.parse() assert_matches_type(Optional[SSL], ssl, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.ssl.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSSL: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ssl = await async_client.zones.settings.ssl.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SSL], ssl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ssl.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: ssl = await response.parse() assert_matches_type(Optional[SSL], ssl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ssl.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ssl = await async_client.zones.settings.ssl.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SSL], ssl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ssl.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ssl = await response.parse() assert_matches_type(Optional[SSL], ssl, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ssl.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_ssl_recommender.py b/tests/api_resources/zones/settings/test_ssl_recommender.py index ba3e2259bd9..ecda7d7ddff 100644 --- a/tests/api_resources/zones/settings/test_ssl_recommender.py +++ b/tests/api_resources/zones/settings/test_ssl_recommender.py @@ -10,7 +10,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import SSLRecommender -from cloudflare.types.zones.settings.ssl_recommender import SSLRecommender base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +17,6 @@ class TestSSLRecommender: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: ssl_recommender = client.zones.settings.ssl_recommender.edit( @@ -27,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ssl_recommender = client.zones.settings.ssl_recommender.edit( @@ -39,7 +36,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.ssl_recommender.with_raw_response.edit( @@ -52,7 +48,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: ssl_recommender = response.parse() assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.ssl_recommender.with_streaming_response.edit( @@ -67,7 +62,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -76,7 +70,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: ssl_recommender = client.zones.settings.ssl_recommender.get( @@ -84,7 +77,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.ssl_recommender.with_raw_response.get( @@ -96,7 +88,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: ssl_recommender = response.parse() assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.ssl_recommender.with_streaming_response.get( @@ -110,7 +101,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -122,7 +112,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSSLRecommender: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ssl_recommender = await async_client.zones.settings.ssl_recommender.edit( @@ -131,7 +120,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: ssl_recommender = await async_client.zones.settings.ssl_recommender.edit( @@ -143,7 +131,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ssl_recommender.with_raw_response.edit( @@ -156,7 +143,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: ssl_recommender = await response.parse() assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ssl_recommender.with_streaming_response.edit( @@ -171,7 +157,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -180,7 +165,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value={}, ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ssl_recommender = await async_client.zones.settings.ssl_recommender.get( @@ -188,7 +172,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.ssl_recommender.with_raw_response.get( @@ -200,7 +183,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: ssl_recommender = await response.parse() assert_matches_type(Optional[SSLRecommender], ssl_recommender, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.ssl_recommender.with_streaming_response.get( @@ -214,7 +196,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_tls_1_3.py b/tests/api_resources/zones/settings/test_tls_1_3.py index feb7cd78fb6..1b0d4be49cf 100644 --- a/tests/api_resources/zones/settings/test_tls_1_3.py +++ b/tests/api_resources/zones/settings/test_tls_1_3.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.tls_1_3 import TLS1_3 +from cloudflare.types.zones.settings import TLS1_3 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestTLS1_3: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: tls_1_3 = client.zones.settings.tls_1_3.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.tls_1_3.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: tls_1_3 = response.parse() assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.tls_1_3.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tls_1_3 = client.zones.settings.tls_1_3.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.tls_1_3.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tls_1_3 = response.parse() assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.tls_1_3.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTLS1_3: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: tls_1_3 = await async_client.zones.settings.tls_1_3.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.tls_1_3.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: tls_1_3 = await response.parse() assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.tls_1_3.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_1_3 = await async_client.zones.settings.tls_1_3.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.tls_1_3.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tls_1_3 = await response.parse() assert_matches_type(Optional[TLS1_3], tls_1_3, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.tls_1_3.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_tls_client_auth.py b/tests/api_resources/zones/settings/test_tls_client_auth.py index 6e1b075bd04..bb46f15a6cb 100644 --- a/tests/api_resources/zones/settings/test_tls_client_auth.py +++ b/tests/api_resources/zones/settings/test_tls_client_auth.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.tls_client_auth import TLSClientAuth +from cloudflare.types.zones.settings import TLSClientAuth base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestTLSClientAuth: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: tls_client_auth = client.zones.settings.tls_client_auth.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.tls_client_auth.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: tls_client_auth = response.parse() assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.tls_client_auth.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: tls_client_auth = client.zones.settings.tls_client_auth.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.tls_client_auth.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: tls_client_auth = response.parse() assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.tls_client_auth.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTLSClientAuth: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: tls_client_auth = await async_client.zones.settings.tls_client_auth.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.tls_client_auth.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: tls_client_auth = await response.parse() assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.tls_client_auth.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_client_auth = await async_client.zones.settings.tls_client_auth.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.tls_client_auth.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: tls_client_auth = await response.parse() assert_matches_type(Optional[TLSClientAuth], tls_client_auth, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.tls_client_auth.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_true_client_ip_header.py b/tests/api_resources/zones/settings/test_true_client_ip_header.py index 44ceac2ec06..0f412bb997c 100644 --- a/tests/api_resources/zones/settings/test_true_client_ip_header.py +++ b/tests/api_resources/zones/settings/test_true_client_ip_header.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.true_client_ip_header import TrueClientIPHeader +from cloudflare.types.zones.settings import TrueClientIPHeader base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestTrueClientIPHeader: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: true_client_ip_header = client.zones.settings.true_client_ip_header.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.true_client_ip_header.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: true_client_ip_header = response.parse() assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.true_client_ip_header.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: true_client_ip_header = client.zones.settings.true_client_ip_header.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.true_client_ip_header.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: true_client_ip_header = response.parse() assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.true_client_ip_header.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTrueClientIPHeader: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: true_client_ip_header = await async_client.zones.settings.true_client_ip_header.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.true_client_ip_header.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: true_client_ip_header = await response.parse() assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.true_client_ip_header.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: true_client_ip_header = await async_client.zones.settings.true_client_ip_header.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.true_client_ip_header.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: true_client_ip_header = await response.parse() assert_matches_type(Optional[TrueClientIPHeader], true_client_ip_header, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.true_client_ip_header.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_waf.py b/tests/api_resources/zones/settings/test_waf.py index c66f7baeea2..954a0f04228 100644 --- a/tests/api_resources/zones/settings/test_waf.py +++ b/tests/api_resources/zones/settings/test_waf.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.waf import WAF +from cloudflare.types.zones.settings import WAF base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestWAF: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: waf = client.zones.settings.waf.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[WAF], waf, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.waf.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: waf = response.parse() assert_matches_type(Optional[WAF], waf, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.waf.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: waf = client.zones.settings.waf.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[WAF], waf, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.waf.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: waf = response.parse() assert_matches_type(Optional[WAF], waf, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.waf.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWAF: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: waf = await async_client.zones.settings.waf.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[WAF], waf, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.waf.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: waf = await response.parse() assert_matches_type(Optional[WAF], waf, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.waf.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: waf = await async_client.zones.settings.waf.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[WAF], waf, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.waf.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: waf = await response.parse() assert_matches_type(Optional[WAF], waf, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.waf.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_webp.py b/tests/api_resources/zones/settings/test_webp.py index 88db5d853bb..9595a35a1d0 100644 --- a/tests/api_resources/zones/settings/test_webp.py +++ b/tests/api_resources/zones/settings/test_webp.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.webp import WebP +from cloudflare.types.zones.settings import WebP base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestWebP: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: webp = client.zones.settings.webp.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[WebP], webp, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.webp.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: webp = response.parse() assert_matches_type(Optional[WebP], webp, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.webp.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: webp = client.zones.settings.webp.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[WebP], webp, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.webp.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: webp = response.parse() assert_matches_type(Optional[WebP], webp, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.webp.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWebP: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: webp = await async_client.zones.settings.webp.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[WebP], webp, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.webp.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: webp = await response.parse() assert_matches_type(Optional[WebP], webp, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.webp.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: webp = await async_client.zones.settings.webp.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[WebP], webp, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.webp.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: webp = await response.parse() assert_matches_type(Optional[WebP], webp, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.webp.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_websocket.py b/tests/api_resources/zones/settings/test_websocket.py index 17d0a61d126..6d51c9b1673 100644 --- a/tests/api_resources/zones/settings/test_websocket.py +++ b/tests/api_resources/zones/settings/test_websocket.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.websocket import Websocket +from cloudflare.types.zones.settings import Websocket base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestWebsocket: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: websocket = client.zones.settings.websocket.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Websocket], websocket, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.websocket.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: websocket = response.parse() assert_matches_type(Optional[Websocket], websocket, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.websocket.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: websocket = client.zones.settings.websocket.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[Websocket], websocket, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.websocket.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: websocket = response.parse() assert_matches_type(Optional[Websocket], websocket, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.websocket.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWebsocket: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: websocket = await async_client.zones.settings.websocket.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Websocket], websocket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.websocket.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: websocket = await response.parse() assert_matches_type(Optional[Websocket], websocket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.websocket.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="off", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: websocket = await async_client.zones.settings.websocket.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[Websocket], websocket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.websocket.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: websocket = await response.parse() assert_matches_type(Optional[Websocket], websocket, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.websocket.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/settings/test_zero_rtt.py b/tests/api_resources/zones/settings/test_zero_rtt.py index 994e02751b6..2901897e0d8 100644 --- a/tests/api_resources/zones/settings/test_zero_rtt.py +++ b/tests/api_resources/zones/settings/test_zero_rtt.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings.zero_rtt import ZeroRTT +from cloudflare.types.zones.settings import ZeroRTT base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestZeroRTT: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: zero_rtt = client.zones.settings.zero_rtt.edit( @@ -26,7 +25,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.settings.zero_rtt.with_raw_response.edit( @@ -39,7 +37,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: zero_rtt = response.parse() assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.settings.zero_rtt.with_streaming_response.edit( @@ -54,7 +51,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: zero_rtt = client.zones.settings.zero_rtt.get( @@ -71,7 +66,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.zero_rtt.with_raw_response.get( @@ -83,7 +77,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: zero_rtt = response.parse() assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.zero_rtt.with_streaming_response.get( @@ -97,7 +90,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -109,7 +101,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncZeroRTT: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zero_rtt = await async_client.zones.settings.zero_rtt.edit( @@ -118,7 +109,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.zero_rtt.with_raw_response.edit( @@ -131,7 +121,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: zero_rtt = await response.parse() assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.zero_rtt.with_streaming_response.edit( @@ -146,7 +135,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +143,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: value="on", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: zero_rtt = await async_client.zones.settings.zero_rtt.get( @@ -163,7 +150,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.zero_rtt.with_raw_response.get( @@ -175,7 +161,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: zero_rtt = await response.parse() assert_matches_type(Optional[ZeroRTT], zero_rtt, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.zero_rtt.with_streaming_response.get( @@ -189,7 +174,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/test_activation_check.py b/tests/api_resources/zones/test_activation_check.py index 254603ee6fa..a78a1d1567b 100644 --- a/tests/api_resources/zones/test_activation_check.py +++ b/tests/api_resources/zones/test_activation_check.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.activation_check_trigger_response import ActivationCheckTriggerResponse +from cloudflare.types.zones import ActivationCheckTriggerResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestActivationCheck: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_trigger(self, client: Cloudflare) -> None: activation_check = client.zones.activation_check.trigger( @@ -25,7 +24,6 @@ def test_method_trigger(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ActivationCheckTriggerResponse], activation_check, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_trigger(self, client: Cloudflare) -> None: response = client.zones.activation_check.with_raw_response.trigger( @@ -37,7 +35,6 @@ def test_raw_response_trigger(self, client: Cloudflare) -> None: activation_check = response.parse() assert_matches_type(Optional[ActivationCheckTriggerResponse], activation_check, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_trigger(self, client: Cloudflare) -> None: with client.zones.activation_check.with_streaming_response.trigger( @@ -51,7 +48,6 @@ def test_streaming_response_trigger(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_trigger(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_trigger(self, client: Cloudflare) -> None: class TestAsyncActivationCheck: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_trigger(self, async_client: AsyncCloudflare) -> None: activation_check = await async_client.zones.activation_check.trigger( @@ -71,7 +66,6 @@ async def test_method_trigger(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ActivationCheckTriggerResponse], activation_check, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_trigger(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.activation_check.with_raw_response.trigger( @@ -83,7 +77,6 @@ async def test_raw_response_trigger(self, async_client: AsyncCloudflare) -> None activation_check = await response.parse() assert_matches_type(Optional[ActivationCheckTriggerResponse], activation_check, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_trigger(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.activation_check.with_streaming_response.trigger( @@ -97,7 +90,6 @@ async def test_streaming_response_trigger(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_trigger(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/test_custom_nameservers.py b/tests/api_resources/zones/test_custom_nameservers.py index 11994140148..8e213481da5 100644 --- a/tests/api_resources/zones/test_custom_nameservers.py +++ b/tests/api_resources/zones/test_custom_nameservers.py @@ -9,8 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.custom_nameserver_get_response import CustomNameserverGetResponse -from cloudflare.types.zones.custom_nameserver_update_response import CustomNameserverUpdateResponse +from cloudflare.types.zones import ( + CustomNameserverGetResponse, + CustomNameserverUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,7 +20,6 @@ class TestCustomNameservers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: custom_nameserver = client.zones.custom_nameservers.update( @@ -26,7 +27,6 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomNameserverUpdateResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: custom_nameserver = client.zones.custom_nameservers.update( @@ -36,7 +36,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomNameserverUpdateResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zones.custom_nameservers.with_raw_response.update( @@ -48,7 +47,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: custom_nameserver = response.parse() assert_matches_type(Optional[CustomNameserverUpdateResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zones.custom_nameservers.with_streaming_response.update( @@ -62,7 +60,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -70,7 +67,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_nameserver = client.zones.custom_nameservers.get( @@ -78,7 +74,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.custom_nameservers.with_raw_response.get( @@ -90,7 +85,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: custom_nameserver = response.parse() assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.custom_nameservers.with_streaming_response.get( @@ -104,7 +98,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -116,7 +109,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomNameservers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.zones.custom_nameservers.update( @@ -124,7 +116,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomNameserverUpdateResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.zones.custom_nameservers.update( @@ -134,7 +125,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[CustomNameserverUpdateResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.custom_nameservers.with_raw_response.update( @@ -146,7 +136,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await response.parse() assert_matches_type(Optional[CustomNameserverUpdateResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.custom_nameservers.with_streaming_response.update( @@ -160,7 +149,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -168,7 +156,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.zones.custom_nameservers.get( @@ -176,7 +163,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.custom_nameservers.with_raw_response.get( @@ -188,7 +174,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await response.parse() assert_matches_type(Optional[CustomNameserverGetResponse], custom_nameserver, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.custom_nameservers.with_streaming_response.get( @@ -202,7 +187,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/test_dns_settings.py b/tests/api_resources/zones/test_dns_settings.py index 3bb8a3c71c4..d9df4b018c9 100644 --- a/tests/api_resources/zones/test_dns_settings.py +++ b/tests/api_resources/zones/test_dns_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.dns_setting import DNSSetting +from cloudflare.types.zones import DNSSetting base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestDNSSettings: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_edit(self, client: Cloudflare) -> None: dns_setting = client.zones.dns_settings.edit( @@ -25,7 +24,6 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: dns_setting = client.zones.dns_settings.edit( @@ -37,7 +35,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zones.dns_settings.with_raw_response.edit( @@ -49,7 +46,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: dns_setting = response.parse() assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zones.dns_settings.with_streaming_response.edit( @@ -63,7 +59,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -71,7 +66,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: dns_setting = client.zones.dns_settings.get( @@ -79,7 +73,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.dns_settings.with_raw_response.get( @@ -91,7 +84,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: dns_setting = response.parse() assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.dns_settings.with_streaming_response.get( @@ -105,7 +97,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -117,7 +108,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDNSSettings: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: dns_setting = await async_client.zones.dns_settings.edit( @@ -125,7 +115,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: dns_setting = await async_client.zones.dns_settings.edit( @@ -137,7 +126,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.dns_settings.with_raw_response.edit( @@ -149,7 +137,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: dns_setting = await response.parse() assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.dns_settings.with_streaming_response.edit( @@ -163,7 +150,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -171,7 +157,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dns_setting = await async_client.zones.dns_settings.get( @@ -179,7 +164,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.dns_settings.with_raw_response.get( @@ -191,7 +175,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: dns_setting = await response.parse() assert_matches_type(Optional[DNSSetting], dns_setting, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.dns_settings.with_streaming_response.get( @@ -205,7 +188,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/test_holds.py b/tests/api_resources/zones/test_holds.py index 7ac16346ebb..cd4b3671938 100644 --- a/tests/api_resources/zones/test_holds.py +++ b/tests/api_resources/zones/test_holds.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.zone_hold import ZoneHold +from cloudflare.types.zones import ZoneHold base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,7 +17,6 @@ class TestHolds: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: hold = client.zones.holds.create( @@ -25,7 +24,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: hold = client.zones.holds.create( @@ -34,7 +32,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zones.holds.with_raw_response.create( @@ -46,7 +43,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: hold = response.parse() assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zones.holds.with_streaming_response.create( @@ -60,7 +56,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -68,7 +63,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: hold = client.zones.holds.delete( @@ -76,7 +70,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ZoneHold], hold, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: hold = client.zones.holds.delete( @@ -85,7 +78,6 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[ZoneHold], hold, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zones.holds.with_raw_response.delete( @@ -97,7 +89,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: hold = response.parse() assert_matches_type(Optional[ZoneHold], hold, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zones.holds.with_streaming_response.delete( @@ -111,7 +102,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -119,7 +109,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: hold = client.zones.holds.get( @@ -127,7 +116,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.holds.with_raw_response.get( @@ -139,7 +127,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: hold = response.parse() assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.holds.with_streaming_response.get( @@ -153,7 +140,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -165,7 +151,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHolds: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: hold = await async_client.zones.holds.create( @@ -173,7 +158,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: hold = await async_client.zones.holds.create( @@ -182,7 +166,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.holds.with_raw_response.create( @@ -194,7 +177,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: hold = await response.parse() assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.holds.with_streaming_response.create( @@ -208,7 +190,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -216,7 +197,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: hold = await async_client.zones.holds.delete( @@ -224,7 +204,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[ZoneHold], hold, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: hold = await async_client.zones.holds.delete( @@ -233,7 +212,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[ZoneHold], hold, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.holds.with_raw_response.delete( @@ -245,7 +223,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: hold = await response.parse() assert_matches_type(Optional[ZoneHold], hold, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.holds.with_streaming_response.delete( @@ -259,7 +236,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -267,7 +243,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: zone_id="", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: hold = await async_client.zones.holds.get( @@ -275,7 +250,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.holds.with_raw_response.get( @@ -287,7 +261,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: hold = await response.parse() assert_matches_type(ZoneHold, hold, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.holds.with_streaming_response.get( @@ -301,7 +274,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): diff --git a/tests/api_resources/zones/test_subscriptions.py b/tests/api_resources/zones/test_subscriptions.py index d3ec269a7d8..2c194b3fb30 100644 --- a/tests/api_resources/zones/test_subscriptions.py +++ b/tests/api_resources/zones/test_subscriptions.py @@ -10,9 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.user.subscription import Subscription -from cloudflare.types.zones.subscription_get_response import SubscriptionGetResponse -from cloudflare.types.zones.subscription_create_response import SubscriptionCreateResponse +from cloudflare.types.user import Subscription +from cloudflare.types.zones import SubscriptionGetResponse, SubscriptionCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +19,6 @@ class TestSubscriptions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize def test_method_create(self, client: Cloudflare) -> None: subscription = client.zones.subscriptions.create( @@ -28,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: subscription = client.zones.subscriptions.create( @@ -68,7 +65,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zones.subscriptions.with_raw_response.create( @@ -80,7 +76,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zones.subscriptions.with_streaming_response.create( @@ -94,7 +89,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -102,7 +96,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_list(self, client: Cloudflare) -> None: subscription = client.zones.subscriptions.list( @@ -110,7 +103,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[Subscription], subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zones.subscriptions.with_raw_response.list( @@ -122,7 +114,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SyncSinglePage[Subscription], subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zones.subscriptions.with_streaming_response.list( @@ -136,7 +127,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -144,7 +134,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: subscription = client.zones.subscriptions.get( @@ -152,7 +141,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(SubscriptionGetResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.subscriptions.with_raw_response.get( @@ -164,7 +152,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: subscription = response.parse() assert_matches_type(SubscriptionGetResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.subscriptions.with_streaming_response.get( @@ -178,7 +165,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -190,7 +176,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubscriptions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.zones.subscriptions.create( @@ -198,7 +183,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.zones.subscriptions.create( @@ -238,7 +222,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.subscriptions.with_raw_response.create( @@ -250,7 +233,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.subscriptions.with_streaming_response.create( @@ -264,7 +246,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -272,7 +253,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.zones.subscriptions.list( @@ -280,7 +260,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[Subscription], subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.subscriptions.with_raw_response.list( @@ -292,7 +271,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(AsyncSinglePage[Subscription], subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.subscriptions.with_streaming_response.list( @@ -306,7 +284,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): @@ -314,7 +291,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", ) - @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.zones.subscriptions.get( @@ -322,7 +298,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(SubscriptionGetResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.subscriptions.with_raw_response.get( @@ -334,7 +309,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: subscription = await response.parse() assert_matches_type(SubscriptionGetResponse, subscription, path=["response"]) - @pytest.mark.skip() @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.subscriptions.with_streaming_response.get( @@ -348,7 +322,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/test_client.py b/tests/test_client.py index 9b15628f2bd..e16d2dc4612 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -18,7 +18,6 @@ from cloudflare import Cloudflare, AsyncCloudflare, APIResponseValidationError from cloudflare._types import Omit -from cloudflare._client import Cloudflare, AsyncCloudflare from cloudflare._models import BaseModel, FinalRequestOptions from cloudflare._constants import RAW_RESPONSE_HEADER from cloudflare._exceptions import APIStatusError, APITimeoutError, APIResponseValidationError diff --git a/tests/utils.py b/tests/utils.py index f243a4ef8a5..f726a828ad7 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -97,7 +97,22 @@ def assert_matches_type( assert_matches_type(key_type, key, path=[*path, ""]) assert_matches_type(items_type, item, path=[*path, ""]) elif is_union_type(type_): - for i, variant in enumerate(get_args(type_)): + variants = get_args(type_) + + try: + none_index = variants.index(type(None)) + except ValueError: + pass + else: + # special case Optional[T] for better error messages + if len(variants) == 2: + if value is None: + # valid + return + + return assert_matches_type(type_=variants[not none_index], value=value, path=path) + + for i, variant in enumerate(variants): try: assert_matches_type(variant, value, path=[*path, f"variant {i}"]) return