Debian Codegraph @

tests/wire/test_customDomains.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3
4 def test_customDomains_list_() -> None:
5 """Test list endpoint with WireMock"""
6 test_id = "custom_domains.list_.0"
7 client = get_client(test_id)
8 client.custom_domains.list(
9 q="q",
10 fields="fields",
11 include_fields=True,
12 sort="sort",
13 )
14 verify_request_count(
15 test_id, "GET", "/custom-domains", {"q": "q", "fields": "fields", "include_fields": "true", "sort": "sort"}, 1
16 )
17
18
19 def test_customDomains_create() -> None:
20 """Test create endpoint with WireMock"""
21 test_id = "custom_domains.create.0"
22 client = get_client(test_id)
23 client.custom_domains.create(
24 domain="domain",
25 type="auth0_managed_certs",
26 )
27 verify_request_count(test_id, "POST", "/custom-domains", None, 1)
28
29
30 def test_customDomains_get_default() -> None:
31 """Test getDefault endpoint with WireMock"""
32 test_id = "custom_domains.get_default.0"
33 client = get_client(test_id)
34 client.custom_domains.get_default()
35 verify_request_count(test_id, "GET", "/custom-domains/default", None, 1)
36
37
38 def test_customDomains_set_default() -> None:
39 """Test setDefault endpoint with WireMock"""
40 test_id = "custom_domains.set_default.0"
41 client = get_client(test_id)
42 client.custom_domains.set_default(
43 domain="domain",
44 )
45 verify_request_count(test_id, "PATCH", "/custom-domains/default", None, 1)
46
47
48 def test_customDomains_get() -> None:
49 """Test get endpoint with WireMock"""
50 test_id = "custom_domains.get.0"
51 client = get_client(test_id)
52 client.custom_domains.get(
53 id="id",
54 )
55 verify_request_count(test_id, "GET", "/custom-domains/id", None, 1)
56
57
58 def test_customDomains_delete() -> None:
59 """Test delete endpoint with WireMock"""
60 test_id = "custom_domains.delete.0"
61 client = get_client(test_id)
62 client.custom_domains.delete(
63 id="id",
64 )
65 verify_request_count(test_id, "DELETE", "/custom-domains/id", None, 1)
66
67
68 def test_customDomains_update() -> None:
69 """Test update endpoint with WireMock"""
70 test_id = "custom_domains.update.0"
71 client = get_client(test_id)
72 client.custom_domains.update(
73 id="id",
74 )
75 verify_request_count(test_id, "PATCH", "/custom-domains/id", None, 1)
76
77
78 def test_customDomains_test() -> None:
79 """Test test endpoint with WireMock"""
80 test_id = "custom_domains.test.0"
81 client = get_client(test_id)
82 client.custom_domains.test(
83 id="id",
84 )
85 verify_request_count(test_id, "POST", "/custom-domains/id/test", None, 1)
86
87
88 def test_customDomains_verify() -> None:
89 """Test verify endpoint with WireMock"""
90 test_id = "custom_domains.verify.0"
91 client = get_client(test_id)
92 client.custom_domains.verify(
93 id="id",
94 )
95 verify_request_count(test_id, "POST", "/custom-domains/id/verify", None, 1)