wallet: mint specific amounts (#121)

* wallet: mint specific amounts

* make format
This commit is contained in:
calle
2023-03-04 21:49:39 +01:00
committed by GitHub
parent 2d66aeb79c
commit 23f2b58430
3 changed files with 66 additions and 9 deletions

View File

@@ -85,6 +85,23 @@ async def test_mint(wallet1: Wallet):
assert wallet1.balance == 64
@pytest.mark.asyncio
async def test_mint_amounts(wallet1: Wallet):
"""Mint predefined amounts"""
await wallet1.mint_amounts([1, 1, 1, 2, 2, 4, 16])
assert wallet1.balance == 27
assert wallet1.proof_amounts == [1, 1, 1, 2, 2, 4, 16]
@pytest.mark.asyncio
async def test_mint_amounts_wrong_order(wallet1: Wallet):
"""Mint amount that is not part in 2^n"""
await assert_err(
wallet1.mint_amounts([1, 2, 3]),
f"Can only mint amounts with 2^n up to {2**MAX_ORDER}.",
)
@pytest.mark.asyncio
async def test_split(wallet1: Wallet):
await wallet1.mint(64)