def test_can_not_create_issues_with_undefined_extended_fields(self):
    self.client.force_authenticate(user=get_user_model().objects.get(username='app_owner_user'))
    url = reverse('issueextfields-list', kwargs={'task_id': 1})
    self.client.post(url, {'name': '广场'})
    self.client.post(url, {'name': '手机型号', 'isOptional': True, 'default': 'iPhone', 'type': 'string'})
    response = self.client.post(reverse('issues-list'), {'priority': '紧急', 'appId': 1, 'taskId': 1, 'statusId': 1, 'title': 'aaaa', 'detail': 'bbbb', 'extFields': {'场地': '通州万达', '手机型号': '华为'}}, format='json')
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    OrderedDict([('status', 400), ('msg', 'Not found:  IssueExtField matching query does not exist.')])
def test_can_not_create_issues_with_undefined_extended_fields(self):
    self.client.force_authenticate(user=get_user_model().objects.get(username='app_owner_user'))
    url = reverse('issueextfields-list', kwargs={'task_id': 1})
    self.client.post(url, {'name': '广场'})
    self.client.post(url, {'name': '手机型号', 'isOptional': True, 'default': 'iPhone', 'type': 'string'})
    response = self.client.post(reverse('issues-list'), {'priority': '紧急', 'appId': 1, 'taskId': 1, 'statusId': 1, 'title': 'aaaa', 'detail': 'bbbb', 'extFields': {'场地': '通州万达', '手机型号': '华为'}}, format='json')
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    OrderedDict([('status', 400), ('msg', 'Not found:  IssueExtField matching query does not exist.')])