Example #1
0
 def test_has_partition_table(self, _check):
     _check.return_value = FDISKDISPLAY
     block_device = '/dev/fakevbd'
     cinder_utils.has_partition_table(block_device)
     _check.assert_called_with(['fdisk', '-l', '/dev/fakevbd'], stderr=-2)
 def test_has_partition_table(self, _check):
     _check.return_value = FDISKDISPLAY.encode()
     block_device = '/dev/fakevbd'
     cinder_utils.has_partition_table(block_device)
     _check.assert_called_with(['fdisk', '-l', '/dev/fakevbd'], stderr=-2)