mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-01-02 08:24:29 +01:00
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user