the ordering of these mocks does not match the function call  also the functions should be mocked from where they are declared  it should be  mock patch  sahara utils rh helper  get os version mock patch  sahara utils ssh remote  get os distrib mock patch  sahara utils ssh remote  execute command  