Fixed test breaking on Python 2.4 because the repr of KeyError is different there

This commit is contained in:
Ask Solem 2010-11-11 13:08:55 +01:00
parent 0d773e857f
commit 35bc4cdeff
1 changed files with 2 additions and 1 deletions

View File

@ -118,7 +118,8 @@ class test_Mailbox(unittest.TestCase):
raise KeyError("foo")
res = node.dispatch("my_handler_name")
self.assertDictEqual(res, {"error": "KeyError('foo',)"})
self.assertIn("error", res)
self.assertIn("KeyError(", res["error"])
def test_dispatch_replies(self):
_replied = [False]