Wallet: Fix cli mpp off (#741)

* fix

* tests
This commit is contained in:
callebtc
2025-05-08 18:01:11 +02:00
committed by GitHub
parent 7a18ac8712
commit dc1dccb5e8
2 changed files with 22 additions and 1 deletions

View File

@@ -9,7 +9,13 @@ from cashu.core.base import TokenV4
from cashu.core.settings import settings
from cashu.wallet.cli.cli import cli
from cashu.wallet.wallet import Wallet
from tests.helpers import is_deprecated_api_only, is_fake, is_regtest, pay_if_regtest
from tests.helpers import (
get_real_invoice,
is_deprecated_api_only,
is_fake,
is_regtest,
pay_if_regtest,
)
@pytest.fixture(autouse=True, scope="session")
@@ -113,6 +119,20 @@ def test_balance(cli_prefix):
assert result.exit_code == 0
@pytest.mark.skipif(is_fake, reason="only works with FakeWallet")
def test_pay_invoice_regtest(mint, cli_prefix):
invoice_dict = get_real_invoice(10)
invoice_payment_request = invoice_dict["payment_request"]
runner = CliRunner()
result = runner.invoke(
cli,
[*cli_prefix, "pay", invoice_payment_request, "-y"],
)
assert result.exception is None
print("PAY INVOICE")
print(result.output)
@pytest.mark.skipif(is_regtest, reason="only works with FakeWallet")
def test_invoice(mint, cli_prefix):
if settings.debug_mint_only_deprecated: