-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: create_vesting_account is not tested (#648)
* add create_vesting_account test * more var for end_time * add end_time param
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import time | ||
|
||
|
||
def test_create_account(cronos): | ||
""" | ||
test create vesting account tx works: | ||
""" | ||
cli = cronos.cosmos_cli() | ||
src = "vesting" | ||
addr = cli.create_account(src)["address"] | ||
denom = "basetcro" | ||
balance = cli.balance(addr, denom) | ||
assert balance == 0 | ||
amount = 10000 | ||
fee = 4000000000000000 | ||
amt = f"{amount}{denom}" | ||
end_time = int(time.time()) + 3000 | ||
fees = f"{fee}{denom}" | ||
res = cli.create_vesting_account(addr, amt, end_time, from_="validator", fees=fees) | ||
assert res["code"] == 0, res["raw_log"] | ||
balance = cli.balance(addr, denom) | ||
assert balance == amount |