Browse Source

fmt

pull/9837/head
JONEMI19 3 years ago
parent
commit
4ee9c097a2
  1. 152
      tests/test_application.py

152
tests/test_application.py

@ -1172,27 +1172,21 @@ def test_openapi_schema():
"required": False, "required": False,
"schema": { "schema": {
"additionalProperties": { "additionalProperties": {
"items": { "items": {"type": "integer"},
"type": "integer" "type": "array",
},
"type": "array"
}, },
"type": "object", "type": "object",
"title": "Query", "title": "Query",
"default": {} "default": {},
}, },
"name": "query", "name": "query",
"in": "query" "in": "query",
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "Successful Response", "description": "Successful Response",
"content": { "content": {"application/json": {"schema": {}}},
"application/json": {
"schema": {}
}
}
}, },
"422": { "422": {
"description": "Validation Error", "description": "Validation Error",
@ -1202,9 +1196,9 @@ def test_openapi_schema():
"$ref": "#/components/schemas/HTTPValidationError" "$ref": "#/components/schemas/HTTPValidationError"
} }
} }
} },
} },
} },
} }
}, },
"/query/mapping-params": { "/query/mapping-params": {
@ -1215,25 +1209,19 @@ def test_openapi_schema():
{ {
"required": False, "required": False,
"schema": { "schema": {
"additionalProperties": { "additionalProperties": {"type": "string"},
"type": "string"
},
"type": "object", "type": "object",
"title": "Queries", "title": "Queries",
"default": {} "default": {},
}, },
"name": "queries", "name": "queries",
"in": "query" "in": "query",
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "Successful Response", "description": "Successful Response",
"content": { "content": {"application/json": {"schema": {}}},
"application/json": {
"schema": {}
}
}
}, },
"422": { "422": {
"description": "Validation Error", "description": "Validation Error",
@ -1243,9 +1231,9 @@ def test_openapi_schema():
"$ref": "#/components/schemas/HTTPValidationError" "$ref": "#/components/schemas/HTTPValidationError"
} }
} }
} },
} },
} },
} }
}, },
"/query/mapping-sequence-params": { "/query/mapping-sequence-params": {
@ -1257,27 +1245,21 @@ def test_openapi_schema():
"required": False, "required": False,
"schema": { "schema": {
"additionalProperties": { "additionalProperties": {
"items": { "items": {"type": "integer"},
"type": "integer" "type": "array",
},
"type": "array"
}, },
"type": "object", "type": "object",
"title": "Queries", "title": "Queries",
"default": {} "default": {},
}, },
"name": "queries", "name": "queries",
"in": "query" "in": "query",
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "Successful Response", "description": "Successful Response",
"content": { "content": {"application/json": {"schema": {}}},
"application/json": {
"schema": {}
}
}
}, },
"422": { "422": {
"description": "Validation Error", "description": "Validation Error",
@ -1287,9 +1269,9 @@ def test_openapi_schema():
"$ref": "#/components/schemas/HTTPValidationError" "$ref": "#/components/schemas/HTTPValidationError"
} }
} }
} },
} },
} },
} }
}, },
"/query/mixed-params": { "/query/mixed-params": {
@ -1301,48 +1283,37 @@ def test_openapi_schema():
"required": False, "required": False,
"schema": { "schema": {
"additionalProperties": { "additionalProperties": {
"items": { "items": {"type": "string"},
"type": "string" "type": "array",
},
"type": "array"
}, },
"type": "object", "type": "object",
"title": "Sequence Mapping Queries", "title": "Sequence Mapping Queries",
"default": {} "default": {},
}, },
"name": "sequence_mapping_queries", "name": "sequence_mapping_queries",
"in": "query" "in": "query",
}, },
{ {
"required": True, "required": True,
"schema": { "schema": {
"additionalProperties": { "additionalProperties": {"type": "string"},
"type": "string"
},
"type": "object", "type": "object",
"title": "Mapping Query" "title": "Mapping Query",
}, },
"name": "mapping_query", "name": "mapping_query",
"in": "query" "in": "query",
}, },
{ {
"required": True, "required": True,
"schema": { "schema": {"type": "string", "title": "Query"},
"type": "string",
"title": "Query"
},
"name": "query", "name": "query",
"in": "query" "in": "query",
} },
], ],
"responses": { "responses": {
"200": { "200": {
"description": "Successful Response", "description": "Successful Response",
"content": { "content": {"application/json": {"schema": {}}},
"application/json": {
"schema": {}
}
}
}, },
"422": { "422": {
"description": "Validation Error", "description": "Validation Error",
@ -1352,9 +1323,9 @@ def test_openapi_schema():
"$ref": "#/components/schemas/HTTPValidationError" "$ref": "#/components/schemas/HTTPValidationError"
} }
} }
} },
} },
} },
} }
}, },
"/query/mixed-type-params": { "/query/mixed-type-params": {
@ -1366,62 +1337,49 @@ def test_openapi_schema():
"required": False, "required": False,
"schema": { "schema": {
"additionalProperties": { "additionalProperties": {
"items": { "items": {"type": "integer"},
"type": "integer" "type": "array",
},
"type": "array"
}, },
"type": "object", "type": "object",
"title": "Sequence Mapping Queries", "title": "Sequence Mapping Queries",
"default": {} "default": {},
}, },
"name": "sequence_mapping_queries", "name": "sequence_mapping_queries",
"in": "query" "in": "query",
}, },
{ {
"required": False, "required": False,
"schema": { "schema": {
"additionalProperties": { "additionalProperties": {"type": "string"},
"type": "string"
},
"type": "object", "type": "object",
"title": "Mapping Query Str", "title": "Mapping Query Str",
"default": {} "default": {},
}, },
"name": "mapping_query_str", "name": "mapping_query_str",
"in": "query" "in": "query",
}, },
{ {
"required": False, "required": False,
"schema": { "schema": {
"additionalProperties": { "additionalProperties": {"type": "integer"},
"type": "integer"
},
"type": "object", "type": "object",
"title": "Mapping Query Int", "title": "Mapping Query Int",
"default": {} "default": {},
}, },
"name": "mapping_query_int", "name": "mapping_query_int",
"in": "query" "in": "query",
}, },
{ {
"required": True, "required": True,
"schema": { "schema": {"type": "integer", "title": "Query"},
"type": "integer",
"title": "Query"
},
"name": "query", "name": "query",
"in": "query" "in": "query",
} },
], ],
"responses": { "responses": {
"200": { "200": {
"description": "Successful Response", "description": "Successful Response",
"content": { "content": {"application/json": {"schema": {}}},
"application/json": {
"schema": {}
}
}
}, },
"422": { "422": {
"description": "Validation Error", "description": "Validation Error",
@ -1431,11 +1389,11 @@ def test_openapi_schema():
"$ref": "#/components/schemas/HTTPValidationError" "$ref": "#/components/schemas/HTTPValidationError"
} }
} }
},
},
},
} }
} },
}
}
}
}, },
"components": { "components": {
"schemas": { "schemas": {

Loading…
Cancel
Save