← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/testfix-builder-version into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/testfix-builder-version into lp:launchpad.

Commit message:
Fix mock updateBuild in TestBinaryBuildPackageBehaviorBuildCollection tests.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/testfix-builder-version/+merge/192843

Fix test failures from https://code.launchpad.net/~cjwatson/launchpad/builder-version/+merge/192819.
-- 
https://code.launchpad.net/~cjwatson/launchpad/testfix-builder-version/+merge/192843
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/testfix-builder-version into lp:launchpad.
=== modified file 'lib/lp/soyuz/tests/test_binarypackagebuildbehavior.py'
--- lib/lp/soyuz/tests/test_binarypackagebuildbehavior.py	2013-10-03 05:35:29 +0000
+++ lib/lp/soyuz/tests/test_binarypackagebuildbehavior.py	2013-10-28 07:33:27 +0000
@@ -13,6 +13,7 @@
 from storm.store import Store
 from testtools.deferredruntest import AsynchronousDeferredRunTest
 import transaction
+from twisted.internet import defer
 from twisted.trial.unittest import TestCase as TrialTestCase
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
@@ -338,10 +339,13 @@
         # hang around between test runs.
         self.addCleanup(self._cleanup)
 
+    @defer.inlineCallbacks
     def updateBuild(self, candidate, slave):
         bf = MockBuilderFactory(self.builder, candidate)
-        return self.interactor.updateBuild(
-            bf.getVitals('foo'), slave, bf, self.interactor.getBuildBehavior)
+        slave_status = yield slave.status_dict()
+        yield self.interactor.updateBuild(
+            bf.getVitals('foo'), slave, slave_status, bf,
+            self.interactor.getBuildBehavior)
 
     def assertBuildProperties(self, build):
         """Check that a build happened by making sure some of its properties


Follow ups