diff --git a/tests/regtest/helpers.py b/tests/regtest/helpers.py index 7b12a2e5b..c60a139e6 100644 --- a/tests/regtest/helpers.py +++ b/tests/regtest/helpers.py @@ -9,8 +9,15 @@ from loguru import logger from lnbits.wallets import get_funding_source funding_source = get_funding_source() -is_boltz_wallet = funding_source.__class__.__name__ == "BoltzWallet" -print("### is_boltz_wallet", is_boltz_wallet, funding_source.__class__.__name__) + + +def is_boltz_wallet(): + print( + "### funding_source.__class__.__name__", + funding_source.__class__.__name__, + ) + return funding_source.__class__.__name__ == "BoltzWallet" + docker_lightning_cli = [ "docker", diff --git a/tests/regtest/test_services_create_invoice.py b/tests/regtest/test_services_create_invoice.py index 417fddbe3..4714fe8b9 100644 --- a/tests/regtest/test_services_create_invoice.py +++ b/tests/regtest/test_services_create_invoice.py @@ -22,12 +22,7 @@ async def test_create_invoice(from_wallet): # we cannot know the preimage of the swap yet funding_source = get_funding_source() - print( - "### funding_source.__class__.__name__", - is_boltz_wallet, - funding_source.__class__.__name__, - ) - if not is_boltz_wallet: + if not is_boltz_wallet(): assert payment.preimage invoice = decode(payment.bolt11) @@ -49,12 +44,7 @@ async def test_create_internal_invoice(from_wallet): # we cannot know the preimage of the swap yet funding_source = get_funding_source() - print( - "### funding_source.__class__.__name__", - is_boltz_wallet, - funding_source.__class__.__name__, - ) - if not is_boltz_wallet: + if not is_boltz_wallet(): assert payment.preimage invoice = decode(payment.bolt11) diff --git a/tests/regtest/test_services_pay_invoice.py b/tests/regtest/test_services_pay_invoice.py index ebc485edb..2da97c2ee 100644 --- a/tests/regtest/test_services_pay_invoice.py +++ b/tests/regtest/test_services_pay_invoice.py @@ -20,7 +20,7 @@ async def test_services_pay_invoice(to_wallet, real_invoice): ) assert payment assert payment.memo == description - if not is_boltz_wallet: + if not is_boltz_wallet(): assert payment.status == PaymentState.SUCCESS assert payment.preimage else: