~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-10-25 16:06:39 UTC
  • mfrom: (14169.3.12 cancel-build-bug-173018)
  • Revision ID: launchpad@pqm.canonical.com-20111025160639-vaijpn40qjfodorn
[r=jtv][bug=173018][incr] First branch in a pipeline of changes to
        add build cancellation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
            BuildStatus.NEEDSBUILD, self.build_farm_job.status)
145
145
        self.failUnless(self.build_farm_job.date_started is None)
146
146
 
 
147
    def test_jobCancel(self):
 
148
        # Cancelling a job sets its status to CANCELLED.
 
149
        self.build_farm_job.jobStarted()
 
150
        self.build_farm_job.jobCancel()
 
151
        self.assertEqual(BuildStatus.CANCELLED, self.build_farm_job.status)
 
152
 
147
153
    def test_title(self):
148
154
        # The default title simply uses the job type's title.
149
155
        self.assertEqual(