Introduces smurf._run_op(), which provides a convenient way to call any given task in the pysmurf controllers.
Expands the way the mocked smurf clients were constructed -- all SMuRF operations now need their own Mock object due to the construction in smurf._run_op().
Moves the mocked clients function to tests/util.py, since several tests are implementing the same thing. Future tests should use this as the "one true mock".
Updates the CLIENTS list patch to patch it directly, rather than patching the create_clients() function (which still then requires an initialize() is run in every test). This matches the way the wiregrid module patches.
This is in advance of work on #94, which requires adding error handling within _run_op().
This PR contains the following:
smurf._run_op()
, which provides a convenient way to call any given task in the pysmurf controllers.smurf._run_op()
.tests/util.py
, since several tests are implementing the same thing. Future tests should use this as the "one true mock".CLIENTS
list patch to patch it directly, rather than patching thecreate_clients()
function (which still then requires aninitialize()
is run in every test). This matches the way the wiregrid module patches.This is in advance of work on #94, which requires adding error handling within
_run_op()
.