Beispiel #1
0
    def test_accountupdate(self):
        from bitshares.account import AccountUpdate
        t = {'id': '2.6.29',
             'lifetime_fees_paid': '44261516129',
             'most_recent_op': '2.9.0',
             'owner': '1.2.29',
             'pending_fees': 0,
             'pending_vested_fees': 16310,
             'total_core_in_orders': '6788845277634',
             'total_ops': 0}
        update = AccountUpdate(t)
        self.assertEqual(update["owner"], "1.2.29")
        self.assertIsInstance(update.account, Account)
        update.__repr__()

        update = AccountUpdate("committee-account")
        self.assertEqual(update["owner"], "1.2.0")
        self.assertIsInstance(update.account, Account)
        update.__repr__()
Beispiel #2
0
    def test_accountupdate(self):
        from bitshares.account import AccountUpdate

        t = {
            "id": "2.6.29",
            "lifetime_fees_paid": "44261516129",
            "most_recent_op": "2.9.0",
            "owner": "1.2.100",
            "pending_fees": 0,
            "pending_vested_fees": 16310,
            "total_core_in_orders": "6788845277634",
            "total_ops": 0,
        }
        update = AccountUpdate(t)
        self.assertEqual(update["owner"], "1.2.100")
        self.assertIsInstance(update.account, Account)
        update.__repr__()

        update = AccountUpdate("committee-account")
        self.assertEqual(update["owner"], "1.2.0")
        self.assertIsInstance(update.account, Account)
        update.__repr__()
Beispiel #3
0
 def process_account(self, message):
     """ This is used for processing of account Updates. It will
         return instances of :class:bitshares.account.AccountUpdate`
     """
     self.on_account(
         AccountUpdate(message, bitshares_instance=self.bitshares))