1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Fix --raw with --chunked (#1254)

* Fix --raw with --chunked

* Better naming / annotations

* More annotations
This commit is contained in:
Batuhan Taskaya
2021-12-29 12:41:44 +03:00
committed by GitHub
parent 0e10e23dca
commit 4c56d894ba
4 changed files with 133 additions and 75 deletions

View File

@@ -1,4 +1,5 @@
import os
import json
import pytest
@@ -70,6 +71,18 @@ def test_chunked_stdin_multiple_chunks(httpbin_with_chunked_support):
assert r.count(FILE_CONTENT) == 4
def test_chunked_raw(httpbin_with_chunked_support):
r = http(
'--verbose',
'--chunked',
httpbin_with_chunked_support + '/post',
'--raw',
json.dumps({'a': 1, 'b': '2fafds', 'c': '🥰'}),
)
assert HTTP_OK in r
assert 'Transfer-Encoding: chunked' in r
class TestMultipartFormDataFileUpload:
def test_non_existent_file_raises_parse_error(self, httpbin):