fix(tests): update glossary service tests for dict return type
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled

This commit is contained in:
2026-06-14 19:49:21 +02:00
parent 233a054e34
commit a20ebe2295

View File

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