Exemple #1
0
    def test_comp_experiment_update_res_task_with_bug_error(self):
        self.mock_bugzilla_requests_put.side_effect = RequestException()
        experiment = ExperimentFactory.create_with_status(
            target_status=Experiment.STATUS_COMPLETE, normandy_id=12345)

        with self.assertRaises(bugzilla.BugzillaError):
            tasks.comp_experiment_update_res_task(experiment.id)
Exemple #2
0
    def test_comp_experiment_update_res_task(self):
        experiment = ExperimentFactory.create_with_status(
            target_status=Experiment.STATUS_COMPLETE, normandy_id=12345)

        expected_call_data = {"status": "RESOLVED", "resolution": "FIXED"}

        tasks.comp_experiment_update_res_task(experiment.id)

        self.mock_bugzilla_requests_put.assert_called_with(
            settings.BUGZILLA_UPDATE_URL.format(id=experiment.bugzilla_id),
            expected_call_data,
        )