def setUp(self): super(CreateBackupTests, self).setUp() self.controller = create_backup.CreateBackupController() self.compute_api = self.controller.compute_api def _fake_controller(*args, **kwargs): return self.controller self.stubs.Set(create_backup, 'CreateBackupController', _fake_controller) self.app = fakes.wsgi_app_v3(init_only=('servers', 'os-create-backup'), fake_auth_context=self.context) self.mox.StubOutWithMock(self.compute_api, 'get') self.mox.StubOutWithMock(common, 'check_img_metadata_properties_quota') self.mox.StubOutWithMock(self.compute_api, 'backup')
def setUp(self): super(CreateBackupPolicyEnforcementv21, self).setUp() self.controller = create_backup_v21.CreateBackupController() self.req = fakes.HTTPRequest.blank('')