예제 #1
0
def test_removeAllScheduledPackagesWithException():
    manager = PackageManager(MagicMock())
    manager._purgePackage = MagicMock(side_effect=Exception)
    manager._installed_package_dict = {"beep": {}}
    manager._to_remove_package_set = {"beep"}

    manager._removeAllScheduledPackages()
    assert manager._to_remove_package_set == {"beep"}
예제 #2
0
def test_removeAllScheduledPackages():
    manager = PackageManager(MagicMock())
    manager._purgePackage = MagicMock()

    manager._to_remove_package_set = {"beep"}
    manager._installed_package_dict = {"beep": {}}
    manager._removeAllScheduledPackages()
    assert manager._to_remove_package_set == set()