Пример #1
0
 def setUpClass(cls):
     config.init_conf(package='spaceone.identity')
     config.set_service_config()
     config.set_global(MOCK_MODE=True)
     connect('test', host='mongomock://localhost')
     cls.domain_id = utils.generate_id('domain')
     cls.transaction = Transaction({
         'service': 'identity',
         'api_class': 'Provider'
     })
     super().setUpClass()
Пример #2
0
    def setUpClass(cls):
        config.init_conf(package='spaceone.repository')
        config.set_service_config()
        config.set_global(MOCK_MODE=True)
        connect('test', host='mongomock://localhost')

        cls.repository_vo = RepositoryFactory(repository_type='local')
        cls.repository_id = cls.repository_vo.repository_id
        cls.domain_id = utils.generate_id('domain')
        cls.transaction = Transaction({
            'service': 'repository',
            'api_class': 'Schema'
        })
        super().setUpClass()
Пример #3
0
    def setUpClass(cls):
        config.init_conf(package='spaceone.monitoring')
        config.set_service_config()
        config.set_global(MOCK_MODE=True)
        config_path = os.environ.get('TEST_CONFIG')
        test_config = utils.load_yaml_from_file(config_path)

        cls.transaction = Transaction(
            {'token': test_config.get('access_token')})

        cls.domain_id = test_config.get('domain_id')
        cls.connector_conf = test_config.get('SecretConnector')
        cls.secret_connector = SecretConnector(cls.transaction,
                                               cls.connector_conf)
        super().setUpClass()