Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox committed Nov 26, 2024
1 parent 8b69f04 commit 29c4dad
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion integration_tests/base_routes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import pathlib
from collections import defaultdict
from typing import Optional
from typing import Optional, List

from integration_tests.subroutes import di_subrouter, sub_router
from integration_tests.views import AsyncView, SyncView
Expand Down Expand Up @@ -559,6 +559,10 @@ async def async_dict_post():

# Body

class TestMyRequest(Body):
items: List[str]
numbers: list[int]


@app.post("/sync/body")
def sync_body_post(request: Request):
Expand All @@ -574,6 +578,11 @@ async def async_body_post(request: Request):
def sync_form_data(request: Request):
return request.headers["Content-Type"]

@app.post("/sync/body/typed")
def sync_body_typed(body: TestMyRequest):
# the server should just start
return "This is not tested with a request"


# JSON Request

Expand Down

0 comments on commit 29c4dad

Please sign in to comment.