MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / test_cli_profile_delegates_to_coldstart_agent

Function test_cli_profile_delegates_to_coldstart_agent

tests/test_cli.py:99–144  ·  view source on GitHub ↗
(monkeypatch: pytest.MonkeyPatch)

Source from the content-addressed store, hash-verified

97
98@pytest.mark.unit
99def test_cli_profile_delegates_to_coldstart_agent(monkeypatch: pytest.MonkeyPatch) -> None:
100 captured: dict[str, object] = {}
101
102 def fake_run_python(script: Path, *args: str) -> int:
103 captured["script"] = script
104 captured["args"] = list(args)
105 return 0
106
107 monkeypatch.setattr("paperflow.cli._run_python", fake_run_python)
108
109 result = runner.invoke(
110 app,
111 [
112 "profile",
113 "--user-id",
114 "user_mario",
115 "--natural-language",
116 "scientific agents",
117 "--pdf",
118 "paper-a.pdf",
119 "--pdf",
120 "paper-b.pdf",
121 "--scholar-url",
122 "https://scholar.google.com/citations?user=test",
123 "--homepage-url",
124 "https://example.edu/~mario",
125 "--reset-existing",
126 ],
127 )
128
129 assert result.exit_code == 0
130 assert str(captured["script"]).endswith(str(Path("agents") / "coldstart-agent" / "main.py"))
131 assert captured["args"] == [
132 "--user-id",
133 "user_mario",
134 "--natural-language",
135 "scientific agents",
136 "--pdf",
137 "paper-a.pdf",
138 "paper-b.pdf",
139 "--scholar-url",
140 "https://scholar.google.com/citations?user=test",
141 "--homepage-url",
142 "https://example.edu/~mario",
143 "--reset-existing",
144 ]
145
146
147@pytest.mark.unit

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected