~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/features/tests/test_webapp.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-19 08:49:39 UTC
  • mfrom: (13960.2.17 feature-flag-xmlrpc)
  • Revision ID: launchpad@pqm.canonical.com-20110919084939-doa6wrbb251ak815
[r=lifeless][bug=853635] Add a private XML-RPC interface to query
        feature flags

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
 
87
87
    def test_team_scope_outside_team(self):
88
88
        request = LaunchpadTestRequest()
 
89
        self.factory.loginAsAnyone(request)
89
90
        scopes = webapp.ScopesFromRequest(request)
90
 
        self.factory.loginAsAnyone()
91
91
        self.assertFalse(scopes.lookup('team:nonexistent'))
92
92
 
93
93
    def test_team_scope_in_team(self):
94
94
        request = LaunchpadTestRequest()
95
 
        scopes = webapp.ScopesFromRequest(request)
96
95
        member = self.factory.makePerson()
97
96
        team = self.factory.makeTeam(members=[member])
98
 
        login_as(member)
 
97
        login_as(member, request)
 
98
        scopes = webapp.ScopesFromRequest(request)
99
99
        self.assertTrue(scopes.lookup('team:%s' % team.name))