...and implement so in the most trivial way, always suceeding immediately. The point is, these mocks are not used to test the mcpu that uses the WConfD client but, instead, indirectly in our so called "unit tests" for the logical units that call the real mpcu.
Signed-off-by: Klaus Aehlig <[email protected]> --- test/py/cmdlib/testsupport/wconfd_mock.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/py/cmdlib/testsupport/wconfd_mock.py b/test/py/cmdlib/testsupport/wconfd_mock.py index 6823083..b19b336 100644 --- a/test/py/cmdlib/testsupport/wconfd_mock.py +++ b/test/py/cmdlib/testsupport/wconfd_mock.py @@ -38,6 +38,14 @@ class MockClient(object): self.wconfdmock.mylocks[lockrq[0]] = lockrq[1] return [] + def UpdateLocksWaiting(self, cid, _prio, req): + # as our mock TryUpdateLocks always suceeds, we can + # just use it + return self.TryUpdateLocks(cid, req) + + def HasPendingRequest(self, _cid): + return False + def ListLocks(self, *_): result = [] for lock in self.wconfdmock.mylocks: -- 1.9.1.423.g4596e3a
