Native Patreon ingester + download-engine ownership (plans #697, #703–#708) #72
@@ -84,6 +84,11 @@ def _make_fake_dl_result(
|
|||||||
def _fake_gdl_with_result(result):
|
def _fake_gdl_with_result(result):
|
||||||
fake = MagicMock()
|
fake = MagicMock()
|
||||||
fake.download = AsyncMock(return_value=result)
|
fake.download = AsyncMock(return_value=result)
|
||||||
|
# Real values for the attrs _run_patreon_ingester reads off the gdl service
|
||||||
|
# (the native pacing config, plan #703) — a MagicMock would break the
|
||||||
|
# arithmetic (max(0.5, rate_limit/4)).
|
||||||
|
fake._rate_limit = 3.0
|
||||||
|
fake._validate_files = True
|
||||||
fake._compute_run_stats = lambda *a, **k: {
|
fake._compute_run_stats = lambda *a, **k: {
|
||||||
"exit_code": 0, "downloaded_count": len(result.written_paths),
|
"exit_code": 0, "downloaded_count": len(result.written_paths),
|
||||||
"skipped_count": 0, "per_item_failures": 0,
|
"skipped_count": 0, "per_item_failures": 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user