Saggi Mizrahi has uploaded a new change for review. Change subject: Fix test errors on el6 ......................................................................
Fix test errors on el6 Change-Id: I92e1f6a9c8931982b2467ca4b69a6ec819eb0d16 Signed-off-by: Saggi Mizrahi <[email protected]> --- M tests/jsonRpcTests.py 1 file changed, 9 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/11350/1 diff --git a/tests/jsonRpcTests.py b/tests/jsonRpcTests.py index f157950..f0857de 100644 --- a/tests/jsonRpcTests.py +++ b/tests/jsonRpcTests.py @@ -251,11 +251,12 @@ client = clientFactory() client.connect() with closing(client): - with self.assertRaises(JsonRpcError) as cm: + try: client.callMethod("I.DO.NOT.EXIST :(", [], 10) - - self.assertEquals(cm.exception.code, - JsonRpcMethodNotFoundError().code) + self.fail("Exception expected") + except JsonRpcError, ex: + self.assertEquals(ex.code, + JsonRpcMethodNotFoundError().code) @permutations(REACTOR_TYPE_PERMUTATIONS) def testMethodBadParameters(self, reactorType): @@ -266,8 +267,8 @@ client = clientFactory() client.connect() with closing(client): - with self.assertRaises(JsonRpcError) as cm: + try: client.callMethod("echo", [], 10) - - self.assertEquals(cm.exception.code, - JsonRpcInternalError().code) + except JsonRpcError, ex: + self.assertEquals(ex.code, + JsonRpcInternalError().code) -- To view, visit http://gerrit.ovirt.org/11350 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92e1f6a9c8931982b2467ca4b69a6ec819eb0d16 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
