Skip to content

Commit 6517341

Browse files
committed
test https except 100 continue
1 parent 76ac0b0 commit 6517341

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/test_integration.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,19 @@ def test_https_binary_response(self):
154154
finally:
155155
client.close()
156156

157+
def test_https_expect_100_continue(self):
158+
"""Test Expect: 100-continue with real server"""
159+
client = uhttp_client.HttpClient('https://httpbin.org')
160+
try:
161+
body = b'test data for 100 continue'
162+
response = client.post(
163+
'/post', data=body, expect_continue=True).wait()
164+
self.assertEqual(response.status, 200)
165+
# httpbin echoes back the data
166+
self.assertEqual(response.json()['data'], body.decode())
167+
finally:
168+
client.close()
169+
157170

158171
@unittest.skipIf(not HTTPBIN_AVAILABLE, SKIP_REASON)
159172
class TestHTTPSAuthIntegration(unittest.TestCase):

0 commit comments

Comments
 (0)