Skip to content

Commit

Permalink
Add failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karpetrosyan committed Jul 13, 2024
1 parent acf7d15 commit 6d8116b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import json

import pytest

import httpcore


Expand All @@ -18,3 +20,8 @@ def test_request_with_content(httpbin):
response = httpcore.request("POST", url, content=b'{"hello":"world"}')
assert response.status == 200
assert json.loads(response.content)["json"] == {"hello": "world"}


def test_total_timeout(httpbin):
with pytest.raises(Exception):
httpcore.request("GET", httpbin.url + "/delay/1", timeout=0.1)

0 comments on commit 6d8116b

Please sign in to comment.