~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/archiveuploader/tests/test_private_maintainers.py

  • Committer: Steve Kowalik
  • Date: 2012-01-05 04:40:45 UTC
  • mto: This revision was merged to the branch mainline in revision 14637.
  • Revision ID: steve.kowalik@canonical.com-20120105044045-2wo0cdtzit88jhsy
Remove one case entirely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
    layer = DatabaseFunctionalLayer
21
21
 
22
 
    def test_private_team_non_member(self):
23
 
        # Maintainers can not be private teams. If the uploader isn't set,
24
 
        # or isn't a member, the rejection message is delibrately vague.
 
22
    def test_private_team_maintainer(self):
 
23
        # Maintainers can not be private teams.
25
24
        with celebrity_logged_in('admin'):
26
25
            team = self.factory.makeTeam(
27
26
                email="foo@bar.com", visibility=PersonVisibility.PRIVATE)
28
27
        sigfile = SignableTagFile()
29
 
        sigfile.changes = SignableTagFile()
30
 
        sigfile.changes.changed_by = {}
31
28
        self.assertRaisesWithContent(
32
29
            UploadError, 'Invalid Maintainer.', sigfile.parseAddress,
33
30
            "foo@bar.com")
34
 
 
35
 
    def test_private_team_member(self):
36
 
        # Maintainers can not be private teams. If the uploader is a member
37
 
        # of the team, the rejection message can be clear.
38
 
        uploader = self.factory.makePerson()
39
 
        with celebrity_logged_in('admin'):
40
 
            team = self.factory.makeTeam(
41
 
                email="foo@bar.com", visibility=PersonVisibility.PRIVATE,
42
 
                members=[uploader])
43
 
        sigfile = SignableTagFile()
44
 
        sigfile.changes = SignableTagFile()
45
 
        sigfile.changes.changed_by = {'person': uploader}
46
 
        self.assertRaisesWithContent(
47
 
            UploadError, 'Maintainer can not be set to a private team.',
48
 
            sigfile.parseAddress, "foo@bar.com")