def setUp(self):
    self.delegate = Delegate()
    super(self.__class__,self).setUp()
    self.runLoop = RunLoop.currentRunLoop()

    # Wire URLProtocol
    URLHTTPProtocol.run_loop = RunLoop
    URLHTTPProtocol.assembled()
    URLProtocol.registerClass(URLHTTPProtocol)
    URLConnection.URLProtocol = URLProtocol
    URLCache.assembled()
    URLConnection.URLCache = URLCache
    URLConnection.runLoop = RunLoop
        
    # Wire RunLoop
    ls = LogService()
    ls.useStreamHandler(sys.stderr)
    RunLoop.log = ls.__binding__('RunLoop', RunLoop)
示例#2
0
  def setUp(self):
    super(self.__class__,self).setUp()
    self.runLoop = RunLoop.currentRunLoop()
    # Wire URLHTTPProtocol
    URLHTTPProtocol.LRProtocol = LineReceiverProtocol
    URLHTTPProtocol.portFactory = Port

    # Wire URLProtocol
    URLProtocol.registerClass(URLDataProtocol)
    URLProtocol.registerClass(URLHTTPProtocol)
    
    # Wire URLConnection
    URLConnection.URLProtocol = URLProtocol
    URLConnection.runLoop = RunLoop
    URLConnection.URLRequest = URLRequest
      
    # Wire RunLoop
    ls = LogService()
    ls.useStreamHandler(sys.stderr)
    RunLoop.log = ls.__binding__('RunLoop', RunLoop)
    XMLSchemaService.URLConnection = URLConnection
    
    self.XMLSchemaService = XMLSchemaService
    self.schema = None