refs #740: add Few-shot management tab
This commit is contained in:
@@ -4,7 +4,13 @@ from pathlib import Path
|
||||
import unittest
|
||||
|
||||
from src.poc4.qa_history import evaluate_sql, load_benchmark_questions
|
||||
from src.poc4.qa_history_store import _normalize_oracle_dsn, schema_statements
|
||||
from src.poc4.qa_history_store import (
|
||||
REFERENCE_STATUSES,
|
||||
QaHistoryStoreError,
|
||||
_choice,
|
||||
_normalize_oracle_dsn,
|
||||
schema_statements,
|
||||
)
|
||||
|
||||
|
||||
class QaHistoryTest(unittest.TestCase):
|
||||
@@ -75,6 +81,11 @@ class QaHistoryTest(unittest.TestCase):
|
||||
self.assertIn("CREATE TABLE SG_AI_QA_ANSWER", statements)
|
||||
self.assertIn("answer_seq NUMBER GENERATED ALWAYS AS IDENTITY", statements)
|
||||
|
||||
def test_few_shot_status_is_normalized_and_unknown_status_is_rejected(self) -> None:
|
||||
self.assertEqual("APPROVED", _choice(" approved ", REFERENCE_STATUSES, "검색 상태"))
|
||||
with self.assertRaises(QaHistoryStoreError):
|
||||
_choice("LIVE", REFERENCE_STATUSES, "검색 상태")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user