server/test/unittest_datafeed.py
changeset 7386 206890413858
parent 6957 ffda12be2e9f
child 7543 570522300e22
equal deleted inserted replaced
7385:29f050e39b09 7386:206890413858
    37         self.assertEqual(dfsource.synchro_interval, timedelta(seconds=60))
    37         self.assertEqual(dfsource.synchro_interval, timedelta(seconds=60))
    38         self.assertFalse(dfsource.fresh())
    38         self.assertFalse(dfsource.fresh())
    39 
    39 
    40         class AParser(datafeed.DataFeedParser):
    40         class AParser(datafeed.DataFeedParser):
    41             __regid__ = 'testparser'
    41             __regid__ = 'testparser'
    42             def process(self, url):
    42             def process(self, url, raise_on_error=False):
    43                 entity = self.extid2entity('http://www.cubicweb.org/', 'Card',
    43                 entity = self.extid2entity('http://www.cubicweb.org/', 'Card',
    44                                   item={'title': u'cubicweb.org',
    44                                   item={'title': u'cubicweb.org',
    45                                         'content': u'the cw web site'})
    45                                         'content': u'the cw web site'})
    46                 if not self.created_during_pull(entity):
    46                 if not self.created_during_pull(entity):
    47                     self.notify_updated(entity)
    47                     self.notify_updated(entity)