~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/browser/tests/test_sourcepackagerecipe.py

  • Committer: Raphael Badin
  • Date: 2012-01-06 08:27:55 UTC
  • mfrom: (14513.5.4 builder-history-lfa)
  • mto: This revision was merged to the branch mainline in revision 14654.
  • Revision ID: raphael.badin@canonical.com-20120106082755-95a0eh6nakv5hj3b
Merge devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2010 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2010-2012 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
# pylint: disable-msg=F0401,E1002
4
4
 
1172
1172
              Secret PPA chocolate - 0\+r42 on 2010-04-16 buildlog \(.*\) i386
1173
1173
            Request build\(s\)""", self.getMainText(recipe))
1174
1174
 
 
1175
    def test_index_success_with_sprb_into_private_ppa(self):
 
1176
        # The index page hides builds into archives the user can't view.
 
1177
        recipe = self.makeRecipe()
 
1178
        archive = self.factory.makeArchive(private=True)
 
1179
        sprb = removeSecurityProxy(
 
1180
            self.factory.makeSourcePackageRecipeBuild(
 
1181
                recipe=recipe, distroseries=self.squirrel, archive=archive))
 
1182
        sprb.status = BuildStatus.FULLYBUILT
 
1183
        sprb.date_started = datetime(2010, 04, 16, tzinfo=UTC)
 
1184
        sprb.date_finished = datetime(2010, 04, 16, tzinfo=UTC)
 
1185
        sprb.log = self.factory.makeLibraryFileAlias()
 
1186
        self.assertIn(
 
1187
            "This recipe has not been built yet.", self.getMainText(recipe))
 
1188
 
1175
1189
    def test_index_no_builds(self):
1176
1190
        """A message should be shown when there are no builds."""
1177
1191
        recipe = self.makeRecipe()