

@mock.patch('bareon.utils.grub.grub1_stage1')
@mock.patch('bareon.utils.grub.grub1_mbr')
def test_grub1_install(self, mock_mbr, mock_stage1):
    install_devices = ['/dev/foo', '/dev/bar']
    expected_calls_mbr = []
    for install_device in install_devices:
        expected_calls_mbr.append(mock.call(install_device, '/dev/foo', '0', chroot='/target'))
    gu.grub1_install(install_devices, '/dev/foo1', '/target')
    expected_calls_mbr.assertEqual(expected_calls_mbr, mock_mbr.call_args_list)
    mock_stage1.assert_called_once_with(chroot='/target')
    self.assertRaises(errors.GrubUtilsError, gu.grub1_install, '/dev/foo', '/dev/foo', chroot='/target')

dataset/ETHPy150Open openstack/bareon/bareon/tests/test_grub_utils.py TestGrubUtils.test_grub1_install/VarMisuse@82/172 `self`->`expected_calls_mbr`