def get_events():
    '''
    Combines the events output of all the event scrapers.

    Returns:
        events (list): a list of dicts, with each dict representing a single event.
    '''
    event_sources = [ans, arlington, aws, casey_trees, city_blossoms, dc_audubon,
                     eleventh_street, fairfax, fona, friends_of_kenilworth_gardens, montgomery,
                     nova_parks, nps, potomac_conservancy, rcc, riverkeeper, sierra_club_md, sierra_club, \
                     tnc, us_botanic_garden, vnps, nva_audubon_society]
    events = []
    for event_source in event_sources:
        try:
            source_events = event_source.main()
        except Exception as e:
            logger.critical(f'Exception getting events in {event_source.__name__}:  {e}',
                            exc_info=True)
            continue
        unicoded_source_events = [{k: formatters.unicoder(v) for k,v in i.items()} for i in source_events]
        for i, event in enumerate(unicoded_source_events):
            try:
                schema_test([event])
            except Exception as e:
                logger.error(f'Exception getting events in {event_source.__name__}:  {e}',
                             exc_info=True)
                unicoded_source_events.pop(i)
        events.extend(unicoded_source_events)

    return events
 def test_unicoder_accents(self):
     result = unicoder('áéíóúüñ¿¡')
     expected = 'áéíóúüñ¿¡'
     self.assertEqual(result, expected)
 def test_unicoder_quotes(self):
     result = unicoder('“')
     expected = '“'
     self.assertEqual(result, expected)
 def test_unicoder_empty(self):
     result = unicoder('Â')
     expected = ""
     self.assertEqual(result, expected)
 def test_unicoder_dash(self):
     result = unicoder('Earth Day – Monday Mini Camp')
     expected = "Earth Day – Monday Mini Camp"
     self.assertEqual(result, expected)
 def test_unicoder_apostrophe(self):
     result = unicoder('We’ll')
     expected = "We’ll"
     self.assertEqual(result, expected)
 def test_unicoder(self):
     result = unicoder('test')
     expected = 'test'
     self.assertEqual(result, expected)