forked from bitshares/python-bitshares
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_connection.py
More file actions
44 lines (33 loc) · 1.06 KB
/
test_connection.py
File metadata and controls
44 lines (33 loc) · 1.06 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
import unittest
from bitshares import BitShares
from bitshares.asset import Asset
from bitshares.instance import set_shared_bitshares_instance, SharedInstance
from bitshares.blockchainobject import BlockchainObject
import logging
log = logging.getLogger()
class Testcases(unittest.TestCase):
def test_bts1bts2(self):
b1 = BitShares(
"wss://node.testnet.bitshares.eu",
nobroadcast=True,
)
b2 = BitShares(
"wss://node.bitshares.eu",
nobroadcast=True,
)
self.assertNotEqual(b1.rpc.url, b2.rpc.url)
def test_default_connection(self):
b1 = BitShares(
"wss://node.testnet.bitshares.eu",
nobroadcast=True,
)
set_shared_bitshares_instance(b1)
test = Asset("1.3.0")
b2 = BitShares(
"wss://node.bitshares.eu",
nobroadcast=True,
)
set_shared_bitshares_instance(b2)
bts = Asset("1.3.0")
self.assertEqual(test["symbol"], "TEST")
self.assertEqual(bts["symbol"], "BTS")