diff --git a/tests/test_pair_endpoint.py b/tests/test_pair_endpoint.py index 0d50d95..745bbfe 100644 --- a/tests/test_pair_endpoint.py +++ b/tests/test_pair_endpoint.py @@ -66,7 +66,9 @@ def _wire(monkeypatch, *, pair="ok"): async def fake_owned(machine_id, user_id): return _machine() - async def fake_pair(machine, *, relays, admin_client, duration_hours=None): + async def fake_pair( + machine, *, relays, admin_client, bunker_relay=None, duration_hours=None + ): if pair == "error": raise PairingError("boom") return _result() @@ -80,11 +82,18 @@ def _wire(monkeypatch, *, pair="ok"): state["persisted"] = (machine_id, machine_npub, bunker_spire_key_name) return _machine(npub=machine_npub) + # After pairing, the endpoint reads super_config to publish fee config + # (soft-fail tail). None short-circuits it — the happy-path assertions + # don't exercise fee publishing, and it keeps the test off the DB. + async def fake_super_config(): + return None + monkeypatch.setattr(views_api, "_machine_owned_by", fake_owned) monkeypatch.setattr(views_api, "NsecBunkerAdminClient", _FakeAdmin) monkeypatch.setattr(views_api, "pair_spire", fake_pair) monkeypatch.setattr(views_api, "_assert_no_pubkey_collision", fake_collision) monkeypatch.setattr(views_api, "set_machine_pairing", fake_persist) + monkeypatch.setattr(views_api, "get_super_config", fake_super_config) return state