コード例 #1
0
ファイル: test_views.py プロジェクト: taleinat/warehouse
def test_stats(db_request):
    project = ProjectFactory.create()
    release1 = ReleaseFactory.create(project=project)
    release1.created = datetime.date(2011, 1, 1)
    FileFactory.create(
        release=release1,
        filename="{}-{}.tar.gz".format(project.name, release1.version),
        python_version="source",
        size=69,
    )
    assert stats(db_request) == {
        "total_packages_size": 69,
        "top_packages": {project.name: {"size": 69}},
    }
コード例 #2
0
ファイル: test_views.py プロジェクト: dstufft/warehouse
def test_stats(db_request):

    project = ProjectFactory.create()
    release1 = ReleaseFactory.create(project=project)
    release1.created = datetime.date(2011, 1, 1)
    FileFactory.create(
        release=release1,
        filename="{}-{}.tar.gz".format(project.name, release1.version),
        python_version="source",
        size=69,
    )

    assert stats(db_request) == {
        "total_packages_size": 69,
        "top_packages": {project.name: {"size": 69}},
    }