fn assert_create_poll_result(
    poll_id: u64,
    end_time: u64,
    creator: &str,
    handle_res: HandleResponse,
    deps: &mut Extern<MockStorage, MockApi, WasmMockQuerier>,
) {
    assert_eq!(
        handle_res.log,
        vec![
            log("action", "create_poll"),
            log("creator", creator),
            log("poll_id", poll_id.to_string()),
            log("end_time", end_time.to_string()),
        ]
    );

    //confirm poll count
    let state: State = state_read(&mut deps.storage).load().unwrap();
    assert_eq!(
        state,
        State {
            contract_addr: deps
                .api
                .canonical_address(&HumanAddr::from(MOCK_CONTRACT_ADDR))
                .unwrap(),
            poll_count: 1,
            total_share: Uint128::zero(),
            total_deposit: Uint128(DEFAULT_PROPOSAL_DEPOSIT),
            pending_voting_rewards: Uint128::zero(),
        }
    );
}
// helper to confirm the expected create_poll response
helper to confirm the expected create_poll response
helper to confirm the expected create_poll response
fn assert_create_poll_result(
    poll_id: u64,
    end_time: u64,
    creator: &str,
    handle_res: HandleResponse,
    deps: &mut Extern<MockStorage, MockApi, WasmMockQuerier>,
) {
    assert_eq!(
        handle_res.log,
        vec![
            log("action", "create_poll"),
            log("creator", creator),
            log("poll_id", poll_id.to_string()),
            log("end_time", end_time.to_string()),
        ]
    );
    //confirm poll count
    let state: State = state_read(&mut deps.storage).load().unwrap();
    assert_eq!(
        state,
        State {
            contract_addr: deps
                .api
                .canonical_address(&HumanAddr::from(MOCK_CONTRACT_ADDR))
                .unwrap(),
            poll_count: 1,
            total_share: Uint128::zero(),
            total_deposit: Uint128(DEFAULT_PROPOSAL_DEPOSIT),
            pending_voting_rewards: Uint128::zero(),
        }
    );
}
fn assert_create_poll_result ( poll_id : u64 , end_time : u64 , creator : & str , handle_res : HandleResponse , deps : & mut Extern < MockStorage , MockApi , WasmMockQuerier > , ) { assert_eq ! ( handle_res log vec [ log ( " " " " ) log ( " " creator ) log ( " " poll_id to_string ( ) ) log ( " " end_time to_string ( ) ) ] ) ; //confirm poll count let state : State = state_read ( & mut deps . storage ) . load ( ) . unwrap ( ) ; assert_eq ! ( state State { contract_addr deps api canonical_address ( HumanAddr from ( MOCK_CONTRACT_ADDR ) ) unwrap ( ) poll_count 1 total_share Uint128 zero ( ) total_deposit Uint128 ( DEFAULT_PROPOSAL_DEPOSIT ) pending_voting_rewards Uint128 zero ( ) } ) ; }
helper to confirm the expected create_poll response
helper to confirm the expected create_poll response
poll_id
u64
end_time
u64
creator
&str
handle_res
HandleResponse
deps
&mut Extern<MockStorage, MockApi, WasmMockQuerier>