From 814e1c41c75e11c87b66fd7b8f410ac1b789aa82 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 3 Jul 2026 08:09:57 +0000 Subject: [PATCH] Add missing opportunity scoring tier test coverage (supersedes #7) Adds Quick Win and Full Integration tier tests for score_opportunity, originally proposed in PR #7 which was blocked by a merge conflict against main. This branch re-applies the same two tests cleanly on top of current main and imports ClientIntake to build fixtures directly. Verified: pytest -q -> 131 passed, 14 skipped (no regressions). Agent-Logs-Url: https://github.com/mdvnavy/Dia/sessions/a37077d2-cec6-48ce-aea8-9fc121c06536 Co-authored-by: mdvnavy <218024324+mdvnavy@users.noreply.github.com> --- tests/test_core.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/test_core.py b/tests/test_core.py index ab7604f..fe004b0 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -23,6 +23,9 @@ ) +from client_discovery.models import ClientIntake + + FIXTURES = Path(__file__).parent / "fixtures" @@ -82,6 +85,24 @@ def test_generate_documents_returns_public_safe_markdown_outputs(): assert "billin" not in combined.lower() +def test_score_opportunity_quick_win_tier(): + intake = ClientIntake(pain_points=["pain1"], tools="") + score = score_opportunity(intake) + assert score.tier == "Quick Win" + assert score.price_range == "$500-$2,500" + + +def test_score_opportunity_full_integration_tier(): + intake = ClientIntake( + pain_points=["p1", "p2", "p3", "p4"], + goals=["g1", "g2", "g3", "g4"], + tools="Some Tool" + ) + score = score_opportunity(intake) + assert score.tier == "Full Integration" + assert score.price_range == "$10,000-$25,000" + + def test_refine_with_jules_success(): env = {"JULES_API_KEY": "valid_key"} with patch.dict(os.environ, env), patch("requests.post") as mock_post: