1
# Copyright 2012 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
6
from lp.archiveuploader.dscfile import SignableTagFile
7
from lp.archiveuploader.nascentuploadfile import UploadError
8
from lp.registry.interfaces.person import PersonVisibility
9
from lp.testing import (
13
from lp.testing.layers import DatabaseFunctionalLayer
16
class TestPrivateMaintainers(TestCaseWithFactory):
18
layer = DatabaseFunctionalLayer
20
def test_private_team_maintainer(self):
21
# Maintainers can not be private teams.
22
with celebrity_logged_in('admin'):
23
self.factory.makeTeam(
24
email="foo@bar.com", visibility=PersonVisibility.PRIVATE)
25
sigfile = SignableTagFile()
26
self.assertRaisesWithContent(
27
UploadError, 'Invalid Maintainer.', sigfile.parseAddress,