Piotr Kliczewski has posted comments on this change. Change subject: contrib: schema converter ......................................................................
Patch Set 35: (9 comments) https://gerrit.ovirt.org/#/c/52864/35/lib/api/json_schema.py File lib/api/json_schema.py: Line 1: #!/usr/bin/env python Line 2: # > why do you change the name of this file? No, good reason. Will change it as you suggested in other patch. Line 3: # Copyright (C) 2012 Adam Litke, IBM Corporation Line 4: # Line 5: # This program is free software; you can redistribute it and/or modify Line 6: # it under the terms of the GNU General Public License as published by https://gerrit.ovirt.org/#/c/52864/35/tests/schemaValidationTest.py File tests/schemaValidationTest.py: PS35, Line 216: if name not in params: : raise Exception("parameters do not match for %s.%s" : % (command, method)) > why not Good idea, will change. PS35, Line 221: path = schemaapi.find_schema() : gluster_path = schemaapi.find_schema('vdsm-api-gluster') : cache = schemaapi.Schema([path, gluster_path]) > maybe move into setUp() and set cache as instance variable? Done PS35, Line 228: if not y_ret: : if ret: : raise Exception("Return value do not match") : continue > self.assertTrue(ret and y_ret) Done PS35, Line 234: if not isinstance(ret, list): : raise Exception("Return expected to be list") > self.assertTrue(isinstance(ret, list)) Done PS35, Line 242: if ret_type != self.swap_types(ret): : raise Exception("Return type do not match") > self.assertEquals(ret_type, swap_types(ret)) Done PS35, Line 245: test_types > same as previous methods, in each place you raise Exception Done PS35, Line 285: with self.assertRaises(schemaapi.MethodNotFound): > we prefer: Done PS35, Line 293: assertRaises > same Done -- To view, visit https://gerrit.ovirt.org/52864 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3921cebb7f550f63849f3bc5c80636b6e9495c92 Gerrit-PatchSet: 35 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Darshan N <[email protected]> Gerrit-Reviewer: Edward Haas <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Polednik <[email protected]> Gerrit-Reviewer: Martin Sivák <[email protected]> Gerrit-Reviewer: Milan Zamazal <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Sahina Bose <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
