Debian Codegraph @

tests/wire/test_guardian_factors_phone.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3
4 def test_guardian_factors_phone_get_message_types() -> None:
5 """Test getMessageTypes endpoint with WireMock"""
6 test_id = "guardian.factors.phone.get_message_types.0"
7 client = get_client(test_id)
8 client.guardian.factors.phone.get_message_types()
9 verify_request_count(test_id, "GET", "/guardian/factors/phone/message-types", None, 1)
10
11
12 def test_guardian_factors_phone_set_message_types() -> None:
13 """Test setMessageTypes endpoint with WireMock"""
14 test_id = "guardian.factors.phone.set_message_types.0"
15 client = get_client(test_id)
16 client.guardian.factors.phone.set_message_types(
17 message_types=["sms"],
18 )
19 verify_request_count(test_id, "PUT", "/guardian/factors/phone/message-types", None, 1)
20
21
22 def test_guardian_factors_phone_get_twilio_provider() -> None:
23 """Test getTwilioProvider endpoint with WireMock"""
24 test_id = "guardian.factors.phone.get_twilio_provider.0"
25 client = get_client(test_id)
26 client.guardian.factors.phone.get_twilio_provider()
27 verify_request_count(test_id, "GET", "/guardian/factors/phone/providers/twilio", None, 1)
28
29
30 def test_guardian_factors_phone_set_twilio_provider() -> None:
31 """Test setTwilioProvider endpoint with WireMock"""
32 test_id = "guardian.factors.phone.set_twilio_provider.0"
33 client = get_client(test_id)
34 client.guardian.factors.phone.set_twilio_provider()
35 verify_request_count(test_id, "PUT", "/guardian/factors/phone/providers/twilio", None, 1)
36
37
38 def test_guardian_factors_phone_get_selected_provider() -> None:
39 """Test getSelectedProvider endpoint with WireMock"""
40 test_id = "guardian.factors.phone.get_selected_provider.0"
41 client = get_client(test_id)
42 client.guardian.factors.phone.get_selected_provider()
43 verify_request_count(test_id, "GET", "/guardian/factors/phone/selected-provider", None, 1)
44
45
46 def test_guardian_factors_phone_set_provider() -> None:
47 """Test setProvider endpoint with WireMock"""
48 test_id = "guardian.factors.phone.set_provider.0"
49 client = get_client(test_id)
50 client.guardian.factors.phone.set_provider(
51 provider="auth0",
52 )
53 verify_request_count(test_id, "PUT", "/guardian/factors/phone/selected-provider", None, 1)
54
55
56 def test_guardian_factors_phone_get_templates() -> None:
57 """Test getTemplates endpoint with WireMock"""
58 test_id = "guardian.factors.phone.get_templates.0"
59 client = get_client(test_id)
60 client.guardian.factors.phone.get_templates()
61 verify_request_count(test_id, "GET", "/guardian/factors/phone/templates", None, 1)
62
63
64 def test_guardian_factors_phone_set_templates() -> None:
65 """Test setTemplates endpoint with WireMock"""
66 test_id = "guardian.factors.phone.set_templates.0"
67 client = get_client(test_id)
68 client.guardian.factors.phone.set_templates(
69 enrollment_message="enrollment_message",
70 verification_message="verification_message",
71 )
72 verify_request_count(test_id, "PUT", "/guardian/factors/phone/templates", None, 1)