'Mock the client to run off a test image.
Args:
image_path: The path to the image file.
fs_type: The filesystem in the image.
Returns:
A context manager which ensures that client actions are served off the
test image.'

def MockClientMountPointsWithImage(self, image_path, fs_type='ext2'):

    def MockGetMountpoints():
        return {'/': (image_path, fs_type)}
    return utils.MultiStubber((client_utils_linux, 'GetMountpoints', MockGetMountpoints), (client_utils_osx, 'GetMountpoints', MockGetMountpoints))
