Exemplo n.º 1
0
 def test_get_capacity_4(self):
     """Test #4: Test that the capacity is returned correctly for partitions (650 EB)."""
     macos.PLIST = self.plist0s3
     raw_capacity, human_size = macos.get_capacity()
     self.assertEqual(raw_capacity, "650002432000000000000")
     self.assertEqual(human_size, "650 EB")
Exemplo n.º 2
0
 def test_get_capacity_2(self):
     """Test #2: Test that capacity is returned correctly for host devices."""
     macos.PLIST = self.plist0
     raw_capacity, human_size = macos.get_capacity()
     self.assertEqual(raw_capacity, "42948853248")
     self.assertEqual(human_size, "42 GB")
Exemplo n.º 3
0
 def test_get_capacity_3(self):
     """Test #3: Test that the capacity is returned correctly for partitions (42 GB)."""
     macos.PLIST = self.plist0s2
     raw_capacity, human_size = macos.get_capacity()
     self.assertEqual(raw_capacity, "42089095168")
     self.assertEqual(human_size, "42 GB")
Exemplo n.º 4
0
 def test_get_capacity_1(self):
     """Test #1: Test that u"Unknown", u"Unknown" is returned when capacity info is missing."""
     macos.PLIST = self.badplist0
     raw_capacity, human_size = macos.get_capacity()
     self.assertEqual(raw_capacity, "Unknown")
     self.assertEqual(human_size, "Unknown")