Debian Codegraph @

tests/wire/test_actions_modules.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3
4 def test_actions_modules_list_() -> None:
5 """Test list endpoint with WireMock"""
6 test_id = "actions.modules.list_.0"
7 client = get_client(test_id)
8 client.actions.modules.list(
9 page=1,
10 per_page=1,
11 )
12 verify_request_count(test_id, "GET", "/actions/modules", {"page": "1", "per_page": "1"}, 1)
13
14
15 def test_actions_modules_create() -> None:
16 """Test create endpoint with WireMock"""
17 test_id = "actions.modules.create.0"
18 client = get_client(test_id)
19 client.actions.modules.create(
20 name="name",
21 code="code",
22 )
23 verify_request_count(test_id, "POST", "/actions/modules", None, 1)
24
25
26 def test_actions_modules_get() -> None:
27 """Test get endpoint with WireMock"""
28 test_id = "actions.modules.get.0"
29 client = get_client(test_id)
30 client.actions.modules.get(
31 id="id",
32 )
33 verify_request_count(test_id, "GET", "/actions/modules/id", None, 1)
34
35
36 def test_actions_modules_delete() -> None:
37 """Test delete endpoint with WireMock"""
38 test_id = "actions.modules.delete.0"
39 client = get_client(test_id)
40 client.actions.modules.delete(
41 id="id",
42 )
43 verify_request_count(test_id, "DELETE", "/actions/modules/id", None, 1)
44
45
46 def test_actions_modules_update() -> None:
47 """Test update endpoint with WireMock"""
48 test_id = "actions.modules.update.0"
49 client = get_client(test_id)
50 client.actions.modules.update(
51 id="id",
52 )
53 verify_request_count(test_id, "PATCH", "/actions/modules/id", None, 1)
54
55
56 def test_actions_modules_list_actions() -> None:
57 """Test listActions endpoint with WireMock"""
58 test_id = "actions.modules.list_actions.0"
59 client = get_client(test_id)
60 client.actions.modules.list_actions(
61 id="id",
62 page=1,
63 per_page=1,
64 )
65 verify_request_count(test_id, "GET", "/actions/modules/id/actions", {"page": "1", "per_page": "1"}, 1)
66
67
68 def test_actions_modules_rollback() -> None:
69 """Test rollback endpoint with WireMock"""
70 test_id = "actions.modules.rollback.0"
71 client = get_client(test_id)
72 client.actions.modules.rollback(
73 id="id",
74 module_version_id="module_version_id",
75 )
76 verify_request_count(test_id, "POST", "/actions/modules/id/rollback", None, 1)