def testWithCacheOkay(self): mount_dir = self.PatchObject(osutils, 'MountDir') osutils.MountImagePartition('image_file', 3, 'destination', self._gpt_table) opts = ['loop', 'offset=1', 'sizelimit=2', 'ro'] mount_dir.assert_called_with('image_file', 'destination', makedirs=True, skip_mtab=False, sudo=True, mount_opts=opts)
def testWithoutCache(self): self.PatchObject(cros_build_lib, 'GetImageDiskPartitionInfo', return_value=self._gpt_table) mount_dir = self.PatchObject(osutils, 'MountDir') osutils.MountImagePartition('image_file', 3, 'destination') opts = ['loop', 'offset=1', 'sizelimit=2', 'ro'] mount_dir.assert_called_with( 'image_file', 'destination', makedirs=True, skip_mtab=False, sudo=True, mount_opts=opts )