def test_may_require_job_only_considers_waiting_jobs_for_redundancy(self):
     dsp = self.factory.makeDistroSeriesParent()
     package = self.factory.makeSourcePackageName()
     existing_job = create_job(
         dsp.derived_series, package, dsp.parent_series)
     existing_job.job.start()
     self.assertTrue(
         may_require_job(dsp.derived_series, package, dsp.parent_series))
Exemplo n.º 2
0
 def test_may_require_job_only_considers_waiting_jobs_for_redundancy(self):
     dsp = self.factory.makeDistroSeriesParent()
     package = self.factory.makeSourcePackageName()
     existing_job = create_job(dsp.derived_series, package,
                               dsp.parent_series)
     existing_job.job.start()
     self.assertTrue(
         may_require_job(dsp.derived_series, package, dsp.parent_series))
 def test_may_require_job_forbids_jobs_for_intra_distro_derivation(self):
     package = self.factory.makeSourcePackageName()
     parent = self.factory.makeDistroSeries()
     child = self.factory.makeDistroSeries(
         distribution=parent.distribution, previous_series=parent)
     self.assertFalse(may_require_job(child, package, parent))
 def test_may_require_job_forbids_redundant_jobs(self):
     dsp = self.factory.makeDistroSeriesParent()
     package = self.factory.makeSourcePackageName()
     create_job(dsp.derived_series, package, dsp.parent_series)
     self.assertFalse(
         may_require_job(dsp.derived_series, package, dsp.parent_series))
 def test_may_require_job_allows_new_jobs(self):
     dsp = self.factory.makeDistroSeriesParent()
     package = self.factory.makeSourcePackageName()
     self.assertTrue(may_require_job(
         dsp.derived_series, package, dsp.parent_series))
Exemplo n.º 6
0
 def test_may_require_job_forbids_jobs_for_intra_distro_derivation(self):
     package = self.factory.makeSourcePackageName()
     parent = self.factory.makeDistroSeries()
     child = self.factory.makeDistroSeries(distribution=parent.distribution,
                                           previous_series=parent)
     self.assertFalse(may_require_job(child, package, parent))
Exemplo n.º 7
0
 def test_may_require_job_forbids_redundant_jobs(self):
     dsp = self.factory.makeDistroSeriesParent()
     package = self.factory.makeSourcePackageName()
     create_job(dsp.derived_series, package, dsp.parent_series)
     self.assertFalse(
         may_require_job(dsp.derived_series, package, dsp.parent_series))
Exemplo n.º 8
0
 def test_may_require_job_allows_new_jobs(self):
     dsp = self.factory.makeDistroSeriesParent()
     package = self.factory.makeSourcePackageName()
     self.assertTrue(
         may_require_job(dsp.derived_series, package, dsp.parent_series))