def test_run(self):
        self.useFixture(FeatureFixture({"jobs.celery.enabled_classes": "PackageDiffJob"}))

        diff = create_proper_job(self.factory)
        with block_on_job(self):
            transaction.commit()
        self.assertEqual(PackageDiffStatus.COMPLETED, diff.status)
        self.assertIsNot(None, diff.diff_content)
    def test_run(self):
        self.useFixture(FeatureFixture({
            'jobs.celery.enabled_classes': 'PackageDiffJob',
        }))

        diff = create_proper_job(self.factory)
        with block_on_job(self):
            transaction.commit()
        self.assertEqual(PackageDiffStatus.COMPLETED, diff.status)
        self.assertIsNot(None, diff.diff_content)
    def test_smoke(self):
        diff = create_proper_job(self.factory)
        transaction.commit()
        out, err, exit_code = run_script(
            "LP_DEBUG_SQL=1 cronscripts/process-job-source.py -vv %s" % (IPackageDiffJobSource.getName())
        )

        self.addDetail("stdout", text_content(out))
        self.addDetail("stderr", text_content(err))
        self.assertEqual(0, exit_code)
        self.assertEqual(PackageDiffStatus.COMPLETED, diff.status)
        self.assertIsNot(None, diff.diff_content)
Beispiel #4
0
    def test_smoke(self):
        diff = create_proper_job(self.factory)
        transaction.commit()
        out, err, exit_code = run_script(
            "LP_DEBUG_SQL=1 cronscripts/process-job-source.py -vv %s" %
            (IPackageDiffJobSource.getName()))

        self.addDetail("stdout", text_content(out))
        self.addDetail("stderr", text_content(err))
        self.assertEqual(0, exit_code)
        self.assertEqual(PackageDiffStatus.COMPLETED, diff.status)
        self.assertIsNot(None, diff.diff_content)