Example #1
0
 def test_TransactionConstructor(self):
     stm = self.bts
     opTransfer = Transfer(**{"from": "beem",
                              "to": "beem1",
                              "amount": Amount("1 STEEM", steem_instance=stm),
                              "memo": ""})
     tx1 = TransactionBuilder(use_condenser_api=True, steem_instance=stm)
     tx1.appendOps(opTransfer)
     tx = TransactionBuilder(tx1, steem_instance=stm)
     self.assertFalse(tx.is_empty())
     self.assertTrue(len(tx.list_operations()) == 1)
     self.assertTrue(repr(tx) is not None)
     self.assertTrue(str(tx) is not None)
     account = Account("beem", steem_instance=stm)
     tx.appendSigner(account, "active")
     self.assertTrue(len(tx.wifs) > 0)
     tx.sign()
     self.assertTrue(len(tx["signatures"]) > 0)
Example #2
0
 def test_TransactionConstructor(self, node_param):
     if node_param == "non_appbase":
         stm = self.stm
     else:
         stm = self.appbase
     opTransfer = Transfer(
         **{
             "from": "test",
             "to": "test1",
             "amount": Amount("1 STEEM", steem_instance=stm),
             "memo": ""
         })
     tx1 = TransactionBuilder(steem_instance=stm)
     tx1.appendOps(opTransfer)
     tx = TransactionBuilder(tx1, steem_instance=stm)
     self.assertFalse(tx.is_empty())
     self.assertTrue(len(tx.list_operations()) == 1)
     self.assertTrue(repr(tx) is not None)
     self.assertTrue(str(tx) is not None)
     account = Account("test", steem_instance=stm)
     tx.appendSigner(account, "active")
     self.assertTrue(len(tx.wifs) > 0)
     tx.sign()
     self.assertTrue(len(tx["signatures"]) > 0)