fn whitelist_works() {
        let member = Addr::unchecked("member");
        let member2 = Addr::unchecked("member2");
        let non_member = Addr::unchecked("nonmember");

        let whitelist_addr = Addr::unchecked("whitelist");

        let querier = GroupQuerier::new(&whitelist_addr, &[(&member, 10), (&member2, 0)]);

        // set our local data
        let api = MockApi::default();
        let mut storage = MockStorage::new();
        WHITELIST
            .save(&mut storage, &Tg4Contract(whitelist_addr))
            .unwrap();
        let deps = Deps {
            storage: &storage,
            api: &api,
            querier: QuerierWrapper::new(&querier),
        };

        // sender whitelisted regardless of weight
        verify_sender_on_whitelist(deps, &member).unwrap();
        verify_sender_on_whitelist(deps, &member2).unwrap();
        let err = verify_sender_on_whitelist(deps, &non_member).unwrap_err();
        assert_eq!(err, ContractError::Unauthorized {});

        verify_sender_and_addresses_on_whitelist(deps, &member, &[member2.as_str()]).unwrap();
    }
// a version of multitest::whitelist_works that doesn't need multitest, App or suite
a version of multitest::whitelist_works that doesn't need multitest, App or suite
a version of multitest :: whitelist_works that doesn ' t need multitest App or suite
fn whitelist_works() {
        let member = Addr::unchecked("member");
        let member2 = Addr::unchecked("member2");
        let non_member = Addr::unchecked("nonmember");
        let whitelist_addr = Addr::unchecked("whitelist");
        let querier = GroupQuerier::new(&whitelist_addr, &[(&member, 10), (&member2, 0)]);
        // set our local data
        let api = MockApi::default();
        let mut storage = MockStorage::new();
        WHITELIST
            .save(&mut storage, &Tg4Contract(whitelist_addr))
            .unwrap();
        let deps = Deps {
            storage: &storage,
            api: &api,
            querier: QuerierWrapper::new(&querier),
        };
        // sender whitelisted regardless of weight
        verify_sender_on_whitelist(deps, &member).unwrap();
        verify_sender_on_whitelist(deps, &member2).unwrap();
        let err = verify_sender_on_whitelist(deps, &non_member).unwrap_err();
        assert_eq!(err, ContractError::Unauthorized {});
        verify_sender_and_addresses_on_whitelist(deps, &member, &[member2.as_str()]).unwrap();
    }
fn whitelist_works ( ) { let member = Addr :: unchecked ( " " ) ; let member2 = Addr :: unchecked ( " " ) ; let non_member = Addr :: unchecked ( " " ) ; let whitelist_addr = Addr :: unchecked ( " " ) ; let querier = GroupQuerier :: new ( & whitelist_addr , & [ ( & member , 10 ) , ( & member2 , 0 ) ] ) ; // set our local data let api = MockApi :: default ( ) ; let mut storage = MockStorage :: new ( ) ; WHITELIST . save ( & mut storage , & Tg4Contract ( whitelist_addr ) ) . unwrap ( ) ; let deps = Deps { storage : & storage , api : & api , querier : QuerierWrapper :: new ( & querier ) , } ; // sender whitelisted regardless of weight verify_sender_on_whitelist ( deps , & member ) . unwrap ( ) ; verify_sender_on_whitelist ( deps , & member2 ) . unwrap ( ) ; let err = verify_sender_on_whitelist ( deps , & non_member ) . unwrap_err ( ) ; assert_eq ! ( err ContractError Unauthorized { } ) ; verify_sender_and_addresses_on_whitelist ( deps , & member , & [ member2 . as_str ( ) ] ) . unwrap ( ) ; }
a version of multitest::whitelist_works that doesn't need multitest, App or suite
a version of multitest :: whitelist_works that doesn ' t need multitest App or suite