Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ async def fake_shutdown_chrome():
monkeypatch.setattr(moon_extract, "shutdown_chrome", fake_shutdown_chrome)

for host in (moon_engine, moon_cli):
# Every stub in this loop must cover both moon_engine and moon_cli. Break that and the engine keeps the real function — it will actually try to make network requests, because monkeypatch never replaced its download_file.
monkeypatch.setattr(host, "extract_fuckingfast", fake_ff)
monkeypatch.setattr(host, "extract_datanodes", fake_dn)
monkeypatch.setattr(host, "close_ff_session", lambda: asyncio.sleep(0))
monkeypatch.setattr(moon_cli, "download_file", fake_download)
monkeypatch.setattr(host, "download_file", fake_download)

return calls