Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit tests #357

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions multiversx_sdk_cli/tests/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,29 @@ def test_get_account():
"https://testnet-api.multiversx.com"
]
)
if not result:
assert True
else:
assert False
assert False if result else True


def test_sync_nonce():
account = Account(address=Address.from_bech32("erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"))
proxy = ProxyNetworkProvider("https://devnet-api.multiversx.com")
account.sync_nonce(proxy)

assert account.nonce >= 11480
assert True if account.nonce else False


def test_query_contract():
result = main(
[
"contract",
"query",
"erd1qqqqqqqqqqqqqpgquykqja5c4v33zdmnwglj3jphqwrelzdn396qlc9g33",
"erd1qqqqqqqqqqqqqpgqpuz9r56ylk39x45cgqmaw2w8hfn47ft3d8ssavktr5",
"--function",
"getSum",
"--proxy",
"https://devnet-api.multiversx.com",
]
)
if not result:
assert True
else:
assert False
assert False if result else True


def test_get_transaction():
Expand All @@ -57,11 +50,7 @@ def test_get_transaction():
"--proxy",
"https://devnet-api.multiversx.com",
"--hash",
"cbe2026b8d9c3ee75f2846ea8e0b646b19e6fca754e43edb4113757fc3350952",
"9e6ca966b18dc0317ff3be9b53be183ddb068a163769d286b2c1b1dff3ac00e5",
]
)

if not result:
assert True
else:
assert False
assert False if result else True
Loading