Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Nov 24, 2023
1 parent c505cc2 commit e178290
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_wallet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copy
import shutil
from pathlib import Path
from typing import List, Union
Expand Down Expand Up @@ -114,6 +115,20 @@ async def test_get_keyset(wallet1: Wallet):
assert len(keys1.public_keys) == len(keys2.public_keys)


@pytest.mark.asyncio
async def test_get_keyset_from_db(wallet1: Wallet):
# first load it from the mint
# await wallet1._load_mint_keys()
# NOTE: conftest already called wallet.load_mint() which got the keys from the mint

# then load it from the db
keyset1 = copy.copy(wallet1.keysets[wallet1.keyset_id])
await wallet1._load_mint_keys()
keyset2 = copy.copy(wallet1.keysets[wallet1.keyset_id])
assert keyset1.public_keys == keyset2.public_keys
assert keyset1.id == keyset2.id


@pytest.mark.asyncio
async def test_get_info(wallet1: Wallet):
info = await wallet1._get_info(wallet1.url)
Expand Down

0 comments on commit e178290

Please sign in to comment.