[Zope-Checkins] SVN: Zope/trunk/src/App/tests/test_ApplicationManager.py Whitespace for clarity.
Tres Seaver
tseaver at palladion.com
Wed Apr 7 21:22:36 EDT 2010
Log message for revision 110626:
Whitespace for clarity.
Changed:
U Zope/trunk/src/App/tests/test_ApplicationManager.py
-=-
Modified: Zope/trunk/src/App/tests/test_ApplicationManager.py
===================================================================
--- Zope/trunk/src/App/tests/test_ApplicationManager.py 2010-04-08 01:21:39 UTC (rev 110625)
+++ Zope/trunk/src/App/tests/test_ApplicationManager.py 2010-04-08 01:22:36 UTC (rev 110626)
@@ -464,24 +464,30 @@
def test_getServers(self):
from asyncore import socket_map
+
class DummySocketServer:
def __init__(self, port):
self.port = port
+
class AnotherSocketServer(DummySocketServer):
pass
+
class NotAServer:
pass
+
am = self._makeOne()
_old_socket_map = socket_map.copy()
socket_map.clear()
socket_map['foo'] = DummySocketServer(45)
socket_map['bar'] = AnotherSocketServer(57)
socket_map['qux'] = NotAServer()
+
try:
pairs = am.getServers()
finally:
socket_map.clear()
socket_map.update(_old_socket_map)
+
self.assertEqual(len(pairs), 2)
self.failUnless((str(DummySocketServer), 'Port: 45') in pairs)
self.failUnless((str(AnotherSocketServer), 'Port: 57') in pairs)
More information about the Zope-Checkins
mailing list