예제 #1
0
    def setUp(self):
        super(LockServerTests, self).setUp()
        self.controller = lock_server.LockServerController()
        self.compute_api = self.controller.compute_api

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

        self.stubs.Set(lock_server, 'LockServerController', _fake_controller)
        self.app = fakes.wsgi_app_v3(init_only=('servers', 'os-lock-server'),
                                     fake_auth_context=self.context)
        self.mox.StubOutWithMock(self.compute_api, 'get')
예제 #2
0
 def setUp(self):
     super(LockServerPolicyEnforcementV21, self).setUp()
     self.controller = lock_server_v21.LockServerController()
     self.req = fakes.HTTPRequest.blank('')