mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-29 03:04:49 -04:00
🔥 Remove Pydantic v1 specific test variants (#14611)
This commit is contained in:
committed by
GitHub
parent
8322a4445a
commit
44c849c4fc
@@ -1,7 +1,6 @@
|
||||
import importlib
|
||||
|
||||
import pytest
|
||||
from dirty_equals import IsDict
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from ...utils import needs_py310
|
||||
@@ -67,16 +66,10 @@ def test_openapi_schema(client: TestClient):
|
||||
"parameters": [
|
||||
{
|
||||
"required": False,
|
||||
"schema": IsDict(
|
||||
{
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"title": "User-Agent",
|
||||
}
|
||||
)
|
||||
| IsDict(
|
||||
# TODO: remove when deprecating Pydantic v1
|
||||
{"title": "User-Agent", "type": "string"}
|
||||
),
|
||||
"schema": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"title": "User-Agent",
|
||||
},
|
||||
"name": "user-agent",
|
||||
"in": "header",
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import importlib
|
||||
|
||||
import pytest
|
||||
from dirty_equals import IsDict
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from ...utils import needs_py310
|
||||
@@ -78,16 +77,10 @@ def test_openapi_schema(client: TestClient):
|
||||
"parameters": [
|
||||
{
|
||||
"required": False,
|
||||
"schema": IsDict(
|
||||
{
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"title": "Strange Header",
|
||||
}
|
||||
)
|
||||
| IsDict(
|
||||
# TODO: remove when deprecating Pydantic v1
|
||||
{"title": "Strange Header", "type": "string"}
|
||||
),
|
||||
"schema": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"title": "Strange Header",
|
||||
},
|
||||
"name": "strange_header",
|
||||
"in": "header",
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import importlib
|
||||
|
||||
import pytest
|
||||
from dirty_equals import IsDict
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from ...utils import needs_py310
|
||||
@@ -56,23 +55,13 @@ def test_openapi_schema(client: TestClient):
|
||||
"parameters": [
|
||||
{
|
||||
"required": False,
|
||||
"schema": IsDict(
|
||||
{
|
||||
"title": "X-Token",
|
||||
"anyOf": [
|
||||
{"type": "array", "items": {"type": "string"}},
|
||||
{"type": "null"},
|
||||
],
|
||||
}
|
||||
)
|
||||
| IsDict(
|
||||
# TODO: remove when deprecating Pydantic v1
|
||||
{
|
||||
"title": "X-Token",
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
}
|
||||
),
|
||||
"schema": {
|
||||
"title": "X-Token",
|
||||
"anyOf": [
|
||||
{"type": "array", "items": {"type": "string"}},
|
||||
{"type": "null"},
|
||||
],
|
||||
},
|
||||
"name": "x-token",
|
||||
"in": "header",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user