Beispiel #1
0
def test_apt_filter_not_installed():
    """Calling AptInstalledFilter.apply() with a not installed package should return False."""
    filter = cli.AptInstalledFilter()
    package = mock.MagicMock()
    package.is_installed = False
    assert filter.apply(package) is False
Beispiel #2
0
def test_apt_filter_installed():
    """Calling AptInstalledFilter.apply() with an installed package should return True."""
    filter = cli.AptInstalledFilter()
    package = mock.MagicMock()
    package.is_installed = True
    assert filter.apply(package)