diff --git a/tests/test_glossary_service.py b/tests/test_glossary_service.py index d2f89b2..c6a7c9b 100644 --- a/tests/test_glossary_service.py +++ b/tests/test_glossary_service.py @@ -55,11 +55,12 @@ class TestGetGlossaryTerms: result = get_glossary_terms(glossary_id, user_id) - assert len(result) == 2 - assert result[0]["source"] == "cloud computing" - assert result[0]["target"] == "informatique en nuage" - assert result[1]["source"] == "machine learning" - assert result[1]["target"] == "apprentissage automatique" + terms = result["terms"] + assert len(terms) == 2 + assert terms[0]["source"] == "cloud computing" + assert terms[0]["target"] == "informatique en nuage" + assert terms[1]["source"] == "machine learning" + assert terms[1]["target"] == "apprentissage automatique" def test_get_glossary_terms_not_found(self): """Test error when glossary doesn't exist.""" @@ -128,7 +129,7 @@ class TestGetGlossaryTerms: result = get_glossary_terms(glossary_id, user_id) - assert result == [] + assert result["terms"] == [] class TestValidateGlossaryAccess: @@ -357,7 +358,7 @@ class TestGlossaryIntegration: result = get_glossary_terms(glossary_id, user_id) - assert result == [] + assert result["terms"] == [] def test_build_full_prompt_with_empty_glossary_terms(self): """Test that empty glossary terms don't add content to prompt."""