Piotr Kliczewski has posted comments on this change. Change subject: test: moving getInstance to its class ......................................................................
Patch Set 2: (2 comments) https://gerrit.ovirt.org/#/c/46941/2/tests/integration/jsonRpcHelper.py File tests/integration/jsonRpcHelper.py: Line 62: """ Line 63: This method is used to mock real ClientIf getInstance. Line 64: It returns new FakeClientIf every time. Line 65: """ Line 66: def getInstance(self): > Why do we need getInstance that return a new instance every time? Why not u As in docstring there is getInstance method that it is used to return an instance of ClientIf. We need to mock it for some of the tests that we run. Line 67: return FakeClientIf() Line 68: Line 69: @property Line 70: def ready(self): Line 63: This method is used to mock real ClientIf getInstance. Line 64: It returns new FakeClientIf every time. Line 65: """ Line 66: def getInstance(self): Line 67: return FakeClientIf() > This will always fail as FakeClientIf has required arguments (binding, dest This is surprising but you are right. I checked the tests but they did not fail which means that we do not need to mock it. I removed mocking and it is never called. Will update this patch. Line 68: Line 69: @property Line 70: def ready(self): Line 71: return True -- To view, visit https://gerrit.ovirt.org/46941 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iadc44aef17d1ebcf8b6b7b63fce3fa8d34b4c0a3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
