def setUp(self): super(MigrateServerTests, self).setUp() self.controller = migrate_server.MigrateServerController() self.compute_api = self.controller.compute_api def _fake_controller(*args, **kwargs): return self.controller self.stubs.Set(migrate_server, 'MigrateServerController', _fake_controller) self.app = fakes.wsgi_app_v3(init_only=('servers', 'os-migrate-server'), fake_auth_context=self.context) self.mox.StubOutWithMock(self.compute_api, 'get')
def setUp(self): super(MigrateServerPolicyEnforcementV21, self).setUp() self.controller = migrate_server_v21.MigrateServerController() self.req = fakes.HTTPRequest.blank('')