def test_showtimelist(self): query = Query() query.city = u'59000' query.categories = [CATEGORIES.CINE] query.start_date = datetime.now() l = self.backend.search_events(query) assert len(l) e = l[0] self.backend.fillobj(e, 'description') self.assertTrue(e.description, 'Description of "%s" not found' % (e.id)) e = self.backend.get_event(e.id) self.assertTrue(e.description, 'Description of "%s" not found' % (e.id))
def _fetch_objects(self, objs): objects = [] collections = [] split_path = self.working_path.get() try: if len(split_path) == 0: for category in CATEGORIES.values: collection = Collection([category], category) collection.backend = u'boobcoming' collections.append(collection) elif len(split_path) == 1 and split_path[0] in CATEGORIES.values: query = Query() query.categories = split_path query.start_date = datetime.combine(parse_date('today'), time.min) query.end_date = parse_date('') query.city = '' for backend, event in self.do('search_events', query): if event: objects.append(event) except CallErrors as errors: self.bcall_errors_handler(errors, CollectionNotFound) return (objects, collections)
def test_sueurdemetal_nocategory(self): q = Query() q.categories = [CATEGORIES.CINE] self.assertTrue(len(list(self.backend.search_events(q))) == 0)