Commit b5ae1d93 authored by Jim Fulton's avatar Jim Fulton

Made a test more flexible to unrelated logging changes.

parent 543f233b
...@@ -486,14 +486,18 @@ class ZRPCConnectionTests(ZEO.tests.ConnectionTests.CommonSetupTearDown): ...@@ -486,14 +486,18 @@ class ZRPCConnectionTests(ZEO.tests.ConnectionTests.CommonSetupTearDown):
# logged # logged
self._storage._connection.handle_request('foo',0,'history',(1,2,3,4)) self._storage._connection.handle_request('foo',0,'history',(1,2,3,4))
# test logging # test logging
level,message,kw = log[1]
self.assertEqual(level,logging.ERROR) for level, message, kw in log:
self.failUnless(message.endswith( if message.endswith(
') history() raised exception: history() takes at' ') history() raised exception: history() takes at'
' most 3 arguments (5 given)' ' most 3 arguments (5 given)'
)) ):
self.assertEqual(kw,{'exc_info':True}) self.assertEqual(level,logging.ERROR)
self.assertEqual(kw,{'exc_info':True})
break
else:
self.fail("error not in log")
# cleanup # cleanup
del conn.logger.log del conn.logger.log
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment