[Zope-Checkins] CVS: Zope3/lib/python/Zope/Server - PublisherServers.py:1.1.2.7

Martijn Pieters mj@zope.com
Wed, 28 Nov 2001 18:18:43 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Server
In directory cvs.zope.org:/tmp/cvs-serv7747/lib/python/Zope/Server

Modified Files:
      Tag: Zope-3x-branch
	PublisherServers.py 
Log Message:
- Clear out sys.setcheckinterval
- Clear out testing code from PublisherServers
- Provide unit tests for PublisherServers


=== Zope3/lib/python/Zope/Server/PublisherServers.py 1.1.2.6 => 1.1.2.7 ===
         http_server.__init__(self, *args, **kw)
 
-        
-if __name__ == '__main__':
-    from Zope.Publisher.HTTP.BrowserPayload import BrowserRequestPayload, \
-         BrowserResponsePayload
-    from Zope.Publisher.DefaultPublication import DefaultPublication
-
-    class c:
-        " "
-        def __call__(self, URL):
-            return 'You invoked URL %s just now.\n' % URL
-
-    ob = c()
-    ob.x = c()
-    ob.x.y = c()
-
-    pub = DefaultPublication(ob)
-    request_payload = BrowserRequestPayload(pub)
-    response_payload = BrowserResponsePayload()
-
-    from TaskThreads import ThreadedTaskDispatcher
-    tasks = ThreadedTaskDispatcher()
-    tasks.setThreadCount(4)
-    PublisherHTTPServer(request_payload, response_payload,
-                        '', 8080, tasks=tasks)
-    try:
-        import asyncore
-        asyncore.loop()
-    except KeyboardInterrupt:
-        print 'shutting down...'
-        tasks.shutdown()