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)
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)