|
4 | 4 |
|
5 | 5 | from huntflow_api_client import HuntflowAPI |
6 | 6 | from huntflow_api_client.entities.organization_settings import OrganizationSettings |
| 7 | +from huntflow_api_client.models.response.interview_types import InterviewTypesListResponse |
7 | 8 | from huntflow_api_client.models.response.organization_settings import ( |
8 | 9 | BaseSurveySchemaTypeWithSchemas, |
9 | 10 | CloseReasonsListResponse, |
|
27 | 28 | "schema": {}, |
28 | 29 | "ui_schema": {}, |
29 | 30 | } |
| 31 | +INTERVIEW_TYPES_RESPONSE: Dict[str, Any] = { |
| 32 | + "items": [ |
| 33 | + { |
| 34 | + "id": 20, |
| 35 | + "name": "Phone interview", |
| 36 | + "account": 42, |
| 37 | + "order": 0, |
| 38 | + "type": "user", |
| 39 | + }, |
| 40 | + ], |
| 41 | +} |
30 | 42 |
|
31 | 43 |
|
32 | 44 | async def test_get_hold_reasons( |
@@ -72,3 +84,18 @@ async def test_get_applicant_survey_form( |
72 | 84 |
|
73 | 85 | response = await settings.get_applicant_survey_form(ACCOUNT_ID, SURVEY_ID) |
74 | 86 | assert response == BaseSurveySchemaTypeWithSchemas(**SURVEY_FORM_RESPONSE) |
| 87 | + |
| 88 | + |
| 89 | +async def test_get_interview_types( |
| 90 | + httpx_mock: HTTPXMock, |
| 91 | + token_proxy: HuntflowTokenProxy, |
| 92 | +) -> None: |
| 93 | + httpx_mock.add_response( |
| 94 | + url=f"{VERSIONED_BASE_URL}/accounts/{ACCOUNT_ID}/interview_types", |
| 95 | + json=INTERVIEW_TYPES_RESPONSE, |
| 96 | + ) |
| 97 | + api_client = HuntflowAPI(BASE_URL, token_proxy=token_proxy) |
| 98 | + settings = OrganizationSettings(api_client) |
| 99 | + |
| 100 | + response = await settings.get_interview_types(ACCOUNT_ID) |
| 101 | + assert response == InterviewTypesListResponse(**INTERVIEW_TYPES_RESPONSE) |
0 commit comments