Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show files in release summary table #6520

Merged
merged 5 commits into from
Aug 28, 2019
Merged

Conversation

nlhkabu
Copy link
Contributor

@nlhkabu nlhkabu commented Aug 23, 2019

Closes #3200
Prerequisite for #6377

Screenshot from 2019-08-23 09-03-25

@nlhkabu nlhkabu requested a review from di August 23, 2019 17:24
@nlhkabu nlhkabu requested a review from woodruffw August 23, 2019 17:27
@woodruffw
Copy link
Member

perhaps @woodruffw can add the necessary tests?

Yup! I don't have push access to this branch, but here's the relevant patch:

diff --git a/tests/unit/manage/test_views.py b/tests/unit/manage/test_views.py
index abe717be..8b9b6be7 100644
--- a/tests/unit/manage/test_views.py
+++ b/tests/unit/manage/test_views.py
@@ -2151,11 +2151,21 @@ class TestManageProjectDocumentation:
 
 
 class TestManageProjectReleases:
-    def test_manage_project_releases(self):
-        request = pretend.stub()
-        project = pretend.stub()
+    def test_manage_project_releases(self, db_request):
+        project = ProjectFactory.create(name="foobar")
+        release = ReleaseFactory.create(project=project, version="1.0.0")
+        release_file = FileFactory.create(
+            release=release,
+            filename=f"foobar-{release.version}.tar.gz",
+            packagetype="sdist",
+        )
 
-        assert views.manage_project_releases(project, request) == {"project": project}
+        assert views.manage_project_releases(project, db_request) == {
+            "project": project,
+            "version_to_file_counts": {
+                release.version: {"total": 1, release_file.packagetype: 1}
+            },
+        }
 
 
 class TestManageProjectRelease:

@nlhkabu nlhkabu merged commit ee62ab1 into master Aug 28, 2019
@nlhkabu
Copy link
Contributor Author

nlhkabu commented Aug 28, 2019

Patch applied and merged. Thanks @di and @woodruffw !

@nlhkabu nlhkabu deleted the 3200-redesign-release-table branch August 28, 2019 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redesign release table
3 participants