Example #1
0
    def setUp(self):
        super(API_FunctionalTest, self).setUp()

        self.addCleanup(set_config, {}, overwrite=True)

        cfg.CONF.register_opts(app.common_opts)

        self.CONF = self.useFixture(fixture_config.Config()).conf

        self.CONF.set_override('auth_strategy', 'noauth')
        self.CONF.set_override('trio2o_db_connection', 'sqlite:///:memory:')

        core.initialize()
        core.ModelBase.metadata.create_all(core.get_engine())

        self.context = context.get_admin_context()

        self.app = self._make_app()
Example #2
0
 def setUp(self):
     core.initialize()
     core.ModelBase.metadata.create_all(core.get_engine())
     self.controller = pod.PodsController()
     self.context = context.get_admin_context()
Example #3
0
 def setUp(self):
     core.initialize()
     core.ModelBase.metadata.create_all(core.get_engine())
     self.context = context.get_admin_context()
     self.project_id = 'test_project'
     self.controller = action.ActionController(self.project_id, '')
Example #4
0
 def periodic_tasks(self, raise_on_error=False):
     """Tasks to be run at a periodic interval."""
     ctxt = context.get_admin_context()
     return self.manager.periodic_tasks(ctxt, raise_on_error=raise_on_error)
Example #5
0
 def setUp(self):
     core.initialize()
     core.ModelBase.metadata.create_all(core.get_engine())
     self.context = context.get_admin_context()
     self.project_id = 'test_project'
     self.controller = volume_type.VolumeTypeController(self.project_id)