Commits

Rodrigo Bistolfi committed 779d851

Added test for create_partition_table()

Comments (0)

Files changed (1)

vinstall/backend/partitioning.py

     def tearDown(self):
         os.unlink(self.path)
 
+    def test_create_partition_table(self):
+        device = parted.Device(self.path)
+        disk = media.Disk()
+        disk._device = device
+        p = DiskPartitioner(disk)
+        p.create_partition_table()
+        p.add_partition(size=0.1)
+        p.write_changes()
+        self.assertTrue(p.has_partition_table())
+
     def test_add_partition(self):
         device = parted.Device(self.path)
         disk = media.Disk()