def test_transcode_image_convert(self, mock_event, mock_lock, mock_link, mock_identify, mock_exists, mock_execute): images._transcode(None, '/a/b/c/hash', FakeImage()) mock_link.assert_not_called() mock_execute.assert_called_with( None, 'qemu-img convert -t none -O qcow2 /a/b/c/hash /a/b/c/hash.qcow2')
def test_transcode_image_link(self, mock_event, mock_lock, mock_link, mock_identify, mock_exists, mock_execute): images._transcode(None, '/a/b/c/hash', FakeImage()) mock_link.assert_called_with('/a/b/c/hash', '/a/b/c/hash.qcow2') mock_execute.assert_not_called()
def test_transcode_image_noop(self, mock_event, mock_lock, mock_exists, mock_execute): images._transcode(None, '/a/b/c/hash', FakeImage()) mock_execute.assert_not_called()