Esempio n. 1
0
 def test_create_with_files_and_capacity(self):
     """Creation of raw image with specified capacity and file contents."""
     disk_path = os.path.join(self.temp_dir, "out.img")
     RAW.create_file(disk_path, files=[self.input_ovf], capacity="64M")
     raw = RAW(disk_path)
     self.assertEqual(raw.files, [os.path.basename(self.input_ovf)])
     self.assertEqual(raw.capacity, "67108864")
Esempio n. 2
0
 def test_create_with_files(self):
     """Creation of a raw image with specific file contents."""
     disk_path = os.path.join(self.temp_dir, "out.raw")
     RAW.create_file(disk_path, files=[self.input_ovf])
     raw = RAW(disk_path)
     self.assertEqual(raw.files, [os.path.basename(self.input_ovf)])
     self.assertEqual(raw.capacity, "8388608")
Esempio n. 3
0
 def test_create_with_capacity(self):
     """Creation of a raw image of a particular size."""
     disk_path = os.path.join(self.temp_dir, "out.raw")
     RAW.create_file(disk_path, capacity="16M")
     raw = RAW(disk_path)
     self.assertEqual(raw.disk_format, 'raw')
     self.assertEqual(raw.disk_subformat, None)
Esempio n. 4
0
 def test_create_with_capacity(self):
     """Creation of a raw image of a particular size."""
     disk_path = os.path.join(self.temp_dir, "out.raw")
     RAW.create_file(disk_path, capacity="16M")
     raw = RAW(disk_path)
     self.assertEqual(raw.disk_format, 'raw')
     self.assertEqual(raw.disk_subformat, None)
Esempio n. 5
0
 def test_create_with_files_and_capacity(self):
     """Creation of raw image with specified capacity and file contents."""
     disk_path = os.path.join(self.temp_dir, "out.img")
     RAW.create_file(disk_path, files=[self.input_ovf], capacity="64M")
     raw = RAW(disk_path)
     self.assertEqual(raw.files,
                      [os.path.basename(self.input_ovf)])
     self.assertEqual(raw.capacity, "67108864")
Esempio n. 6
0
 def test_create_with_files(self):
     """Creation of a raw image with specific file contents."""
     disk_path = os.path.join(self.temp_dir, "out.raw")
     RAW.create_file(disk_path, files=[self.input_ovf])
     raw = RAW(disk_path)
     self.assertEqual(raw.files,
                      [os.path.basename(self.input_ovf)])
     self.assertEqual(raw.capacity, "8388608")