def setUpClass(cls): nodelist = NodeList() nodelist.update_nodes(dpay_instance=DPay(node=nodelist.get_nodes(normal=True, appbase=True), num_retries=10)) cls.bts = DPay( node=nodelist.get_nodes(appbase=False), use_condenser=True, nobroadcast=True, unsigned=True, keys={"active": wif}, num_retries=10 ) cls.appbase = DPay( node=nodelist.get_nodes(normal=False, appbase=True), nobroadcast=True, unsigned=True, keys={"active": wif}, num_retries=10 ) acc = Account("holger80", dpay_instance=cls.bts) comment = acc.get_feed(limit=20)[-1] cls.authorperm = comment.authorperm [author, permlink] = resolve_authorperm(cls.authorperm) cls.author = author cls.permlink = permlink cls.category = comment.category cls.title = comment.title
def setUpClass(cls): nodelist = NodeList() nodelist.update_nodes(dpay_instance=DPay(node=nodelist.get_nodes( normal=True, appbase=True), num_retries=10)) cls.bts = DPay(node=nodelist.get_nodes(appbase=False), nobroadcast=True, keys={"active": wif}, num_retries=10) cls.appbase = DPay(node=nodelist.get_nodes(normal=False, appbase=True), nobroadcast=True, keys={"active": wif}, num_retries=10) # from getpass import getpass # self.bts.wallet.unlock(getpass()) set_shared_dpay_instance(cls.bts) cls.bts.set_default_account("test") acc = Account("holger80", dpay_instance=cls.bts) n_votes = 0 index = 0 while n_votes == 0: comment = acc.get_feed(limit=30)[::-1][index] votes = comment.get_votes() n_votes = len(votes) index += 1 last_vote = votes[0] cls.authorpermvoter = construct_authorpermvoter( last_vote['author'], last_vote['permlink'], last_vote["voter"]) [author, permlink, voter] = resolve_authorpermvoter(cls.authorpermvoter) cls.author = author cls.permlink = permlink cls.voter = voter cls.authorperm = construct_authorperm(author, permlink)