forked from Moondex/python-bitshares
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_base_objects.py
More file actions
31 lines (24 loc) · 874 Bytes
/
Copy pathtest_base_objects.py
File metadata and controls
31 lines (24 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import unittest
from bitshares import BitShares, exceptions
from bitshares.instance import set_shared_bitshares_instance
from bitshares.account import Account
from bitshares.committee import Committee
class Testcases(unittest.TestCase):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.bts = BitShares(
nobroadcast=True,
)
set_shared_bitshares_instance(self.bts)
def test_Committee(self):
with self.assertRaises(
exceptions.AccountDoesNotExistsException
):
Committee("FOObarNonExisting")
c = Committee("init0")
self.assertEqual(c["id"], "1.5.0")
self.assertIsInstance(c.account, Account)
with self.assertRaises(
exceptions.CommitteeMemberDoesNotExistsException
):
Committee("nathan")