-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_cases.py
More file actions
43 lines (26 loc) · 1.05 KB
/
test_cases.py
File metadata and controls
43 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import pytest
from mpt_api_client.resources.helpdesk.cases import AsyncCasesService, CasesService
@pytest.fixture
def cases_service(http_client):
return CasesService(http_client=http_client)
@pytest.fixture
def async_cases_service(async_http_client):
return AsyncCasesService(http_client=async_http_client)
@pytest.mark.parametrize(
"method", ["complete", "create", "get", "iterate", "process", "query", "update"]
)
def test_mixins_present(cases_service, method):
result = hasattr(cases_service, method)
assert result is True
@pytest.mark.parametrize(
"method", ["complete", "create", "get", "iterate", "process", "query", "update"]
)
def test_async_mixins_present(async_cases_service, method):
result = hasattr(async_cases_service, method)
assert result is True
def test_endpoint(cases_service):
result = cases_service.path == "/public/v1/helpdesk/cases"
assert result is True
def test_async_endpoint(async_cases_service):
result = async_cases_service.path == "/public/v1/helpdesk/cases"
assert result is True