Prepare first GitHub push: readiness, security and Linear-first setup

This commit is contained in:
bruno cesar
2026-02-27 00:28:58 -03:00
parent 8da8067173
commit 51928dd572
47 changed files with 1148 additions and 468 deletions

View File

@@ -59,6 +59,23 @@ async def test_run_unknown_pattern_returns_empty() -> None:
assert result == []
@pytest.mark.anyio
async def test_run_pattern_forwards_include_probable_parameter() -> None:
mock_record = MagicMock()
mock_record.__iter__ = lambda self: iter(["pattern_id"])
mock_record.__getitem__ = lambda self, key: {"pattern_id": "debtor_contracts"}[key]
session = AsyncMock()
with patch("icarus.services.pattern_service.execute_query", new_callable=AsyncMock) as mock_eq:
mock_eq.return_value = [mock_record]
await run_pattern(session, "debtor_contracts", include_probable=True)
mock_eq.assert_awaited_once()
_session, _query_name, params = mock_eq.await_args.args[:3]
assert params["include_probable"] is True
@pytest.mark.anyio
async def test_debtor_contracts_returns_results() -> None:
mock_record = MagicMock()