Code review comment for lp://staging/~thumper/launchpad/person-branch-page-private-team

Revision history for this message
Curtis Hovey (sinzui) wrote :

Thanks for teaching me the art of setup with a logged in user. YOu have my RC to land this after you fix some trivial issues.

> === modified file 'lib/lp/code/browser/tests/test_branchlisting.py'
> --- lib/lp/code/browser/tests/test_branchlisting.py 2010-04-08 02:09:16 +0000
> +++ lib/lp/code/browser/tests/test_branchlisting.py 2010-05-28 01:50:44 +0000
...
> @@ -355,6 +359,47 @@
> self.assertEqual('launchpad.dev', URI(link.url).host)
>
>
> +class TestPersonBranchesPage(BrowserTestCase):
> + """Tests for the person branches page.
> +
> + This is the default page shown for a person on the code subdomain.
> + """
> +
> + layer = DatabaseFunctionalLayer # may need to change this

You do not need to change this, you can drop the comment.

> + def _make_branch_for_private_team(self):
> + private_team = self.factory.makeTeam(
> + name='shh', displayname='Shh',
> + visibility=PersonVisibility.PRIVATE)
> + member = self.factory.makePerson(
> + <email address hidden>', password='test')
> + with person_logged_in(private_team.teamowner):
> + private_team.addMember(member, private_team.teamowner)

That is beautiful.

> + branch = self.factory.makeProductBranch(owner=private_team)
> + return private_team, member, branch
> +
> + def test_private_team_membership_for_team_member(self):
> + # If the logged in user can see the private teams, they are shown in
> + # the releated 'Branches owned by' section at the bottom of the page.

grammar: s/releated/related/

review: Approve (code release-critical)

« Back to merge proposal