示例#1
0
    def test_TR_IN_002_TR_IN_003(self, no_vp_proposal, clients_verifier):
        pip = no_vp_proposal
        submitcvpandvote(clients_verifier, 1, 1, 1, 2)
        proposalinfo_cancel = pip.get_effect_proposal_info_of_vote(
            pip.cfg.cancel_proposal)
        log.info('Cancel proposal information {}'.format(proposalinfo_cancel))
        proposalinfo_version = pip.get_effect_proposal_info_of_vote(
            pip.cfg.version_proposal)
        log.info(
            'Version proposal information {}'.format(proposalinfo_version))
        wait_block_number(pip.node, proposalinfo_version.get('EndVotingBlock'))
        assert pip.get_canceledby_of_proposal(
            proposalinfo_cancel.get('ProposalID')) == cancelby
        assert pip.get_status_of_proposal(
            proposalinfo_cancel.get('ProposalID')) == 2
        assert pip.get_yeas_of_proposal(
            proposalinfo_cancel.get('ProposalID')) == 3
        assert pip.get_nays_of_proposal(
            proposalinfo_cancel.get('ProposalID')) == 1
        assert pip.get_abstentions_of_proposal(
            proposalinfo_cancel.get('ProposalID')) == 0
        assert pip.get_accu_verifiers_of_proposal(
            proposalinfo_cancel.get('ProposalID')) == len(clients_verifier)

        assert pip.get_canceledby_of_proposal(
            proposalinfo_version.get('ProposalID')) == proposalinfo_cancel.get(
                'ProposalID')
        assert pip.get_status_of_proposal(
            proposalinfo_version.get('ProposalID')) == 6
        assert pip.get_yeas_of_proposal(
            proposalinfo_version.get('ProposalID')) == 0
        assert pip.get_nays_of_proposal(
            proposalinfo_version.get('ProposalID')) == 0
        assert pip.get_abstentions_of_proposal(
            proposalinfo_version.get('ProposalID')) == 0
        assert pip.get_accu_verifiers_of_proposal(
            proposalinfo_version.get('ProposalID')) == len(clients_verifier)
示例#2
0
 def test_UP_CA_007(self, new_genesis_env, clients_consensus):
     update_setting_rate(new_genesis_env, 4, 3320, 7500)
     submitcvpandvote(clients_consensus[:3], 1, 2, 3)
     verify_proposal_status(clients_consensus, proposaltype=4, status=3)