コード例 #1
0
def test_package_releases(db_request):
    project1 = ProjectFactory.create()
    releases1 = [ReleaseFactory.create(project=project1) for _ in range(10)]
    project2 = ProjectFactory.create()
    [ReleaseFactory.create(project=project2) for _ in range(10)]
    result = xmlrpc.package_releases(db_request, project1.name)
    assert result == [
        r.version for r in sorted(releases1, key=lambda x: x._pypi_ordering)
    ]
コード例 #2
0
ファイル: test_xmlrpc.py プロジェクト: craig5/warehouse
def test_package_releases_hidden(db_request):
    project1 = ProjectFactory.create()
    releases1 = [ReleaseFactory.create(project=project1) for _ in range(10)]
    project2 = ProjectFactory.create()
    [ReleaseFactory.create(project=project2) for _ in range(10)]
    result = xmlrpc.package_releases(db_request, project1.name, show_hidden=True)
    assert result == [
        r.version for r in reversed(sorted(releases1, key=lambda x: x._pypi_ordering))
    ]
コード例 #3
0
def test_package_releases_no_releases(db_request):
    project = ProjectFactory.create()
    result = xmlrpc.package_releases(db_request, project.name)
    assert result == []
コード例 #4
0
def test_package_releases_no_project(db_request):
    result = xmlrpc.package_releases(db_request, "foo")
    assert result == []
コード例 #5
0
ファイル: test_xmlrpc.py プロジェクト: craig5/warehouse
def test_package_releases_no_releases(db_request):
    project = ProjectFactory.create()
    result = xmlrpc.package_releases(db_request, project.name)
    assert result == []
コード例 #6
0
ファイル: test_xmlrpc.py プロジェクト: craig5/warehouse
def test_package_releases_no_project(db_request):
    result = xmlrpc.package_releases(db_request, "foo")
    assert result == []