[perf] Faster require invoice key (#3603)

This commit is contained in:
Vlad Stan 2025-12-05 10:03:51 +02:00 committed by GitHub
parent d9b045c526
commit 850087a8ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 175 additions and 40 deletions

View file

@ -5,7 +5,7 @@ import pytest
from loguru import logger
from pytest_mock.plugin import MockerFixture
from lnbits.core.models import BaseWallet
from lnbits.core.models import WalletInfo
from tests.wallets.fixtures.models import DataObject
from tests.wallets.fixtures.models import Mock as RpcMock
from tests.wallets.helpers import (
@ -91,7 +91,7 @@ def _check_calls(expected_calls):
func_call["spy"].assert_called_with(*args, **kwargs)
def _spy_mocks(mocker: MockerFixture, test_data: WalletTest, wallet: BaseWallet):
def _spy_mocks(mocker: MockerFixture, test_data: WalletTest, wallet: WalletInfo):
expected_calls: dict[str, list] = {}
for mock in test_data.mocks:
client_field = getattr(wallet, mock.name)