Nir Soffer has posted comments on this change. Change subject: tool: Fix error message for non-existing module ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/31742/1/tests/toolTests.py File tests/toolTests.py: Line 146: configurator, Line 147: '_getConfigurers', Line 148: lambda: { Line 149: 'libvirt': MockModuleConfigurator('libvirt', set()), Line 150: 'sanlock': MockModuleConfigurator('sanlock', set()), > I can go with this for now, For the other tests the short modules names are ok, but you are right that the way configurators are created is little ugly - not only in the tests. After http://gerrit.ovirt.org/31741 and http://gerrit.ovirt.org/31739 are merged, you can simplify the mocks: class Foo(ModuleConfigure): name = 'foo' class Bar(ModuleConfigure): name = 'bar' requires = frozenset(('Foo',)) @MonkeyPatch(configurator, '_CONFIGURATORS', {Foo.name: Foo(), Bar.name: Bar()}) def test...: Line 151: } Line 152: ) Line 153: def testNonExistentModule(self): Line 154: -- To view, visit http://gerrit.ovirt.org/31742 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib794b4cb0dcedbbd5b5bb4bb4396860e5edd8710 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: mooli tayer <[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
