Ejemplo n.º 1
0
     #r = jt_account.add_relations("authorize", test_address)
     logger.info("add_relations test:" + str(r))
     test_account_status = 14
 elif test_account_status == 14:
     #r = jt_account.get_relations(relations_type="authorize", counterparty=test_address, 
     #    currency="USD+"+test_issuer)
     r = jt_account.get_relations(relations_type="authorize")
     logger.info("get_relations test:" + str(r))
     test_account_status = 15
 elif test_account_status == 15:
     # error here
     try:
         r = jt_account.get_counter_relations(test_address, test_secret, "authorize", "USD+"+test_issuer)
         logger.info("get_counter_relations test:" + str(r))
     except Exception, e:
         logger.error("get_counter_relations:" + str(e))       
     test_account_status = 16
 elif test_account_status == 16:
     # error here
     try:
         r = jt_account.delete_relations("authorize", test_address, test_issuer, "USD")
         logger.info("delete_relations test:" + str(r))
     except Exception, e:
         logger.error("delete_relations:" + str(r)) 
     test_account_status = 17
 elif test_account_status == 17:
     r = jt_account.post_trustline(1, "USD", counterparty=test_issuer)
     logger.info("post_trustline test:" + str(r)) 
     test_account_status = 18
 elif test_account_status == 18:
     r = jt_account.get_trustlines()
Ejemplo n.º 2
0
 def get_balances(self, currency=None, counterparty=None):
     _ret_list = []
     try:
         _ret_list = super(JingtumAccount, self).get_balances(currency, counterparty)
     except Exception, e:
         logger.error("get_balances:" + str(e))
Ejemplo n.º 3
0
     r = wallethelper.addRelation("authorize",
                                  test_address,
                                  limit_currency="USD",
                                  limit_issuer=test_issuer,
                                  limit_value=1)
     #r = wallethelper.addRelation("authorize", test_address)
     logger.info("add_relations test:" + str(r))
     time.sleep(8)
     try:
         r = wallethelper.getRelationList(relations_type="authorize",
                                          counterparty=test_address,
                                          currency="USD+" + test_issuer)
         #r = wallethelper.getRelationList()
         logger.info("get_relations test:" + str(r))
     except Exception, e:
         logger.error("get_relations:" + str(e))
     wallethelper.set_wallet_status(11)
 elif wallethelper.get_wallet_status() == 11:
     try:
         r = wallethelper.getCoRelationList(test_address, test_secret,
                                            "authorize",
                                            "USD+" + test_issuer)
         #r = wallethelper.getCoRelationList(test_address, test_secret)
         logger.info("get_counter_relations test:" + str(r))
     except Exception, e:
         logger.error("get_counter_relations:" + str(e))
     try:
         r = wallethelper.removeRelation("authorize", test_address,
                                         test_issuer, "USD", 1000)
         logger.info("delete_relations test:" + str(r))
     except Exception, e: