-def test_refresh_legacy_command(mock_run_legacy, temp_db, command, params):
+def test_refresh_legacy_command(monkeypatch, temp_db, command, params):
+ mock_run_legacy = MockParamCapture()
+ monkeypatch.setattr(nominatim.clicmd.refresh, 'run_legacy_script', mock_run_legacy)
+