示例#1
0
    def test_account_change_representative_empty(self):
        account = Account(**ACCOUNT_KWARGS)

        account.change_representative(ACCOUNT_ID_B)

        # Changing the representative on an empty account doesn't
        # create a new block
        assert len(account.blocks) == 0
        assert account.representative == ACCOUNT_ID_B
示例#2
0
    def test_account_change_representative_invalid_account_id(self):
        account = Account(**ACCOUNT_KWARGS)

        with pytest.raises(InvalidAccount):
            account.change_representative("invalid")