Francesco Romani has posted comments on this change. Change subject: janitorial: add the response.success() helper ......................................................................
Patch Set 5: (3 comments) https://gerrit.ovirt.org/#/c/38270/5/tests/responseTests.py File tests/responseTests.py: Line 42: Line 43: def test_success(self): Line 44: res = response.success() Line 45: self.assertEqual(res['status']['code'], 0) Line 46: self.assertEqual(res['status']['message'], 'Done') > Why not will change Line 47: Line 48: @permutations([[{'answer': 42}], [{'fooList': ['bar', 'baz']}]]) Line 49: def test_success_with_args(self, args): Line 50: res = response.success(**args) Line 44: res = response.success() Line 45: self.assertEqual(res['status']['code'], 0) Line 46: self.assertEqual(res['status']['message'], 'Done') Line 47: Line 48: @permutations([[{'answer': 42}], [{'fooList': ['bar', 'baz']}]]) > These permutations are not very useful. I'was trying to mimic the way how extra args are used in the code. What do you suggest here? Line 49: def test_success_with_args(self, args): Line 50: res = response.success(**args) Line 51: self.assertEqual(res['status']['code'], 0) Line 52: self.assertEqual(res['status']['message'], 'Done') Line 50: res = response.success(**args) Line 51: self.assertEqual(res['status']['code'], 0) Line 52: self.assertEqual(res['status']['message'], 'Done') Line 53: for key in args: Line 54: self.assertEqual(res[key], args[key]) > Why not Will add this test. After that, we can discuss (or maybe just drop) the permutations thing. -- To view, visit https://gerrit.ovirt.org/38270 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5fcd6c832f3a16a543357570c591c1f9a907c97a Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
