예제 #1
0
    def setUpClass(cls):
        cls.nodelist = NodeList()
        cls.nodelist.update_nodes(dpay_instance=DPay(
            node=cls.nodelist.get_nodes(normal=True, appbase=True),
            num_retries=10))
        stm = DPay(node=cls.nodelist.get_nodes())
        stm.config.refreshBackup()
        stm.set_default_nodes(["xyz"])
        del stm

        cls.urls = cls.nodelist.get_nodes()
        cls.bts = DPay(node=cls.urls, nobroadcast=True, num_retries=10)
        set_shared_dpay_instance(cls.bts)
        acc = Account("holger80", dpay_instance=cls.bts)
        comment = acc.get_blog(limit=20)[-1]
        cls.authorperm = comment.authorperm
        votes = acc.get_account_votes()
        last_vote = votes[-1]
        cls.authorpermvoter = '@' + last_vote['authorperm'] + '|' + acc["name"]
 # has_voted()
 print("dpaygo_acc.has_voted()  {}".format(
     dpaygo_acc.has_voted("@jared/api-methods-list-for-appbase")))
 print("dpay_acc.has_voted() {}".format(
     dpay_acc.has_voted(dpayPost("@jared/api-methods-list-for-appbase"))))
 # curation_stats()
 print("dpaygo_acc.curation_stats()  {}".format(
     dpaygo_acc.curation_stats()))
 print("dpay_acc.curation_stats() {}".format(dpay_acc.curation_stats()))
 # virtual_op_count
 print("dpaygo_acc.virtual_op_count()  {}".format(
     dpaygo_acc.virtual_op_count()))
 print("dpay_acc.virtual_op_count() {}".format(dpay_acc.virtual_op_count()))
 # get_account_votes
 print("dpaygo_acc.get_account_votes()  {}".format(
     dpaygo_acc.get_account_votes()))
 print("dpay_acc.get_account_votes() {}".format(
     dpay_acc.get_account_votes()))
 # get_withdraw_routes
 print("dpaygo_acc.get_withdraw_routes()  {}".format(
     dpaygo_acc.get_withdraw_routes()))
 print("dpay_acc.get_withdraw_routes() {}".format(
     dpay_acc.get_withdraw_routes()))
 # get_conversion_requests
 print("dpaygo_acc.get_conversion_requests()  {}".format(
     dpaygo_acc.get_conversion_requests()))
 print("dpay_acc.get_conversion_requests() {}".format(
     dpay_acc.get_conversion_requests()))
 # export
 # history
 dpaygo_hist = []