From f6108195f1923e8b0d73cc4a03fb191c230ab2c9 Mon Sep 17 00:00:00 2001 From: aakrem Date: Sun, 19 May 2024 13:25:47 +0200 Subject: [PATCH] fix backend tests --- .../variants_main_router/test_variant_evaluators_router.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agenta-backend/agenta_backend/tests/variants_main_router/test_variant_evaluators_router.py b/agenta-backend/agenta_backend/tests/variants_main_router/test_variant_evaluators_router.py index e45b17fbda..87c3f6f2ca 100644 --- a/agenta-backend/agenta_backend/tests/variants_main_router/test_variant_evaluators_router.py +++ b/agenta-backend/agenta_backend/tests/variants_main_router/test_variant_evaluators_router.py @@ -59,6 +59,7 @@ async def test_create_auto_exact_match_evaluator_config( app = await AppDB.find_one(AppDB.app_name == APP_NAME) payload = auto_exact_match_evaluator_config payload["app_id"] = str(app.id) + payload["settings_values"]["correct_answer_keys"] = ["correct_answer"] response = await test_client.post( f"{BACKEND_API_HOST}/evaluators/configs/", json=payload, timeout=timeout @@ -75,6 +76,7 @@ async def test_create_auto_similarity_match_evaluator_config( app = await AppDB.find_one(AppDB.app_name == APP_NAME) payload = auto_similarity_match_evaluator_config payload["app_id"] = str(app.id) + payload["settings_values"]["correct_answer_keys"] = ["correct_answer"] response = await test_client.post( f"{BACKEND_API_HOST}/evaluators/configs/", json=payload, timeout=timeout @@ -92,6 +94,7 @@ async def test_create_auto_regex_test_evaluator_config( payload = auto_regex_test_evaluator_config payload["app_id"] = str(app.id) payload["settings_values"]["regex_pattern"] = "^ig\\d{3}$" + payload["settings_values"]["correct_answer_keys"] = ["correct_answer"] response = await test_client.post( f"{BACKEND_API_HOST}/evaluators/configs/", json=payload, timeout=timeout @@ -108,6 +111,7 @@ async def test_create_auto_webhook_test_evaluator_config( app = await AppDB.find_one(AppDB.app_name == APP_NAME) payload = auto_webhook_test_evaluator_config payload["app_id"] = str(app.id) + payload["settings_values"]["correct_answer_keys"] = ["correct_answer"] response = await test_client.post( f"{BACKEND_API_HOST}/evaluators/configs/", json=payload, timeout=timeout @@ -124,6 +128,7 @@ async def test_create_auto_ai_critique_evaluator_config( app = await AppDB.find_one(AppDB.app_name == APP_NAME) payload = auto_ai_critique_evaluator_config payload["app_id"] = str(app.id) + payload["settings_values"]["correct_answer_keys"] = ["correct_answer"] response = await test_client.post( f"{BACKEND_API_HOST}/evaluators/configs/", json=payload, timeout=timeout