Change in vdsm[master]: janitorial: introduce the 'response' module
nsoffer at redhat.com
nsoffer at redhat.com
Thu Mar 5 23:59:20 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: janitorial: introduce the 'response' module
......................................................................
Patch Set 6:
(2 comments)
https://gerrit.ovirt.org/#/c/37912/6/tests/responseTests.py
File tests/responseTests.py:
Line 28: def test_error(self):
Line 29: NAME = 'noVM' # no special meaning, any error is fine
Line 30: res = response.error(NAME)
Line 31: self.assertNotEqual(res['status']['code'], 0)
Line 32: self.assertTrue(len(res['status']['message']) > 0)
Why not
template = errCode[NAME]
assertEqual(res["status"]["code"], template["status"]["code"])
assertEqual(res["status"]["message"], template["status"]["message"])
Line 33:
Line 34: def test_error_with_message(self):
Line 35: NAME = 'noVM' # no special meaning, any error is fine
Line 36: MESSAGE = 'we want a specific message here'
Line 34: def test_error_with_message(self):
Line 35: NAME = 'noVM' # no special meaning, any error is fine
Line 36: MESSAGE = 'we want a specific message here'
Line 37: res = response.error(NAME, MESSAGE)
Line 38: self.assertNotEqual(res['status']['code'], 0)
Same as previous test
--
To view, visit https://gerrit.ovirt.org/37912
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ife293080c2c6654315a609478f3276c9008ea6e7
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list