def calendar_long_name(): return CalendarSyncResponse([], [ Calendar( name= 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris_!', uid='long_calendar_uid', read_only=True) ])
def calendar_response(): return CalendarSyncResponse([], [ Calendar(name='Important Meetings', uid='first_calendar_uid', read_only=False), Calendar(name='Nefarious Schemes', uid='second_calendar_uid', read_only=False), ])
def calendar_response_with_update(): return CalendarSyncResponse( [], [ Calendar( name="Super Important Meetings", uid="first_calendar_uid", read_only=False, ) ], )
def calendar_response(): return CalendarSyncResponse( [], [ Calendar(name="Important Meetings", uid="first_calendar_uid", read_only=False), Calendar(name="Nefarious Schemes", uid="second_calendar_uid", read_only=False), ], )
def sync_calendars(self): """ Fetches data for the user's calendars. Returns ------- CalendarSyncResponse """ deletes = [] updates = [] items = self._get_raw_calendars() for item in items: if item.get('deleted'): deletes.append(item['id']) else: updates.append(parse_calendar_response(item)) return CalendarSyncResponse(deletes, updates)
def sync_calendars(self): """ Fetches data for the user's calendars. Returns ------- CalendarSyncResponse """ deletes = [] updates = [] items = self._get_raw_calendars() for item in items: if item.get("deleted"): deletes.append(item["id"]) else: cal = parse_calendar_response(item) self.calendars_table[item["id"]] = cal.read_only updates.append(cal) return CalendarSyncResponse(deletes, updates)
def calendar_response_with_update(): return CalendarSyncResponse([], [ Calendar(name='Super Important Meetings', uid='first_calendar_uid', read_only=False) ])