~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/buildmaster/tests/mock_slaves.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-22 13:33:27 UTC
  • mfrom: (14575.1.1 megalint-10)
  • Revision ID: launchpad@pqm.canonical.com-20111222133327-9fjii9zqltlhmfyy
[r=jtv][no-qa] Lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
"""Mock Build objects for tests soyuz buildd-system."""
147
147
 
148
148
    def sendFileToSlave(self, sha1, url, username="", password=""):
149
149
        d = self.ensurepresent(sha1, url, username, password)
 
150
 
150
151
        def check_present((present, info)):
151
152
            if not present:
152
153
                raise CannotFetchFile(url, info)
 
154
 
153
155
        return d.addCallback(check_present)
154
156
 
155
157
    def cacheFile(self, logger, libraryfilealias):