1
0

tests: add unittest for Abstract_Wallet.export_history_to_file

Adds unittest for Abstract_Wallet.export_history_to_file that
compares the output against reference files. This
should help to prevent regressions and ensure the layout
of the export stays static over time.
This commit is contained in:
f321x
2026-01-28 12:46:52 +01:00
parent e1dac558dd
commit a6a57f0fec
8 changed files with 1955 additions and 6 deletions

View File

@@ -591,8 +591,7 @@ class TestCommandsTestnet(ElectrumTestCase):
@mock.patch.object(storage.WalletStorage, 'append')
async def test_onchain_history(self, *mock_args):
cmds = Commands(config=self.config, daemon=self.daemon)
WALLET_FILES_DIR = os.path.join(os.path.dirname(__file__), "test_storage_upgrade")
wallet_path = os.path.join(WALLET_FILES_DIR, "client_3_3_8_xpub_with_realistic_history")
wallet_path = self.get_wallet_file_path("client_3_3_8_xpub_with_realistic_history")
await cmds.load_wallet(wallet_path=wallet_path)
expected_last_history_item = {