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.
> + 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.
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' code/browser/ tests/test_ branchlisting. py 2010-04-08 02:09:16 +0000 code/browser/ tests/test_ branchlisting. py 2010-05-28 01:50:44 +0000 l('launchpad. dev', URI(link.url).host) hesPage( BrowserTestCase ): nalLayer # may need to change this
> --- lib/lp/
> +++ lib/lp/
...
> @@ -355,6 +359,47 @@
> self.assertEqua
>
>
> +class TestPersonBranc
> + """Tests for the person branches page.
> +
> + This is the default page shown for a person on the code subdomain.
> + """
> +
> + layer = DatabaseFunctio
You do not need to change this, you can drop the comment.
> + def _make_branch_ for_private_ team(self) : makeTeam( PersonVisibilit y.PRIVATE) makePerson( logged_ in(private_ team.teamowner) : team.addMember( member, private_ team.teamowner)
> + private_team = self.factory.
> + name='shh', displayname='Shh',
> + visibility=
> + member = self.factory.
> + <email address hidden>', password='test')
> + with person_
> + private_
That is beautiful.
> + branch = self.factory. makeProductBran ch(owner= private_ team) team_membership _for_team_ member( self):
> + return private_team, member, branch
> +
> + def test_private_
> + # 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/