Skip to content

Commit

Permalink
Add api test
Browse files Browse the repository at this point in the history
  • Loading branch information
lundberg committed Mar 15, 2024
1 parent f4ddfb3 commit 78d8e8a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,15 @@ def test_json_post_body():
assert get_route.called


def test_data_post_body():
with respx.mock:
url = "https://foo.bar/"
route = respx.post(url, data={"foo": "bar"}) % 201
response = httpx.post(url, data={"foo": "bar"}, files={"file": b"..."})
assert response.status_code == 201
assert route.called


async def test_raising_content(client):
async with MockRouter() as respx_mock:
url = "https://foo.bar/"
Expand Down

0 comments on commit 78d8e8a

Please sign in to comment.