예제 #1
0
 def test_valid_filesystem_returns_true(self):
     self.enumerate_disk.return_value = (mock.MagicMock() for _ in range(1))
     self.check_fs.return_value = (
         mock.MagicMock(),
         "ext4",
         mock.MagicMock(),
     )
     self.assertTrue(cc_disk_setup.is_disk_used(mock.MagicMock()))
예제 #2
0
 def test_one_child_nodes_and_no_fs_returns_false(self):
     self.enumerate_disk.return_value = (mock.MagicMock() for _ in range(1))
     self.check_fs.return_value = (mock.MagicMock(), None, mock.MagicMock())
     self.assertFalse(cc_disk_setup.is_disk_used(mock.MagicMock()))
예제 #3
0
 def test_valid_filesystem_returns_true(self):
     self.enumerate_disk.return_value = (mock.MagicMock() for _ in range(1))
     self.check_fs.return_value = (
         mock.MagicMock(), 'ext4', mock.MagicMock())
     self.assertTrue(cc_disk_setup.is_disk_used(mock.MagicMock()))
예제 #4
0
 def test_multiple_child_nodes_returns_true(self):
     self.enumerate_disk.return_value = (mock.MagicMock() for _ in range(2))
     self.check_fs.return_value = (mock.MagicMock(), None, mock.MagicMock())
     self.assertTrue(cc_disk_setup.is_disk_used(mock.MagicMock()))