The previous_delegate and current_delegate fields are nullable.
Signed-off-by: Stephen Finucane <stephen@that.guru>
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Previous delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Current delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
title: Check create event
description: |
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Previous delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Current delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
title: Check create event
description: |
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Previous delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Current delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
title: Check create event
description: |
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Previous delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Current delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
title: Check create event
description: |
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Previous delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Current delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
title: Check create event
description: |
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Previous delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- $ref: '#/components/schemas/UserEmbedded'
+ title: Current delegate
+ type:
+ - 'null'
+ - 'object'
+ oneOf:
+ - type: 'null'
+ - $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
title: Check create event
description: |
from django.test import override_settings
from django.urls import reverse
from rest_framework import status
-from rest_framework.test import APITestCase
-
from patchwork.models import Event
from patchwork.tests.api import utils
from patchwork.tests.utils import create_state
-# FIXME(stephenfin: This should inherit from 'utils.APITestCase', but we need
-# to fix our schema to work with recent versions of openapi_core
@override_settings(ENABLE_REST_API=True)
-class TestEventAPI(APITestCase):
+class TestEventAPI(utils.APITestCase):
@staticmethod
def api_url(version=None):
kwargs = {}