← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~pelpsi/launchpad:team-subscription-bug into launchpad:master

 


Diff comments:

> diff --git a/lib/lp/services/webapp/tests/test_publication.py b/lib/lp/services/webapp/tests/test_publication.py
> index a9c246a..cdc1570 100644
> --- a/lib/lp/services/webapp/tests/test_publication.py
> +++ b/lib/lp/services/webapp/tests/test_publication.py
> @@ -454,3 +461,26 @@ class TestPublisherStats(StatsMixin, TestCaseWithFactory):
>          browser = self.getUserBrowser()
>          # This shouldn't raise ValueError
>          self.assertRaises(NotFound, browser.open, redirect_url)
> +
> +
> +class TestSubscriptions(BrowserTestCase, TestCaseWithFactory):

While this was fixed by a change somewhere central, it's a very domain-specific test and I don't think it belongs in this file.  Can you move it somewhere like `lp.soyuz.browser.tests.test_archivesubscription`?

> +    layer = DatabaseFunctionalLayer
> +
> +    def test_subscriptions(self):
> +        owner = self.factory.makePerson()
> +        canonicals = []
> +        canonicals.append(self.factory.makePerson())
> +
> +        self.factory.makeTeam(name="canonical", members=canonicals)
> +        ppa = self.factory.makeArchive(owner=owner, private=True)
> +
> +        self.assertRaises(
> +            Unauthorized, self.getViewBrowser, ppa, user=canonicals[0]
> +        )
> +
> +        browser = self.getViewBrowser(
> +            ppa, view_name="+subscriptions", user=owner
> +        )
> +        browser.getControl(name="field.subscriber").value = "canonical"
> +        browser.getControl("Add").click()
> +        browser = self.getViewBrowser(ppa, user=canonicals[0])


-- 
https://code.launchpad.net/~pelpsi/launchpad/+git/launchpad/+merge/448706
Your team Launchpad code reviewers is requested to review the proposed merge of ~pelpsi/launchpad:team-subscription-bug into launchpad:master.



References