Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Oct 5, 2023
1 parent 4b4d79c commit d30e9c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/test_mint_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async def test_info(ledger):

@pytest.mark.asyncio
async def test_api_keys(ledger):
response = requests.get(f"{BASE_URL}/keys")
response = requests.get(f"{BASE_URL}/v1/keys")
assert response.status_code == 200, f"{response.url} {response.status_code}"
assert response.json()["keysets"][0]["keys"] == {
str(k): v.serialize().hex() for k, v in ledger.keyset.public_keys.items()
Expand All @@ -24,14 +24,14 @@ async def test_api_keys(ledger):

@pytest.mark.asyncio
async def test_api_keysets(ledger):
response = requests.get(f"{BASE_URL}/keysets")
response = requests.get(f"{BASE_URL}/v1/keysets")
assert response.status_code == 200, f"{response.url} {response.status_code}"
assert response.json()["keysets"][0]["id"] == list(ledger.keysets.keysets.keys())[0]


@pytest.mark.asyncio
async def test_api_keyset_keys(ledger):
response = requests.get(f"{BASE_URL}/keys/d5c08d2006765ffc")
response = requests.get(f"{BASE_URL}/v1/keys/d5c08d2006765ffc")
assert response.status_code == 200, f"{response.url} {response.status_code}"
assert response.json()["keysets"][0]["keys"] == {
str(k): v.serialize().hex() for k, v in ledger.keyset.public_keys.items()
Expand Down
8 changes: 4 additions & 4 deletions tests/test_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ async def test_get_nonexistent_keyset(wallet1: Wallet):

@pytest.mark.asyncio
async def test_get_keyset_ids(wallet1: Wallet):
keyset = await wallet1._get_keyset_ids(wallet1.url)
assert isinstance(keyset, list)
assert len(keyset) > 0
assert keyset[-1] == wallet1.keyset_id
keysets = await wallet1._get_keyset_ids(wallet1.url)
assert isinstance(keysets, list)
assert len(keysets) > 0
assert wallet1.keyset_id in keysets


@pytest.mark.asyncio
Expand Down

0 comments on commit d30e9c4

Please sign in to comment.