forked from bitshares/python-bitshares
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_fee.py
More file actions
27 lines (21 loc) · 889 Bytes
/
test_fee.py
File metadata and controls
27 lines (21 loc) · 889 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
import unittest
from pprint import pprint
from bitshares import BitShares
from bitshares.instance import set_shared_blockchain_instance
wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
class Testcases(unittest.TestCase):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.bts = BitShares(
nobroadcast=True,
# We want to bundle many operations into a single transaction
bundle=True,
# Overwrite wallet to use this list of wifs only
wif=[wif]
)
set_shared_blockchain_instance(self.bts)
self.bts.set_default_account("init0")
def test_fee_on_transfer(self):
tx = self.bts.transfer("init1", 1, "1.3.0", account="init0", fee_asset="1.3.121")
op = tx["operations"][0][1]
self.assertEqual(op["fee"]["asset_id"], "1.3.121")