SVN: ZODB/branches/jim-thready/src/ZEO/tests/ Update tests for api changes.

Jim Fulton <[email protected]>
Newsgroups gmane.comp.python.zope.zodb.cvs
Message-ID <[email protected]>
Log message for revision 108482:
  Update tests for api changes.
  

Changed:
  U   ZODB/branches/jim-thready/src/ZEO/tests/servertesting.py
  U   ZODB/branches/jim-thready/src/ZEO/tests/testZEO.py

-=-
Modified: ZODB/branches/jim-thready/src/ZEO/tests/servertesting.py
===================================================================
--- ZODB/branches/jim-thready/src/ZEO/tests/servertesting.py	2010-01-25 16:03:07 UTC (rev 108481)
+++ ZODB/branches/jim-thready/src/ZEO/tests/servertesting.py	2010-01-25 16:03:08 UTC (rev 108482)
@@ -61,8 +61,8 @@
     def trigger(self):
         return self
 
-    def pull_trigger(self, func):
-        func()
+    def pull_trigger(self, func, *args):
+        func(*args)
 
     def auth_done(self):
         pass

Modified: ZODB/branches/jim-thready/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/branches/jim-thready/src/ZEO/tests/testZEO.py	2010-01-25 16:03:07 UTC (rev 108481)
+++ ZODB/branches/jim-thready/src/ZEO/tests/testZEO.py	2010-01-25 16:03:08 UTC (rev 108482)
@@ -787,7 +787,7 @@
         self.server.tpc_begin(id(transaction), '', '', {}, None, ' ')
 
     def tpc_vote(self, transaction):
-        self.server.vote(id(transaction))
+        assert self.server.vote(id(transaction)) is None
         result = self.server.client.serials[:]
         del self.server.client.serials[:]
         return result
@@ -796,7 +796,8 @@
         self.server.storea(oid, serial, data, id(transaction))
 
     def tpc_finish(self, transaction, func = lambda: None):
-        self.server.tpc_finish(id(transaction))
+        self.server.tpc_finish(id(transaction)).set_sender(
+            0, (lambda msgid, ret: None), None)
 
 
 def multiple_storages_invalidation_queue_is_not_insane():
@@ -963,7 +964,7 @@
     ...     def close(self):
     ...         print 'connection closed'
     ...     trigger = property(lambda self: self)
-    ...     pull_trigger = lambda self, func: func()
+    ...     pull_trigger = lambda self, func, *args: func(*args)
 
     >>> class ConnectionManager:
     ...     def __init__(self, addr, client, tmin, tmax):
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.