@mock.patch('requests.post', side_effect=mocked_requests_post)
def test_create_jira(self, mock_post):
    url = reverse('issuetojira')
    data = {'issueId': 1}
    response = self.client.get(url, data, format='json')
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(response.data['data']['jiraId'], 'CC-157')
    data = {'issueId': 8}
    response = self.client.get(url, data, format='json')
    self.assertEqual(response.data['data']['jiraId'], 'AA-157')
@mock.patch('requests.post', side_effect=mocked_requests_post)
def test_create_jira(self, mock_post):
    url = reverse('issuetojira')
    data = {'issueId': 1}
    response = self.client.get(url, data, format='json')
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(response.data['data']['jiraId'], 'CC-157')
    data = {'issueId': 8}
    response = self.client.get(url, data, format='json')
    self.assertEqual(response.data['data']['jiraId'], 'AA-157')