-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount_test.py
23 lines (18 loc) · 1.05 KB
/
account_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from autotx.auth.account import Account
import unittest
class TestAccount(unittest.TestCase):
def setUp(self):
account = Account('hsn1', '12345678', 'local', '0', '14', 'hsn1p8hqjcsxat30zgllpdkvgtutctrhun70uv9ts0', 'hsnpub1addwnpepqvfe59jmpyjqxjkez68gh3f60utmljpzhfm29af9z98n758zpqns7m4aj02')
account.setCoins([{'denom': 'hsn', 'amount': '100000'}])
self.account = account
def test_account(self):
self.assertEqual(self.account.getName(), 'hsn1')
self.assertEqual(self.account.getPassword(), '12345678')
self.assertEqual(self.account.getAccNum(), '0')
self.assertEqual(self.account.getSequence(), '14')
self.assertEqual(self.account.getAddress(), 'hsn1p8hqjcsxat30zgllpdkvgtutctrhun70uv9ts0')
self.assertEqual(self.account.getAccType(), 'local')
self.assertEqual(self.account.getPubkey(), 'hsnpub1addwnpepqvfe59jmpyjqxjkez68gh3f60utmljpzhfm29af9z98n758zpqns7m4aj02')
self.assertEqual((self.account.getCoins())['hsn'], '100000')
if __name__ == '__main__':
unittest.main()