From 40cb3e10a7f55565fcdeacc7a72541c8ad995f26 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 3 Dec 2024 09:22:39 +0000
Subject: [PATCH] feat(dnssec)!: move under DNS namespace (#2233)
---
api.md | 28 +++++-----
src/cloudflare/_client.py | 37 -------------
src/cloudflare/resources/dns/__init__.py | 14 +++++
src/cloudflare/resources/dns/dns.py | 32 +++++++++++
src/cloudflare/resources/{ => dns}/dnssec.py | 20 +++----
src/cloudflare/types/dns/__init__.py | 3 ++
.../types/{dnssec => dns}/dnssec.py | 0
.../{dnssec => dns}/dnssec_delete_response.py | 0
.../{dnssec => dns}/dnssec_edit_params.py | 0
src/cloudflare/types/dnssec/__init__.py | 7 ---
tests/api_resources/{ => dns}/test_dnssec.py | 54 +++++++++----------
11 files changed, 100 insertions(+), 95 deletions(-)
rename src/cloudflare/resources/{ => dns}/dnssec.py (97%)
rename src/cloudflare/types/{dnssec => dns}/dnssec.py (100%)
rename src/cloudflare/types/{dnssec => dns}/dnssec_delete_response.py (100%)
rename src/cloudflare/types/{dnssec => dns}/dnssec_edit_params.py (100%)
delete mode 100644 src/cloudflare/types/dnssec/__init__.py
rename tests/api_resources/{ => dns}/test_dnssec.py (85%)
diff --git a/api.md b/api.md
index 8a511325f9f..a658f948cb7 100644
--- a/api.md
+++ b/api.md
@@ -979,6 +979,20 @@ Types:
from cloudflare.types.dns import DNSAnalyticsNominalMetric, DNSAnalyticsQuery
```
+## DNSSEC
+
+Types:
+
+```python
+from cloudflare.types.dns import DNSSEC, DNSSECDeleteResponse
+```
+
+Methods:
+
+- client.dns.dnssec.delete(\*, zone_id) -> str
+- client.dns.dnssec.edit(\*, zone_id, \*\*params) -> Optional[DNSSEC]
+- client.dns.dnssec.get(\*, zone_id) -> Optional[DNSSEC]
+
## Records
Types:
@@ -1154,20 +1168,6 @@ Methods:
- client.dns.firewall.reverse_dns.edit(dns_firewall_id, \*, account_id, \*\*params) -> Optional[ReverseDNSEditResponse]
- client.dns.firewall.reverse_dns.get(dns_firewall_id, \*, account_id) -> Optional[ReverseDNSGetResponse]
-# DNSSEC
-
-Types:
-
-```python
-from cloudflare.types.dnssec import DNSSEC, DNSSECDeleteResponse
-```
-
-Methods:
-
-- client.dnssec.delete(\*, zone_id) -> str
-- client.dnssec.edit(\*, zone_id, \*\*params) -> Optional[DNSSEC]
-- client.dnssec.get(\*, zone_id) -> Optional[DNSSEC]
-
# EmailSecurity
## Investigate
diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py
index 5427dd29054..a7b1ee171b2 100644
--- a/src/cloudflare/_client.py
+++ b/src/cloudflare/_client.py
@@ -57,7 +57,6 @@
rules,
speed,
zones,
- dnssec,
images,
queues,
stream,
@@ -310,12 +309,6 @@ def dns(self) -> dns.DNSResource:
return DNSResource(self)
- @cached_property
- def dnssec(self) -> dnssec.DNSSECResource:
- from .resources.dnssec import DNSSECResource
-
- return DNSSECResource(self)
-
@cached_property
def email_security(self) -> email_security.EmailSecurityResource:
from .resources.email_security import EmailSecurityResource
@@ -1075,12 +1068,6 @@ def dns(self) -> dns.AsyncDNSResource:
return AsyncDNSResource(self)
- @cached_property
- def dnssec(self) -> dnssec.AsyncDNSSECResource:
- from .resources.dnssec import AsyncDNSSECResource
-
- return AsyncDNSSECResource(self)
-
@cached_property
def email_security(self) -> email_security.AsyncEmailSecurityResource:
from .resources.email_security import AsyncEmailSecurityResource
@@ -1773,12 +1760,6 @@ def dns(self) -> dns.DNSResourceWithRawResponse:
return DNSResourceWithRawResponse(self._client.dns)
- @cached_property
- def dnssec(self) -> dnssec.DNSSECResourceWithRawResponse:
- from .resources.dnssec import DNSSECResourceWithRawResponse
-
- return DNSSECResourceWithRawResponse(self._client.dnssec)
-
@cached_property
def email_security(self) -> email_security.EmailSecurityResourceWithRawResponse:
from .resources.email_security import EmailSecurityResourceWithRawResponse
@@ -2292,12 +2273,6 @@ def dns(self) -> dns.AsyncDNSResourceWithRawResponse:
return AsyncDNSResourceWithRawResponse(self._client.dns)
- @cached_property
- def dnssec(self) -> dnssec.AsyncDNSSECResourceWithRawResponse:
- from .resources.dnssec import AsyncDNSSECResourceWithRawResponse
-
- return AsyncDNSSECResourceWithRawResponse(self._client.dnssec)
-
@cached_property
def email_security(self) -> email_security.AsyncEmailSecurityResourceWithRawResponse:
from .resources.email_security import AsyncEmailSecurityResourceWithRawResponse
@@ -2811,12 +2786,6 @@ def dns(self) -> dns.DNSResourceWithStreamingResponse:
return DNSResourceWithStreamingResponse(self._client.dns)
- @cached_property
- def dnssec(self) -> dnssec.DNSSECResourceWithStreamingResponse:
- from .resources.dnssec import DNSSECResourceWithStreamingResponse
-
- return DNSSECResourceWithStreamingResponse(self._client.dnssec)
-
@cached_property
def email_security(self) -> email_security.EmailSecurityResourceWithStreamingResponse:
from .resources.email_security import EmailSecurityResourceWithStreamingResponse
@@ -3332,12 +3301,6 @@ def dns(self) -> dns.AsyncDNSResourceWithStreamingResponse:
return AsyncDNSResourceWithStreamingResponse(self._client.dns)
- @cached_property
- def dnssec(self) -> dnssec.AsyncDNSSECResourceWithStreamingResponse:
- from .resources.dnssec import AsyncDNSSECResourceWithStreamingResponse
-
- return AsyncDNSSECResourceWithStreamingResponse(self._client.dnssec)
-
@cached_property
def email_security(self) -> email_security.AsyncEmailSecurityResourceWithStreamingResponse:
from .resources.email_security import AsyncEmailSecurityResourceWithStreamingResponse
diff --git a/src/cloudflare/resources/dns/__init__.py b/src/cloudflare/resources/dns/__init__.py
index 7e394f00159..a2fa43f20ff 100644
--- a/src/cloudflare/resources/dns/__init__.py
+++ b/src/cloudflare/resources/dns/__init__.py
@@ -8,6 +8,14 @@
DNSResourceWithStreamingResponse,
AsyncDNSResourceWithStreamingResponse,
)
+from .dnssec import (
+ DNSSECResource,
+ AsyncDNSSECResource,
+ DNSSECResourceWithRawResponse,
+ AsyncDNSSECResourceWithRawResponse,
+ DNSSECResourceWithStreamingResponse,
+ AsyncDNSSECResourceWithStreamingResponse,
+)
from .records import (
RecordsResource,
AsyncRecordsResource,
@@ -42,6 +50,12 @@
)
__all__ = [
+ "DNSSECResource",
+ "AsyncDNSSECResource",
+ "DNSSECResourceWithRawResponse",
+ "AsyncDNSSECResourceWithRawResponse",
+ "DNSSECResourceWithStreamingResponse",
+ "AsyncDNSSECResourceWithStreamingResponse",
"RecordsResource",
"AsyncRecordsResource",
"RecordsResourceWithRawResponse",
diff --git a/src/cloudflare/resources/dns/dns.py b/src/cloudflare/resources/dns/dns.py
index 7418e408746..09309599ab4 100644
--- a/src/cloudflare/resources/dns/dns.py
+++ b/src/cloudflare/resources/dns/dns.py
@@ -2,6 +2,14 @@
from __future__ import annotations
+from .dnssec import (
+ DNSSECResource,
+ AsyncDNSSECResource,
+ DNSSECResourceWithRawResponse,
+ AsyncDNSSECResourceWithRawResponse,
+ DNSSECResourceWithStreamingResponse,
+ AsyncDNSSECResourceWithStreamingResponse,
+)
from .records import (
RecordsResource,
AsyncRecordsResource,
@@ -44,6 +52,10 @@
class DNSResource(SyncAPIResource):
+ @cached_property
+ def dnssec(self) -> DNSSECResource:
+ return DNSSECResource(self._client)
+
@cached_property
def records(self) -> RecordsResource:
return RecordsResource(self._client)
@@ -81,6 +93,10 @@ def with_streaming_response(self) -> DNSResourceWithStreamingResponse:
class AsyncDNSResource(AsyncAPIResource):
+ @cached_property
+ def dnssec(self) -> AsyncDNSSECResource:
+ return AsyncDNSSECResource(self._client)
+
@cached_property
def records(self) -> AsyncRecordsResource:
return AsyncRecordsResource(self._client)
@@ -121,6 +137,10 @@ class DNSResourceWithRawResponse:
def __init__(self, dns: DNSResource) -> None:
self._dns = dns
+ @cached_property
+ def dnssec(self) -> DNSSECResourceWithRawResponse:
+ return DNSSECResourceWithRawResponse(self._dns.dnssec)
+
@cached_property
def records(self) -> RecordsResourceWithRawResponse:
return RecordsResourceWithRawResponse(self._dns.records)
@@ -142,6 +162,10 @@ class AsyncDNSResourceWithRawResponse:
def __init__(self, dns: AsyncDNSResource) -> None:
self._dns = dns
+ @cached_property
+ def dnssec(self) -> AsyncDNSSECResourceWithRawResponse:
+ return AsyncDNSSECResourceWithRawResponse(self._dns.dnssec)
+
@cached_property
def records(self) -> AsyncRecordsResourceWithRawResponse:
return AsyncRecordsResourceWithRawResponse(self._dns.records)
@@ -163,6 +187,10 @@ class DNSResourceWithStreamingResponse:
def __init__(self, dns: DNSResource) -> None:
self._dns = dns
+ @cached_property
+ def dnssec(self) -> DNSSECResourceWithStreamingResponse:
+ return DNSSECResourceWithStreamingResponse(self._dns.dnssec)
+
@cached_property
def records(self) -> RecordsResourceWithStreamingResponse:
return RecordsResourceWithStreamingResponse(self._dns.records)
@@ -184,6 +212,10 @@ class AsyncDNSResourceWithStreamingResponse:
def __init__(self, dns: AsyncDNSResource) -> None:
self._dns = dns
+ @cached_property
+ def dnssec(self) -> AsyncDNSSECResourceWithStreamingResponse:
+ return AsyncDNSSECResourceWithStreamingResponse(self._dns.dnssec)
+
@cached_property
def records(self) -> AsyncRecordsResourceWithStreamingResponse:
return AsyncRecordsResourceWithStreamingResponse(self._dns.records)
diff --git a/src/cloudflare/resources/dnssec.py b/src/cloudflare/resources/dns/dnssec.py
similarity index 97%
rename from src/cloudflare/resources/dnssec.py
rename to src/cloudflare/resources/dns/dnssec.py
index 456af0fed2c..28b47ae9b06 100644
--- a/src/cloudflare/resources/dnssec.py
+++ b/src/cloudflare/resources/dns/dnssec.py
@@ -7,24 +7,24 @@
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 .._base_client import make_request_options
-from ..types.dnssec import dnssec_edit_params
-from ..types.dnssec.dnssec import DNSSEC
-from ..types.dnssec.dnssec_delete_response import DNSSECDeleteResponse
+from ..._wrappers import ResultWrapper
+from ...types.dns import dnssec_edit_params
+from ..._base_client import make_request_options
+from ...types.dns.dnssec import DNSSEC
+from ...types.dns.dnssec_delete_response import DNSSECDeleteResponse
__all__ = ["DNSSECResource", "AsyncDNSSECResource"]
diff --git a/src/cloudflare/types/dns/__init__.py b/src/cloudflare/types/dns/__init__.py
index 46622b2fcf3..c0dd363c808 100644
--- a/src/cloudflare/types/dns/__init__.py
+++ b/src/cloudflare/types/dns/__init__.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from .dnssec import DNSSEC as DNSSEC
from .a_record import ARecord as ARecord
from .ds_record import DSRecord as DSRecord
from .mx_record import MXRecord as MXRecord
@@ -42,6 +43,7 @@
from .svcb_record_param import SVCBRecordParam as SVCBRecordParam
from .tlsa_record_param import TLSARecordParam as TLSARecordParam
from .cname_record_param import CNAMERecordParam as CNAMERecordParam
+from .dnssec_edit_params import DNSSECEditParams as DNSSECEditParams
from .https_record_param import HTTPSRecordParam as HTTPSRecordParam
from .naptr_record_param import NAPTRRecordParam as NAPTRRecordParam
from .record_edit_params import RecordEditParams as RecordEditParams
@@ -67,6 +69,7 @@
from .record_batch_response import RecordBatchResponse as RecordBatchResponse
from .record_process_timing import RecordProcessTiming as RecordProcessTiming
from .setting_edit_response import SettingEditResponse as SettingEditResponse
+from .dnssec_delete_response import DNSSECDeleteResponse as DNSSECDeleteResponse
from .firewall_create_params import FirewallCreateParams as FirewallCreateParams
from .firewall_edit_response import FirewallEditResponse as FirewallEditResponse
from .firewall_list_response import FirewallListResponse as FirewallListResponse
diff --git a/src/cloudflare/types/dnssec/dnssec.py b/src/cloudflare/types/dns/dnssec.py
similarity index 100%
rename from src/cloudflare/types/dnssec/dnssec.py
rename to src/cloudflare/types/dns/dnssec.py
diff --git a/src/cloudflare/types/dnssec/dnssec_delete_response.py b/src/cloudflare/types/dns/dnssec_delete_response.py
similarity index 100%
rename from src/cloudflare/types/dnssec/dnssec_delete_response.py
rename to src/cloudflare/types/dns/dnssec_delete_response.py
diff --git a/src/cloudflare/types/dnssec/dnssec_edit_params.py b/src/cloudflare/types/dns/dnssec_edit_params.py
similarity index 100%
rename from src/cloudflare/types/dnssec/dnssec_edit_params.py
rename to src/cloudflare/types/dns/dnssec_edit_params.py
diff --git a/src/cloudflare/types/dnssec/__init__.py b/src/cloudflare/types/dnssec/__init__.py
deleted file mode 100644
index a8c3b38cc31..00000000000
--- a/src/cloudflare/types/dnssec/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .dnssec import DNSSEC as DNSSEC
-from .dnssec_edit_params import DNSSECEditParams as DNSSECEditParams
-from .dnssec_delete_response import DNSSECDeleteResponse as DNSSECDeleteResponse
diff --git a/tests/api_resources/test_dnssec.py b/tests/api_resources/dns/test_dnssec.py
similarity index 85%
rename from tests/api_resources/test_dnssec.py
rename to tests/api_resources/dns/test_dnssec.py
index 4337b194683..815bd2693f9 100644
--- a/tests/api_resources/test_dnssec.py
+++ b/tests/api_resources/dns/test_dnssec.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.dnssec import DNSSEC
+from cloudflare.types.dns import DNSSEC
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -19,14 +19,14 @@ class TestDNSSEC:
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
- dnssec = client.dnssec.delete(
+ dnssec = client.dns.dnssec.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(str, dnssec, path=["response"])
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.dnssec.with_raw_response.delete(
+ response = client.dns.dnssec.with_raw_response.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -37,7 +37,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.dnssec.with_streaming_response.delete(
+ with client.dns.dnssec.with_streaming_response.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -51,20 +51,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
@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(
+ client.dns.dnssec.with_raw_response.delete(
zone_id="",
)
@parametrize
def test_method_edit(self, client: Cloudflare) -> None:
- dnssec = client.dnssec.edit(
+ dnssec = client.dns.dnssec.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[DNSSEC], dnssec, path=["response"])
@parametrize
def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
- dnssec = client.dnssec.edit(
+ dnssec = client.dns.dnssec.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
dnssec_multi_signer=False,
dnssec_presigned=True,
@@ -74,7 +74,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
- response = client.dnssec.with_raw_response.edit(
+ response = client.dns.dnssec.with_raw_response.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -85,7 +85,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
- with client.dnssec.with_streaming_response.edit(
+ with client.dns.dnssec.with_streaming_response.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -99,20 +99,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
@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 ''"):
- client.dnssec.with_raw_response.edit(
+ client.dns.dnssec.with_raw_response.edit(
zone_id="",
)
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- dnssec = client.dnssec.get(
+ dnssec = client.dns.dnssec.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[DNSSEC], dnssec, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.dnssec.with_raw_response.get(
+ response = client.dns.dnssec.with_raw_response.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -123,7 +123,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.dnssec.with_streaming_response.get(
+ with client.dns.dnssec.with_streaming_response.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -137,7 +137,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@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.dnssec.with_raw_response.get(
+ client.dns.dnssec.with_raw_response.get(
zone_id="",
)
@@ -147,14 +147,14 @@ class TestAsyncDNSSEC:
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- dnssec = await async_client.dnssec.delete(
+ dnssec = await async_client.dns.dnssec.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(str, dnssec, path=["response"])
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.dnssec.with_raw_response.delete(
+ response = await async_client.dns.dnssec.with_raw_response.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -165,7 +165,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.dnssec.with_streaming_response.delete(
+ async with async_client.dns.dnssec.with_streaming_response.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -179,20 +179,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
@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(
+ await async_client.dns.dnssec.with_raw_response.delete(
zone_id="",
)
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
- dnssec = await async_client.dnssec.edit(
+ dnssec = await async_client.dns.dnssec.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[DNSSEC], dnssec, path=["response"])
@parametrize
async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
- dnssec = await async_client.dnssec.edit(
+ dnssec = await async_client.dns.dnssec.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
dnssec_multi_signer=False,
dnssec_presigned=True,
@@ -202,7 +202,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.dnssec.with_raw_response.edit(
+ response = await async_client.dns.dnssec.with_raw_response.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -213,7 +213,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
- async with async_client.dnssec.with_streaming_response.edit(
+ async with async_client.dns.dnssec.with_streaming_response.edit(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -227,20 +227,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
@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 ''"):
- await async_client.dnssec.with_raw_response.edit(
+ await async_client.dns.dnssec.with_raw_response.edit(
zone_id="",
)
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- dnssec = await async_client.dnssec.get(
+ dnssec = await async_client.dns.dnssec.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[DNSSEC], dnssec, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.dnssec.with_raw_response.get(
+ response = await async_client.dns.dnssec.with_raw_response.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -251,7 +251,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.dnssec.with_streaming_response.get(
+ async with async_client.dns.dnssec.with_streaming_response.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -265,6 +265,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@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.dnssec.with_raw_response.get(
+ await async_client.dns.dnssec.with_raw_response.get(
zone_id="",
)