def start_zone_export(self, context, zone, export): """ :param zone: Zone to be exported :param export: Zone Export object to update :return: None """ return self.executor.run( zonetasks.ExportZone(self.executor, context, zone, export))
def setUp(self): self.zone = mock.Mock(name='example.com.', serial=1) self.export = mock.Mock() self.export.id = '1' self.executor = processing.Executor() self.context = mock.Mock() self.task = zone.ExportZone(self.executor, self.context, self.zone, self.export) self.task._central_api = mock.Mock() self.task._storage = mock.Mock() self.task._quota = mock.Mock() self.task._quota.limit_check = mock.Mock() self.task._storage.count_recordsets = mock.Mock(return_value=1) self.task._synchronous_export = mock.Mock(return_value=True)