@testutils.patch_object(bdev.LogicalVolume, "Attach")
  def testLogicalVolumeImport(self, attach_mock):
    """Tests for bdev.LogicalVolume.Import()"""
    # Set up the mock object return value
    attach_mock.return_value = True

    # Create a fake logical volume
    test_unique_id = ("ganeti",  "31225655-5775-4356-c212-e8b1e137550a.disk0")
    inst = bdev.LogicalVolume(test_unique_id, [], 1024, {}, {})

    # Desired output command
    import_cmd = [constants.DD_CMD,
                  "of=%s" % inst.dev_path,
                  constants.DD_BLOCK_SIZE % "bs=%s",
                  "oflag=direct", "conv=notrunc"]

    self.assertEqual(inst.Import(), import_cmd)
dataset/ETHPy150Open ganeti/ganeti/test/py/ganeti.storage.bdev_unittest.py/TestLogicalVolume.testLogicalVolumeImport/swapped operands of `%`