diff --git a/app/experimenter/kinto/tasks.py b/app/experimenter/kinto/tasks.py index dad8c4b938..57b11aa0cf 100644 --- a/app/experimenter/kinto/tasks.py +++ b/app/experimenter/kinto/tasks.py @@ -55,7 +55,7 @@ def check_kinto_push_queue(): queued_experiments = Experiment.objects.filter( type=Experiment.TYPE_RAPID, status=Experiment.STATUS_REVIEW - ) + ).exclude(bugzilla_id=None) if queued_experiments.exists(): if client.has_pending_review(): diff --git a/app/experimenter/kinto/tests/test_tasks.py b/app/experimenter/kinto/tests/test_tasks.py index 347cdd308a..cd755f574c 100644 --- a/app/experimenter/kinto/tests/test_tasks.py +++ b/app/experimenter/kinto/tests/test_tasks.py @@ -98,7 +98,25 @@ def test_check_with_rapid_review_and_kinto_pending_pushes_nothing(self): tasks.check_kinto_push_queue() self.mock_push_task.assert_not_called() - def test_check_with_rapid_review_and_no_kinto_pending_pushes_experiment(self): + def test_check_with_rapid_review_and_no_bugzilla_and_no_kinto_pending_pushes_nothing( + self, + ): + ExperimentFactory.create_with_status( + Experiment.STATUS_REVIEW, + bugzilla_id=None, + firefox_channel=Experiment.CHANNEL_RELEASE, + firefox_max_version=None, + firefox_min_version=Experiment.VERSION_CHOICES[0][0], + name="test", + type=Experiment.TYPE_RAPID, + ) + self.setup_kinto_no_pending_review() + tasks.check_kinto_push_queue() + self.mock_push_task.assert_not_called() + + def test_check_with_rapid_review_and_bugzilla_and_no_kinto_pending_pushes_experiment( + self, + ): experiment = ExperimentFactory.create_with_status( Experiment.STATUS_REVIEW, bugzilla_id="12345",