コード例 #1
0
 def test_get_partitioning_5(self):
     """Test #5: Test that Unknown is returned when the disk is not in the dictionary"""
     self.assertEqual(linux.get_partitioning("thisisnotadisk1"), "Unknown")
コード例 #2
0
 def test_get_partitioning_4(self):
     """Test #4: Test that Unknown is returned when no partition scheme is present"""
     self.assertEqual(linux.get_partitioning("/dev/sda3"), "Unknown")
コード例 #3
0
 def test_get_partitioning_2(self):
     """Test #2: Test that MBR is detected correctly"""
     self.assertEqual(linux.get_partitioning("/dev/sda1"), "mbr")
コード例 #4
0
 def test_get_partitioning_3(self):
     """Test #3: Test that APM is not detected -- outside scope"""
     self.assertEqual(linux.get_partitioning("/dev/sda2"), "Unknown")
コード例 #5
0
 def test_get_partitioning_1(self):
     """Test #1: Test that GPT is detected correctly"""
     self.assertEqual(linux.get_partitioning("/dev/sda"), "gpt")