def go(): print "Igniting Twisted reactor..." view.commit() Utility.initTwisted() Utility.initWakeup(view) print "...ready"
def go(port=None): print "Igniting Twisted reactor..." if view.isNew(): view.commit() if port is not None: Globals.options.webserver = [str(port)] else: if Globals.options.webserver is None: Globals.options.webserver = [] Utility.initTwisted(view, options=Globals.options) Utility.initWakeup(view) print "...ready"
def RemoteFeed(self): view = self.view Utility.initTwisted(view) url = u"http://blog.chandlerproject.org/rss2" url = str(url) view.refresh(notify=False) channel = FeedChannel(itsView=view) channel.displayName = url channel.url = channel.getAttributeAspect("url", "type").makeValue(url) view.commit() # Make the channel available to feedsView status = blockUntil(channel.refresh) view.refresh() # Only bother checking if the fetch was successful. If there is a # timeout or other network problem, that shouldn"t fail the test. if status == FETCH_UPDATED: self.assertEqual(channel.displayName, u"The Chandler Project Blog")