As it is necessary to wait until the Popen call finishes, use check_update instead which already returns the command output as string. This makes the code simpler.
While testing, check_output_mock needs to return two different values depending on the arguments. A side_effect function was defined (check_output_mock_side_effect) to do just that.
Some variables were renamed to a more significant name.
As defined in "setup" in the Makefile (http://github.com/heynemann/holmes-api/blob/40bf091/Makefile#L18), Phantomas is installed as a local Node.js module. `npm bin´ outputs the "bin" directory path (it's not really necessary but safer.)
As it is necessary to wait until the Popen call finishes, use check_update instead which already returns the command output as string. This makes the code simpler.
While testing, check_output_mock needs to return two different values depending on the arguments. A side_effect function was defined (check_output_mock_side_effect) to do just that.
Some variables were renamed to a more significant name.
Comments and/or suggestions are welcome.