Debian Codegraph @

tests/wire/test_flows.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3
4 def test_flows_list_() -> None:
5 """Test list endpoint with WireMock"""
6 test_id = "flows.list_.0"
7 client = get_client(test_id)
8 client.flows.list(
9 page=1,
10 per_page=1,
11 include_totals=True,
12 hydrate=["form_count"],
13 synchronous=True,
14 )
15 verify_request_count(
16 test_id,
17 "GET",
18 "/flows",
19 {"page": "1", "per_page": "1", "include_totals": "true", "hydrate": "form_count", "synchronous": "true"},
20 1,
21 )
22
23
24 def test_flows_create() -> None:
25 """Test create endpoint with WireMock"""
26 test_id = "flows.create.0"
27 client = get_client(test_id)
28 client.flows.create(
29 name="name",
30 )
31 verify_request_count(test_id, "POST", "/flows", None, 1)
32
33
34 def test_flows_get() -> None:
35 """Test get endpoint with WireMock"""
36 test_id = "flows.get.0"
37 client = get_client(test_id)
38 client.flows.get(
39 id="id",
40 hydrate=["form_count"],
41 )
42 verify_request_count(test_id, "GET", "/flows/id", {"hydrate": "form_count"}, 1)
43
44
45 def test_flows_delete() -> None:
46 """Test delete endpoint with WireMock"""
47 test_id = "flows.delete.0"
48 client = get_client(test_id)
49 client.flows.delete(
50 id="id",
51 )
52 verify_request_count(test_id, "DELETE", "/flows/id", None, 1)
53
54
55 def test_flows_update() -> None:
56 """Test update endpoint with WireMock"""
57 test_id = "flows.update.0"
58 client = get_client(test_id)
59 client.flows.update(
60 id="id",
61 )
62 verify_request_count(test_id, "PATCH", "/flows/id", None, 1)