def test_update_issues_will_check_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': '广场', 'isOptional': False})
    self.client.post(url, {'name': '手机型号', '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')
    issue_id = response.data['data']['id']
    url = reverse('issues-detail', kwargs={'pk': issue_id})
    response = self.client.patch(url, {'extFields': {'手机型号': '苹果'}}, format='json')
    self.assertEqual(response.data['status'], status.HTTP_400_BAD_REQUEST)
def test_update_issues_will_check_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': '广场', 'isOptional': False})
    self.client.post(url, {'name': '手机型号', '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')
    issue_id = response.data['data']['id']
    url = reverse('issues-detail', kwargs={'pk': issue_id})
    response = self.client.patch(url, {'extFields': {'手机型号': '苹果'}}, format='json')
    self.assertEqual(response.data['status'], status.HTTP_400_BAD_REQUEST)