Debian Codegraph @

tests/wire/test_forms.py

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