示例#1
0
 def setUp(self):
     super(HostTestCase, self).setUp()
     self.controller = os_hosts.HostController()
     self.req = FakeRequest()
     self.stubs.Set(db, 'service_get_all',
                    stub_service_get_all)
     self.stubs.Set(timeutils, 'utcnow', stub_utcnow)
示例#2
0
 def setUp(self):
     super(HostTestCase, self).setUp()
     self.controller = os_hosts.HostController()
     self.req = FakeRequest()
     self.patch('cinder.db.service_get_all', autospec=True,
                return_value=SERVICE_LIST)
     self.mock_object(timeutils, 'utcnow', stub_utcnow)