Change in vdsm[master]: test: moving getInstance to its class
nsoffer at redhat.com
nsoffer at redhat.com
Tue Oct 6 14:11:01 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: test: moving getInstance to its class
......................................................................
Patch Set 2: Code-Review-1
(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):
> docstring is supposed to be here, but I don't really mind :)
Why do we need getInstance that return a new instance every time? Why not use FakeClientIf(...) instead?
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).
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 <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list