@pytest.mark.django_db
def test_missing_package_local_package(app, admin_user, repository,
                                       pypi_stub):
    repository.upstream_pypi_url = pypi_stub.url
    repository.save()

    fetch_package.run(repository.pk, 'minibar')

    response = app.get(
        reverse('packages:simple_detail', kwargs={
            'slug': 'minibar',
            'repo': repository.slug,
        }))

    assert response.status_code == 200
    assert 'Links for minibar' in response.unicode_body
    assert 'minibar-0.4.0-py2.py3-none-any.whl#md5=0bbdf41e028a4e6c75dfbd59660b6328' in response.unicode_body
    assert 'minibar-0.4.0.tar.gz#md5=a3768a7f948871d8e47b146053265100' in response.unicode_body
    assert 'minibar-0.1.tar.gz#md5=c935bfa49cb49e4f97fb8e24371105d7' in response.unicode_body
dataset/ETHPy150Open mvantellingen/localshop/tests/apps/packages/views/test_simple_detail.py/test_missing_package_local_package/original