Example #1
0
 def test_resteem(self):
     bts = self.bts
     c = Comment(self.authorperm, steem_instance=bts)
     tx = c.resteem(account="test")
     self.assertEqual(
         (tx["operations"][0][0]),
         "custom_json"
     )
Example #2
0
def main():
    """
    Checks if post's score has been changed to zero and unvotes it if
    necessary.
    """
    # Get data from both the current sheet and previous one
    previous = previous_reviewed.get_all_values()
    current = current_reviewed.get_all_values()
    reviewed = previous[1:] + current[1:]

    account = Account(ACCOUNT)
    # Resteem all eligible contributions that haven't been resteemed already
    for row in reviewed:
        category = row[4]
        score = float(row[5])
        if "task" in category and score > MINIMUM_SCORE:
            url = row[2]
            post = Comment(url)
            if ACCOUNT not in post.get_reblogged_by():
                post.resteem(account=account)
Example #3
0
 def test_resteem(self):
     bts = self.bts
     bts.txbuffer.clear()
     c = Comment(self.authorperm, blockchain_instance=bts)
     tx = c.resteem(account="test")
     self.assertEqual((tx["operations"][0][0]), "custom_json")