Exemplo n.º 1
0
def fixture_package_no_origin(mock_apt_cache):
    mock_apt_cache['mypackage'].origins = []

    package = Package(mock_apt_cache)

    package.by_name('mypackage')

    return package
Exemplo n.º 2
0
def fixture_package_not_matched(mock_apt_cache, mock_apt_origin_no_match):
    mock_apt_cache['mypackage'].origins = [mock_apt_origin_no_match]

    package = Package(mock_apt_cache)

    package.by_name('mypackage')

    return package
Exemplo n.º 3
0
    def test_invalid_package_by_name(self, mock_apt_cache):
        package = Package(mock_apt_cache)

        with pytest.raises(PackageNotFound):
            package.by_name("other-package")
Exemplo n.º 4
0
def fixture_package(mock_apt_cache):
    package = Package(mock_apt_cache)

    package.by_name('mypackage')

    return package
Exemplo n.º 5
0
    def test_by_name(self, mock_apt_cache):
        package = Package(mock_apt_cache)

        package.by_name('mypackage')

        self.assert_package(package)