def _start_issuetracker_update(self, revision_ids): """Create or update issuetracker tickets for all imported instances.""" arg_list = {"revision_ids": revision_ids} filename = getattr(self.ie_job, "title", '') user_email = getattr(self.user, "email", '') mail_data = { "filename": filename, "user_email": user_email, } arg_list["mail_data"] = mail_data from ggrc import views views.background_update_issues(parameters=arg_list)
def test_issue_generate_call(self): """Test generate_issue call creates task for bulk generate.""" user = all_models.Person.query.filter_by(email="*****@*****.**").one() setattr(g, '_current_user', user) data = { "revision_ids": [1, 2, 3], } result = views.background_update_issues(data) self.assert200(result) bg_task = all_models.BackgroundTask.query.one() self.assertEqual(bg_task.status, "Success")