On Fri, 28 May 2010 15:00:47 you wrote:
> Review: Approve code release-critical
> 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.
Thanks.
> > === 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.
Yes it is. You can thank abentley for writing these context managers. There
is also a function decorator to run an entire test as a specific user.
> > + 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/
On Fri, 28 May 2010 15:00:47 you wrote:
> Review: Approve code release-critical
> 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.
Thanks.
> > === modified file 'lib/lp/ code/browser/ tests/test_ branchlisting. py' code/browser/ tests/test_ branchlisting. py 2010-04-08 02:09:16 code/browser/ tests/test_ branchlisting. py 2010-05-28 l('launchpad. dev', URI(link.url).host) hesPage( BrowserTestCase ): nalLayer # may need to change this
> > --- lib/lp/
> > +0000 +++ lib/lp/
> > 01:50:44 +0000
>
> ...
>
> > @@ -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.
Done.
> > + 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.
Yes it is. You can thank abentley for writing these context managers. There
is also a function decorator to run an entire test as a specific user.
> > + 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/
Fixed.