Debian Codegraph @

tests/wire/test_flows_vault_connections.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3 from auth0.management import CreateFlowsVaultConnectionActivecampaignApiKey, FlowsVaultConnectioSetupApiKeyWithBaseUrl
4
5
6 def test_flows_vault_connections_list_() -> None:
7 """Test list endpoint with WireMock"""
8 test_id = "flows.vault.connections.list_.0"
9 client = get_client(test_id)
10 client.flows.vault.connections.list(
11 page=1,
12 per_page=1,
13 include_totals=True,
14 )
15 verify_request_count(
16 test_id, "GET", "/flows/vault/connections", {"page": "1", "per_page": "1", "include_totals": "true"}, 1
17 )
18
19
20 def test_flows_vault_connections_create() -> None:
21 """Test create endpoint with WireMock"""
22 test_id = "flows.vault.connections.create.0"
23 client = get_client(test_id)
24 client.flows.vault.connections.create(
25 request=CreateFlowsVaultConnectionActivecampaignApiKey(
26 name="name",
27 app_id="ACTIVECAMPAIGN",
28 setup=FlowsVaultConnectioSetupApiKeyWithBaseUrl(
29 type="API_KEY",
30 api_key="api_key",
31 base_url="base_url",
32 ),
33 ),
34 )
35 verify_request_count(test_id, "POST", "/flows/vault/connections", None, 1)
36
37
38 def test_flows_vault_connections_get() -> None:
39 """Test get endpoint with WireMock"""
40 test_id = "flows.vault.connections.get.0"
41 client = get_client(test_id)
42 client.flows.vault.connections.get(
43 id="id",
44 )
45 verify_request_count(test_id, "GET", "/flows/vault/connections/id", None, 1)
46
47
48 def test_flows_vault_connections_delete() -> None:
49 """Test delete endpoint with WireMock"""
50 test_id = "flows.vault.connections.delete.0"
51 client = get_client(test_id)
52 client.flows.vault.connections.delete(
53 id="id",
54 )
55 verify_request_count(test_id, "DELETE", "/flows/vault/connections/id", None, 1)
56
57
58 def test_flows_vault_connections_update() -> None:
59 """Test update endpoint with WireMock"""
60 test_id = "flows.vault.connections.update.0"
61 client = get_client(test_id)
62 client.flows.vault.connections.update(
63 id="id",
64 )
65 verify_request_count(test_id, "PATCH", "/flows/vault/connections/id", None, 1)