Debian Codegraph @

tests/wire/test_users_authenticationMethods.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3 from auth0.management import SetUserAuthenticationMethods
4
5
6 def test_users_authenticationMethods_list_() -> None:
7 """Test list endpoint with WireMock"""
8 test_id = "users.authentication_methods.list_.0"
9 client = get_client(test_id)
10 client.users.authentication_methods.list(
11 id="id",
12 page=1,
13 per_page=1,
14 include_totals=True,
15 )
16 verify_request_count(
17 test_id, "GET", "/users/id/authentication-methods", {"page": "1", "per_page": "1", "include_totals": "true"}, 1
18 )
19
20
21 def test_users_authenticationMethods_create() -> None:
22 """Test create endpoint with WireMock"""
23 test_id = "users.authentication_methods.create.0"
24 client = get_client(test_id)
25 client.users.authentication_methods.create(
26 id="id",
27 type="phone",
28 )
29 verify_request_count(test_id, "POST", "/users/id/authentication-methods", None, 1)
30
31
32 def test_users_authenticationMethods_set_() -> None:
33 """Test set endpoint with WireMock"""
34 test_id = "users.authentication_methods.set_.0"
35 client = get_client(test_id)
36 client.users.authentication_methods.set(
37 id="id",
38 request=[
39 SetUserAuthenticationMethods(
40 type="phone",
41 )
42 ],
43 )
44 verify_request_count(test_id, "PUT", "/users/id/authentication-methods", None, 1)
45
46
47 def test_users_authenticationMethods_delete_all() -> None:
48 """Test deleteAll endpoint with WireMock"""
49 test_id = "users.authentication_methods.delete_all.0"
50 client = get_client(test_id)
51 client.users.authentication_methods.delete_all(
52 id="id",
53 )
54 verify_request_count(test_id, "DELETE", "/users/id/authentication-methods", None, 1)
55
56
57 def test_users_authenticationMethods_get() -> None:
58 """Test get endpoint with WireMock"""
59 test_id = "users.authentication_methods.get.0"
60 client = get_client(test_id)
61 client.users.authentication_methods.get(
62 id="id",
63 authentication_method_id="authentication_method_id",
64 )
65 verify_request_count(test_id, "GET", "/users/id/authentication-methods/authentication_method_id", None, 1)
66
67
68 def test_users_authenticationMethods_delete() -> None:
69 """Test delete endpoint with WireMock"""
70 test_id = "users.authentication_methods.delete.0"
71 client = get_client(test_id)
72 client.users.authentication_methods.delete(
73 id="id",
74 authentication_method_id="authentication_method_id",
75 )
76 verify_request_count(test_id, "DELETE", "/users/id/authentication-methods/authentication_method_id", None, 1)
77
78
79 def test_users_authenticationMethods_update() -> None:
80 """Test update endpoint with WireMock"""
81 test_id = "users.authentication_methods.update.0"
82 client = get_client(test_id)
83 client.users.authentication_methods.update(
84 id="id",
85 authentication_method_id="authentication_method_id",
86 )
87 verify_request_count(test_id, "PATCH", "/users/id/authentication-methods/authentication_method_id", None, 1)