fix: enrich HSE profile parsing with publications and theses
This commit is contained in:
@@ -85,6 +85,19 @@ def test_employee_detail_payload_normalizes_human_readable_sections(db_session):
|
||||
"academic_year": "2025/2026",
|
||||
"courses": [{"title": "Course", "url": "https://example.test/course"}],
|
||||
},
|
||||
{
|
||||
"title": "ВКР",
|
||||
"type": "graduation_theses",
|
||||
"theses_count": 1,
|
||||
"theses": [
|
||||
{
|
||||
"student": "Student Name",
|
||||
"title": "Thesis title",
|
||||
"defense_year": 2025,
|
||||
"project_url": "https://www.hse.ru/edu/vkr/1",
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"title": "Fallback",
|
||||
"type": "generic",
|
||||
@@ -102,7 +115,8 @@ def test_employee_detail_payload_normalizes_human_readable_sections(db_session):
|
||||
assert payload["sections"][0]["year_entries"][0]["text"] == "Master degree"
|
||||
assert payload["sections"][1]["publications"][0]["title"] == "Paper"
|
||||
assert payload["sections"][2]["courses"][0]["title"] == "Course"
|
||||
assert payload["sections"][3]["paragraphs"] == ["Fallback text"]
|
||||
assert payload["sections"][3]["theses"][0]["student"] == "Student Name"
|
||||
assert payload["sections"][4]["paragraphs"] == ["Fallback text"]
|
||||
|
||||
|
||||
def test_employee_payloads_tolerate_malformed_current_data(db_session):
|
||||
@@ -155,6 +169,7 @@ def test_list_employees_page_filters_sorts_and_paginates(db_session):
|
||||
|
||||
assert page["total"] == 1
|
||||
assert page["employees"][0]["full_name"] == "Alpha"
|
||||
assert page["limit"] == 50
|
||||
|
||||
|
||||
def test_stats_payload_uses_latest_run_new_count(db_session):
|
||||
|
||||
Reference in New Issue
Block a user