Fix Tests

This commit is contained in:
Nils Lindemann 2023-10-27 22:14:59 +02:00
parent da837b9bd0
commit fa886ebbbc
5 changed files with 20 additions and 160 deletions

View File

@ -67,6 +67,7 @@ def test_openapi_schema():
}
],
"requestBody": {
"required": True,
"content": {
"application/json": {
"schema": IsDict(
@ -98,16 +99,6 @@ def test_openapi_schema():
"type": "object",
"properties": {
"start_datetime": IsDict(
{
"title": "Start Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Start Datetime",
"type": "string",
@ -115,16 +106,6 @@ def test_openapi_schema():
}
),
"end_datetime": IsDict(
{
"title": "End Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "End Datetime",
"type": "string",
@ -151,21 +132,12 @@ def test_openapi_schema():
"process_after": IsDict(
{
"title": "Process After",
"anyOf": [
{"type": "string", "format": "duration"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Process After",
"type": "number",
"format": "time-delta",
"type": "string",
"format": "duration",
}
),
},
"required": ["start_datetime", "end_datetime", "process_after"],
},
"ValidationError": {
"title": "ValidationError",

View File

@ -67,6 +67,7 @@ def test_openapi_schema():
}
],
"requestBody": {
"required": True,
"content": {
"application/json": {
"schema": IsDict(
@ -98,16 +99,6 @@ def test_openapi_schema():
"type": "object",
"properties": {
"start_datetime": IsDict(
{
"title": "Start Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Start Datetime",
"type": "string",
@ -115,16 +106,6 @@ def test_openapi_schema():
}
),
"end_datetime": IsDict(
{
"title": "End Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "End Datetime",
"type": "string",
@ -151,21 +132,12 @@ def test_openapi_schema():
"process_after": IsDict(
{
"title": "Process After",
"anyOf": [
{"type": "string", "format": "duration"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Process After",
"type": "number",
"format": "time-delta",
"type": "string",
"format": "duration",
}
),
},
"required": ["start_datetime", "end_datetime", "process_after"],
},
"ValidationError": {
"title": "ValidationError",

View File

@ -76,6 +76,7 @@ def test_openapi_schema(client: TestClient):
}
],
"requestBody": {
"required": True,
"content": {
"application/json": {
"schema": IsDict(
@ -107,16 +108,6 @@ def test_openapi_schema(client: TestClient):
"type": "object",
"properties": {
"start_datetime": IsDict(
{
"title": "Start Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Start Datetime",
"type": "string",
@ -124,16 +115,6 @@ def test_openapi_schema(client: TestClient):
}
),
"end_datetime": IsDict(
{
"title": "End Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "End Datetime",
"type": "string",
@ -160,21 +141,12 @@ def test_openapi_schema(client: TestClient):
"process_after": IsDict(
{
"title": "Process After",
"anyOf": [
{"type": "string", "format": "duration"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Process After",
"type": "number",
"format": "time-delta",
"type": "string",
"format": "duration",
}
),
},
"required": ["start_datetime", "end_datetime", "process_after"],
},
"ValidationError": {
"title": "ValidationError",

View File

@ -76,6 +76,7 @@ def test_openapi_schema(client: TestClient):
}
],
"requestBody": {
"required": True,
"content": {
"application/json": {
"schema": IsDict(
@ -107,16 +108,6 @@ def test_openapi_schema(client: TestClient):
"type": "object",
"properties": {
"start_datetime": IsDict(
{
"title": "Start Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Start Datetime",
"type": "string",
@ -124,16 +115,6 @@ def test_openapi_schema(client: TestClient):
}
),
"end_datetime": IsDict(
{
"title": "End Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "End Datetime",
"type": "string",
@ -160,21 +141,12 @@ def test_openapi_schema(client: TestClient):
"process_after": IsDict(
{
"title": "Process After",
"anyOf": [
{"type": "string", "format": "duration"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Process After",
"type": "number",
"format": "time-delta",
"type": "string",
"format": "duration",
}
),
},
"required": ["start_datetime", "end_datetime", "process_after"],
},
"ValidationError": {
"title": "ValidationError",

View File

@ -76,6 +76,7 @@ def test_openapi_schema(client: TestClient):
}
],
"requestBody": {
"required": True,
"content": {
"application/json": {
"schema": IsDict(
@ -107,16 +108,6 @@ def test_openapi_schema(client: TestClient):
"type": "object",
"properties": {
"start_datetime": IsDict(
{
"title": "Start Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Start Datetime",
"type": "string",
@ -124,16 +115,6 @@ def test_openapi_schema(client: TestClient):
}
),
"end_datetime": IsDict(
{
"title": "End Datetime",
"anyOf": [
{"type": "string", "format": "date-time"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "End Datetime",
"type": "string",
@ -160,21 +141,12 @@ def test_openapi_schema(client: TestClient):
"process_after": IsDict(
{
"title": "Process After",
"anyOf": [
{"type": "string", "format": "duration"},
{"type": "null"},
],
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
{
"title": "Process After",
"type": "number",
"format": "time-delta",
"type": "string",
"format": "duration",
}
),
},
"required": ["start_datetime", "end_datetime", "process_after"],
},
"ValidationError": {
"title": "ValidationError",