~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/tests/test_initialisedistroseriesjob.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-08 19:46:35 UTC
  • mfrom: (13168.5.1 bug-793434-devel)
  • Revision ID: launchpad@pqm.canonical.com-20110608194635-qcwq6pfx5uw4dh2b
[r=allenap][bug=793434] Fix InitialiseDistroSeriesJob to accept None
        for parameters: arches, packagesets, overlays,
        overlay_pockets and overlay_components.

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
        self.assertEqual(child.binarycount, 0)
196
196
        self.assertEqual(builds.count(), 1)
197
197
 
 
198
    def test_job_with_none_arguments(self):
 
199
        parent, child = self._create_child()
 
200
        job = self.job_source.create(
 
201
            child, [parent.id], packagesets=None, arches=None,
 
202
            overlays=None, overlay_pockets=None,
 
203
            overlay_components=None, rebuild=True)
 
204
        self.layer.switchDbUser('initialisedistroseries')
 
205
        job.run()
 
206
        child.updatePackageCount()
 
207
 
 
208
        self.assertEqual(parent.sourcecount, child.sourcecount)
 
209
 
198
210
    def test_cronscript(self):
199
211
        run_script(
200
212
            'cronscripts/run_jobs.py', ['-v', 'initialisedistroseries'])