Завершить аудит и подготовить AI Lead Processor к публикации

This commit is contained in:
Stvponya committed 2026-11-11 17:15:52 +03:00
1 parent 634490174f
commit be36989483
14 files changed
+330 -135

No files matched your search

+4 -1
View File
@@ -5,7 +5,9 @@ from streamlit.testing.v1 import AppTest
def test_manager_reviews_and_saves(tmp_path, monkeypatch):
monkeypatch.setenv("LEADS_FILE", str(tmp_path / "leads.xlsx"))
app = AppTest.from_file(str(Path(__file__).resolve().parents[1] / "app.py"), default_timeout=30).run()
app = AppTest.from_file(
str(Path(__file__).resolve().parents[1] / "app.py"), default_timeout=30
).run()
app.radio(key="mode").set_value("DEMO").run()
app.button(key="process").click().run()
assert app.error
@@ -17,6 +19,7 @@ def test_manager_reviews_and_saves(tmp_path, monkeypatch):
app.button(key="save").click().run()
assert not app.exception
from src.storage import snapshot
rows, content = snapshot(tmp_path / "leads.xlsx")
assert rows[0]["Категория"] == "Не срочно"
assert rows[0]["Черновик ответа"] == "Уточните модель машины."