Debian Codegraph @

tests/wire/test_branding_phone_providers.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3 from auth0.management import TwilioProviderCredentials
4
5
6 def test_branding_phone_providers_list_() -> None:
7 """Test list endpoint with WireMock"""
8 test_id = "branding.phone.providers.list_.0"
9 client = get_client(test_id)
10 client.branding.phone.providers.list(
11 disabled=True,
12 )
13 verify_request_count(test_id, "GET", "/branding/phone/providers", {"disabled": "true"}, 1)
14
15
16 def test_branding_phone_providers_create() -> None:
17 """Test create endpoint with WireMock"""
18 test_id = "branding.phone.providers.create.0"
19 client = get_client(test_id)
20 client.branding.phone.providers.create(
21 name="twilio",
22 credentials=TwilioProviderCredentials(
23 auth_token="auth_token",
24 ),
25 )
26 verify_request_count(test_id, "POST", "/branding/phone/providers", None, 1)
27
28
29 def test_branding_phone_providers_get() -> None:
30 """Test get endpoint with WireMock"""
31 test_id = "branding.phone.providers.get.0"
32 client = get_client(test_id)
33 client.branding.phone.providers.get(
34 id="id",
35 )
36 verify_request_count(test_id, "GET", "/branding/phone/providers/id", None, 1)
37
38
39 def test_branding_phone_providers_delete() -> None:
40 """Test delete endpoint with WireMock"""
41 test_id = "branding.phone.providers.delete.0"
42 client = get_client(test_id)
43 client.branding.phone.providers.delete(
44 id="id",
45 )
46 verify_request_count(test_id, "DELETE", "/branding/phone/providers/id", None, 1)
47
48
49 def test_branding_phone_providers_update() -> None:
50 """Test update endpoint with WireMock"""
51 test_id = "branding.phone.providers.update.0"
52 client = get_client(test_id)
53 client.branding.phone.providers.update(
54 id="id",
55 )
56 verify_request_count(test_id, "PATCH", "/branding/phone/providers/id", None, 1)
57
58
59 def test_branding_phone_providers_test() -> None:
60 """Test test endpoint with WireMock"""
61 test_id = "branding.phone.providers.test.0"
62 client = get_client(test_id)
63 client.branding.phone.providers.test(
64 id="id",
65 to="to",
66 )
67 verify_request_count(test_id, "POST", "/branding/phone/providers/id/try", None, 1)