1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
mod commands;
pub mod contract;
pub mod error;
mod queries;
mod validation;
mod versioning;

#[cfg(test)]
mod test_common {
    use crate::contract::ManagerResult;
    use abstract_core::{
        manager,
        objects::{account::AccountTrace, gov_type::GovernanceDetails, AccountId},
    };
    use abstract_testing::prelude::*;
    use cosmwasm_std::{testing::*, DepsMut};

    /// Initialize the manager with the test owner as the owner
    pub(crate) fn mock_init(mut deps: DepsMut) -> ManagerResult {
        let info = mock_info(TEST_ACCOUNT_FACTORY, &[]);

        crate::contract::instantiate(
            deps.branch(),
            mock_env(),
            info,
            manager::InstantiateMsg {
                account_id: AccountId::new(1, AccountTrace::Local).unwrap(),
                owner: GovernanceDetails::Monarchy {
                    monarch: OWNER.to_string(),
                },
                version_control_address: TEST_VERSION_CONTROL.to_string(),
                module_factory_address: TEST_MODULE_FACTORY.to_string(),
                proxy_addr: TEST_PROXY.to_string(),
                name: "test".to_string(),
                description: None,
                link: None,
                install_modules: vec![],
            },
        )
    }
}