Exemplo n.º 1
0
 def load_alerts(self):
     '''
     NOTE: use refresh() instead of this, if you are just needing to refresh the alerts list
     Gets raw xml (cap) from the Alerts feed, throws it into the parser
     and ends up with a list of alerts object, which it stores to self._alerts
     '''
     self._feed = AlertsFeed(state=self.scope, maxage=self.cachetime)
     parser = CapParser(self._feed.raw_cap(), geo=self.geo)
     self._alerts = parser.get_alerts()
Exemplo n.º 2
0
 def setUp(self):
     self.cf = AlertsFeed(maxage=5)