Exemple #1
0
    def setUp(self):
        super(CellsTest, self).setUp()
        self.stubs.Set(db, 'cell_get', fake_db_cell_get)
        self.stubs.Set(db, 'cell_get_all', fake_db_cell_get_all)
        self.stubs.Set(db, 'cell_update', fake_db_cell_update)
        self.stubs.Set(db, 'cell_create', fake_db_cell_create)
        self.stubs.Set(cells_rpcapi.CellsAPI, 'get_cell_info_for_neighbors',
                       fake_cells_api_get_all_cell_info)

        self.controller = cells_ext.Controller()
        self.context = context.get_admin_context()
Exemple #2
0
    def setUp(self):
        super(CellsTest, self).setUp()
        self.stubs.Set(db, 'cell_get', fake_db_cell_get)
        self.stubs.Set(db, 'cell_get_all', fake_db_cell_get_all)
        self.stubs.Set(db, 'cell_update', fake_db_cell_update)
        self.stubs.Set(db, 'cell_create', fake_db_cell_create)
        self.stubs.Set(cells_rpcapi.CellsAPI, 'get_cell_info_for_neighbors',
                       fake_cells_api_get_all_cell_info)

        self.ext_mgr = self.mox.CreateMock(extensions.ExtensionManager)
        self.controller = cells_ext.Controller(self.ext_mgr)
        self.context = context.get_admin_context()
Exemple #3
0
 def setUp(self):
     super(CellsTest, self).setUp()
     self.ext_mgr = self.mox.CreateMock(extensions.ExtensionManager)
     self.controller = cells_ext.Controller(self.ext_mgr)
     self.context = context.get_admin_context()
Exemple #4
0
 def _get_cell_controller(self, ext_mgr):
     return cells_ext_v2.Controller(ext_mgr)