[Patchew-devel] [PATCH] test: more testcases around authorization

Shubham Jain shubhamjain7495 at gmail.com
Fri May 18 02:34:08 UTC 2018


Thanks, now things make more sense than earlier.
On Fri, May 18, 2018 at 7:34 AM Fam Zheng <famz at redhat.com> wrote:

> On Thu, 05/17 22:55, Shubham Jain wrote:
> > > > +        if request.user.is_superuser or 'importers' in
> user_group_names:
> > > > +            projects = [p for p in Project.objects.all() if
> > > p.recognizes(m)]
> > > > +        else:
> > > > +            projects =  [p for p in Project.objects.all() if
> > > p.maintained_by(self.request.user)]
> > >
> > > I think the else branch should still union the p.recognizes()
> filtering.
>
> Wrong term. I meant "intersect".
>
> > >
> > As you have mentioned in the test case below
> > "test_maintainer_of_project_x_import_a_patch_to_project_y()", does this
>
> And this is actually
> "test_maintainer_of_project_x_cannot_import_a_patch_to_project_y().

This is covered in test_maintainer_create_message() itself where the two
projects recognised the mbox but it is imported to the one where the user
was the maintainer.

Shubham

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/patchew-devel/attachments/20180518/c6f97244/attachment.htm>


More information about the Patchew-devel mailing list