Change in vdsm[master]: imagetickets: add tests
nsoffer at redhat.com
nsoffer at redhat.com
Tue Mar 1 11:32:20 UTC 2016
Nir Soffer has posted comments on this change.
Change subject: imagetickets: add tests
......................................................................
Patch Set 10:
(1 comment)
https://gerrit.ovirt.org/#/c/52900/10/tests/imagetickets_test.py
File tests/imagetickets_test.py:
Line 121:
Line 122: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 123: def test_res_header_error(self):
Line 124: imagetickets.uhttp.response = \
Line 125: FakeResponse(status=300, headers={"content-length": "invalid"})
> np, can you please elaborate why?
\ is error prone (e.g. try to add trailing space after it) and make it harder to read the code. If the lines are too long, rewrite the code.
See also https://www.python.org/dev/peps/pep-0008/
Line 126: with self.assertRaises(se.ImageDaemonError):
Line 127: imagetickets.remove_ticket("uuid")
Line 128:
Line 129: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
--
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list