@mock.patch('apps.issue.views.zc_set_jira_status', side_effect=mocked_zc_set_jira_status)
def test_update_jira_comment_with_no_jira(self, mock_obj):
    response = self.client.post(reverse('issues-jiracomment', kwargs={'pk': 2}), {'conclusion': '验证不通过'})
    self.assertEqual(response.data['status'], 200)
    self.assertEqual(response.data['data']['status'], '处理中')
    issue_with_pk_2 = Issue.objects.get(pk=2)
    self.assertEqual(issue_with_pk_2.status.name, '处理中')
    response = self.client.post(reverse('issues-jiracomment', kwargs={'pk': 2}), {'conclusion': '验证通过'})
    self.assertEqual(response.data['status'], 200)
    self.assertEqual(response.data['data']['status'], '关闭')
    issue_with_pk_2 = Issue.objects.get(pk=2)
    self.assertEqual(issue_with_pk_2.status.name, '关闭')
@mock.patch('apps.issue.views.zc_set_jira_status', side_effect=mocked_zc_set_jira_status)
def test_update_jira_comment_with_no_jira(self, mock_obj):
    response = self.client.post(reverse('issues-jiracomment', kwargs={'pk': 2}), {'conclusion': '验证不通过'})
    self.assertEqual(response.data['status'], 200)
    self.assertEqual(response.data['data']['status'], '处理中')
    issue_with_pk_2 = Issue.objects.get(pk=2)
    self.assertEqual(issue_with_pk_2.status.name, '处理中')
    response = self.client.post(reverse('issues-jiracomment', kwargs={'pk': 2}), {'conclusion': '验证通过'})
    self.assertEqual(response.data['status'], 200)
    self.assertEqual(response.data['data']['status'], '关闭')
    issue_with_pk_2 = Issue.objects.get(pk=2)
    self.assertEqual(issue_with_pk_2.status.name, '关闭')