Example #1
0
    def test_ds_bug_fails_updating_with_comment(self):
        self.assertEqual(Notification.objects.count(), 0)
        self.mock_bugzilla_requests_post.side_effect = RequestException()

        with self.assertRaises(bugzilla.BugzillaError):
            tasks.update_ds_bug_task(self.experiment.id)

            self.mock_bugzilla_requests_post.assert_called_with(
                self.bugzilla_url, self.expected_data)
Example #2
0
    def test_ds_bugs_successfully_updates_with_comment(self):
        self.assertEqual(Notification.objects.count(), 0)

        tasks.update_ds_bug_task(self.experiment.id)
        self.mock_bugzilla_requests_post.assert_called_with(
            self.bugzilla_url, self.expected_data)