Ejemplo n.º 1
0
    def setUp(self):
        super(SuspendServerTests, self).setUp()
        self.controller = suspend_server.SuspendServerController()
        self.compute_api = self.controller.compute_api

        def _fake_controller(*args, **kwargs):
            return self.controller

        self.stubs.Set(suspend_server, 'SuspendServerController',
                       _fake_controller)
        self.app = fakes.wsgi_app_v3(init_only=('servers',
                                                'os-suspend-server'),
                                     fake_auth_context=self.context)
        self.mox.StubOutWithMock(self.compute_api, 'get')
Ejemplo n.º 2
0
 def setUp(self):
     super(SuspendServerPolicyEnforcementV21, self).setUp()
     self.controller = suspend_server_v21.SuspendServerController()
     self.req = fakes.HTTPRequest.blank('')