From a5e3b98c90ae58522c1b46d0d1ba3a999e6b7d35 Mon Sep 17 00:00:00 2001 From: Brooks Roley Date: Tue, 15 Sep 2026 19:26:47 -0700 Subject: [PATCH] test(costar): drop patches for removed get_settings #48 (CoStar tests) patched app.costar.router.get_settings, but #49 removed that dead call. Both merged together, leaving main red. Remove the now-obsolete patches; analyze tests no longer need them. 430 passed. Claude-Session: https://claude.ai/code/session_01XQWPWCsbSJKJVqbgNtXbcs --- server/tests/test_costar_connector.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/server/tests/test_costar_connector.py b/server/tests/test_costar_connector.py index bb3bcc6..0d3db5c 100644 --- a/server/tests/test_costar_connector.py +++ b/server/tests/test_costar_connector.py @@ -230,21 +230,17 @@ def test_happy_path_returns_distilled_profile(self): # ── GET /costar/analyze ─────────────────────────────────────────────────────── -# NOTE: costar_analyze calls get_settings() but never uses the result — dead code -# that requires env vars in any environment. Patch it so tests don't need real secrets. class TestCoStarAnalyzeEndpoint: def test_404_when_no_row(self): conn = FakeConn() - with patch("app.costar.router.get_conn", make_get_conn(conn)), \ - patch("app.costar.router.get_settings", return_value=MagicMock()): + with patch("app.costar.router.get_conn", make_get_conn(conn)): r = TestClient(_make_app(), raise_server_exceptions=False).get("/api/costar/analyze") assert r.status_code == 404 def test_404_when_data_null(self): conn = FakeConn(fetchrow_results=[{"costar_data": None}]) - with patch("app.costar.router.get_conn", make_get_conn(conn)), \ - patch("app.costar.router.get_settings", return_value=MagicMock()): + with patch("app.costar.router.get_conn", make_get_conn(conn)): r = TestClient(_make_app(), raise_server_exceptions=False).get("/api/costar/analyze") assert r.status_code == 404 @@ -257,7 +253,6 @@ def test_200_with_mocked_narrative(self): } conn = FakeConn(fetchrow_results=[{"costar_data": json.dumps(profile)}]) with patch("app.costar.router.get_conn", make_get_conn(conn)), \ - patch("app.costar.router.get_settings", return_value=MagicMock()), \ patch( "app.costar.router.chat_completion", new=AsyncMock(return_value="Your water-dominant chart reveals deep intuition."),