def get_one_event_id(self, **kargs): summary = kargs['summary'] kargs.pop('summary') report_res = self.report_event(**kargs) event_id_list = utils.getEventIDBySummary(summary, report_res) if len(event_id_list) == 0: raise Exception('Can not find any event with summary(%s), when get one event id.'%summary) return event_id_list[0]
def get_one_event_id(self, **kargs): summary = kargs['summary'] kargs.pop('summary') report_res = self.report_event(**kargs) event_id_list = utils.getEventIDBySummary(summary, report_res) if len(event_id_list) == 0: raise Exception( 'Can not find any event with summary(%s), when get one event id.' % summary) return event_id_list[0]
def get_a_diff_event_id(self, **kargs): summary = kargs['summary'] kargs.pop('summary') event_id = kargs['event_id'] kargs.pop('event_id') report_res = self.report_event(**kargs) event_id_list = utils.getEventIDBySummary(summary, report_res) if len(event_id_list) == 0: raise Exception('Can not find any event with summary(%s), when get one event id.'%summary) for id in event_id_list: if id != event_id: return id raise Exception('Can not find any different event id!')
def get_a_diff_event_id(self, **kargs): summary = kargs['summary'] kargs.pop('summary') event_id = kargs['event_id'] kargs.pop('event_id') report_res = self.report_event(**kargs) event_id_list = utils.getEventIDBySummary(summary, report_res) if len(event_id_list) == 0: raise Exception( 'Can not find any event with summary(%s), when get one event id.' % summary) for id in event_id_list: if id != event_id: return id raise Exception('Can not find any different event id!')
def get_event_id_by_summary(self, **kargs): report_res = self.report_event(**kargs) summary = kargs['summary'] event_id_list = utils.getEventIDBySummary(summary, report_res) return event_id_list