Refactored unit tests for modules based on CmdRunner (#7154)
* refactored unit tests for modules based on CmdRunner
* improved/fixed test helper
* fixed sanity
* refactored yaml spec out of the python file
* small adjustments
(cherry picked from commit 8652fd9528)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>