@mock.patch('requests.post', side_effect=mocked_requests_post)
def test_generate_change_log_create_jira(self, mock_post):
    url = reverse('issuetojira')
    data = {'issueId': 8}
    response = self.client.get(url, data, format='json')
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(response.data['data']['jiraId'], 'AA-157')
    issue = Issue.objects.get(pk=8)
    zc_change_logs = json.loads(issue.zc_change_logs)
    zc_change_logs[0].pop('created')
    self.assertEqual(zc_change_logs, [{'author': '', 'wanxin': 'app_owner_user', 'items': [{'fromString': '', 'toString': 'AA-157', 'field': 'jira link'}]}])
@mock.patch('requests.post', side_effect=mocked_requests_post)
def test_generate_change_log_create_jira(self, mock_post):
    url = reverse('issuetojira')
    data = {'issueId': 8}
    response = self.client.get(url, data, format='json')
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(response.data['data']['jiraId'], 'AA-157')
    issue = Issue.objects.get(pk=8)
    zc_change_logs = json.loads(issue.zc_change_logs)
    zc_change_logs[0].pop('created')
    self.assertEqual(zc_change_logs, [{'author': , 'wanxin': 'app_owner_user', 'items': [{'fromString': , 'toString': 'AA-157', 'field': 'jira link'}]}])