'receiver': pd[0], 'start_date': start_date, 'end_date': end_date, 'daily_pay': pd[3] } proposals.append(proposal) import datetime test_start_date = now + datetime.timedelta(days=1) test_start_date_iso = test_utils.date_to_iso(test_start_date) test_end_date = test_start_date + datetime.timedelta(days=4, hours=1) test_end_date_iso = test_utils.date_to_iso(test_end_date) test_utils.create_proposals(node_client, proposals) # list proposals with inactive status, it shoud be list of pairs id:total_votes test_utils.list_proposals(node_client, test_start_date_iso, "inactive") # each account is voting on proposal test_utils.vote_proposals(node_client, accounts) # list proposals with inactive status, it shoud be list of pairs id:total_votes votes = test_utils.list_proposals(node_client, test_start_date_iso, "inactive") for vote in votes: #should be 0 for all assert vote == 0, "All votes should be equal to 0"
] for pd in proposal_data: start_date, end_date = test_utils.get_start_and_end_date(now, pd[1], pd[2]) proposal = {'creator' : pd[0], 'receiver' : pd[0], 'start_date' : start_date, 'end_date' : end_date, 'daily_pay' : pd[3]} proposals.append(proposal) import datetime test_start_date = now + datetime.timedelta(days = 1) test_start_date_iso = test_utils.date_to_iso(test_start_date) test_end_date = test_start_date + datetime.timedelta(days = 6, hours = 1) test_end_date_iso = test_utils.date_to_iso(test_end_date) test_utils.create_proposals(node_client, proposals) # list proposals with inactive status, it shoud be list of pairs id:total_votes test_utils.list_proposals(node_client, test_start_date_iso, "inactive") # each account is voting on proposal test_utils.vote_proposals(node_client, accounts) # list proposals with inactive status, it shoud be list of pairs id:total_votes votes = test_utils.list_proposals(node_client, test_start_date_iso, "inactive") for vote in votes: #should be 0 for all assert vote == 0, "All votes should be equal to 0" logger.info("Balances for accounts after creating proposals") balances = test_utils.print_balance(node_client, accounts)