Debian Codegraph @

tests/wire/test_connections.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3
4 def test_connections_list_() -> None:
5 """Test list endpoint with WireMock"""
6 test_id = "connections.list_.0"
7 client = get_client(test_id)
8 client.connections.list(
9 from_="from",
10 take=1,
11 strategy=["ad"],
12 name="name",
13 fields="fields",
14 include_fields=True,
15 )
16 verify_request_count(
17 test_id,
18 "GET",
19 "/connections",
20 {"from": "from", "take": "1", "strategy": "ad", "name": "name", "fields": "fields", "include_fields": "true"},
21 1,
22 )
23
24
25 def test_connections_create() -> None:
26 """Test create endpoint with WireMock"""
27 test_id = "connections.create.0"
28 client = get_client(test_id)
29 client.connections.create(
30 name="name",
31 strategy="ad",
32 )
33 verify_request_count(test_id, "POST", "/connections", None, 1)
34
35
36 def test_connections_get() -> None:
37 """Test get endpoint with WireMock"""
38 test_id = "connections.get.0"
39 client = get_client(test_id)
40 client.connections.get(
41 id="id",
42 fields="fields",
43 include_fields=True,
44 )
45 verify_request_count(test_id, "GET", "/connections/id", {"fields": "fields", "include_fields": "true"}, 1)
46
47
48 def test_connections_delete() -> None:
49 """Test delete endpoint with WireMock"""
50 test_id = "connections.delete.0"
51 client = get_client(test_id)
52 client.connections.delete(
53 id="id",
54 )
55 verify_request_count(test_id, "DELETE", "/connections/id", None, 1)
56
57
58 def test_connections_update() -> None:
59 """Test update endpoint with WireMock"""
60 test_id = "connections.update.0"
61 client = get_client(test_id)
62 client.connections.update(
63 id="id",
64 )
65 verify_request_count(test_id, "PATCH", "/connections/id", None, 1)
66
67
68 def test_connections_check_status() -> None:
69 """Test checkStatus endpoint with WireMock"""
70 test_id = "connections.check_status.0"
71 client = get_client(test_id)
72 client.connections.check_status(
73 id="id",
74 )
75 verify_request_count(test_id, "GET", "/connections/id/status", None, 1)