Beispiel #1
0
 def test_feed(self):
     bot = self.callFTU(loop=asyncio.new_event_loop())
     future = bot.feeds.dispatcher.reset()
     bot.feeds.update()
     bot.loop.run_until_complete(future)
     assert future.result() == [
         ('#irc3', '[irc3] coverage https://github.com/gawel/irc3/commit/'
                   'ec82ae2c5f8b2954f0646a2177deb65ad9db712a')]
     bot = self.callFTU(loop=asyncio.new_event_loop())
     future = bot.feeds.dispatcher.reset()
     bot.feeds.update()
     bot.loop.run_until_complete(future)
     assert future.result() == []
Beispiel #2
0
 def test_hooked_feed(self):
     bot = self.callFTU(hook='tests.test_feeds.hook',
                        loop=asyncio.new_event_loop())
     future = bot.feeds.dispatcher.reset()
     bot.feeds.update()
     bot.loop.run_until_complete(future)
     assert future.result() == []