-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name="pytoniq", | ||
version="0.1.39", | ||
version="0.1.40", | ||
author="Maksim Kurbatov", | ||
author_email="[email protected]", | ||
description="TON Blockchain SDK", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from unittest.mock import Mock | ||
|
||
import pytest | ||
import random | ||
|
||
import pytest_asyncio | ||
|
||
from pytoniq import BaseWallet, WalletV3R1, WalletV3R2, WalletV4R2 | ||
|
||
|
||
@pytest_asyncio.fixture | ||
async def client(): | ||
c = Mock() | ||
|
||
async def raw_get_account_state(*args, **kwargs): | ||
return None, None | ||
|
||
c.raw_get_account_state = raw_get_account_state | ||
return c | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_wallets(client): | ||
m0, w0 = await BaseWallet.create(client, version='v3r1') | ||
m1, w1 = await WalletV3R2.create(client) | ||
m2, w2 = await WalletV4R2.create(client) | ||
w3 = await WalletV3R2.from_mnemonic(client, mnemonics=m1) | ||
w4 = await WalletV4R2.from_mnemonic(client, mnemonics=m2) | ||
w5 = await BaseWallet.from_mnemonic(client, mnemonics=m0, version='v3r1') | ||
w6 = await WalletV3R1.from_mnemonic(client, mnemonics=m0) | ||
|
||
assert w0.address == w5.address == w6.address | ||
assert w1.address == w3.address | ||
assert w2.address == w4.address |