mirror of
https://github.com/httpie/cli.git
synced 2025-06-28 21:41:47 +02:00
Cleanup
This commit is contained in:
parent
2f8d330b57
commit
8cb1af7376
@ -1,18 +1,16 @@
|
|||||||
"""High-level tests."""
|
"""High-level tests."""
|
||||||
import io
|
import io
|
||||||
import sys
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
import httpie
|
||||||
import httpie.__main__
|
import httpie.__main__
|
||||||
|
from fixtures import FILE_CONTENT, FILE_PATH
|
||||||
|
from httpie.cli.exceptions import ParseError
|
||||||
from httpie.context import Environment
|
from httpie.context import Environment
|
||||||
from httpie.status import ExitStatus
|
from httpie.status import ExitStatus
|
||||||
from httpie.cli.exceptions import ParseError
|
from utils import HTTP_OK, MockEnvironment, StdinBytesIO, http
|
||||||
from utils import MockEnvironment, StdinBytesIO, http, HTTP_OK
|
|
||||||
from fixtures import FILE_PATH, FILE_CONTENT, FILE_PATH_ARG
|
|
||||||
|
|
||||||
import httpie
|
|
||||||
|
|
||||||
|
|
||||||
def test_main_entry_point():
|
def test_main_entry_point():
|
||||||
@ -100,7 +98,9 @@ def test_POST_form(httpbin_both):
|
|||||||
def test_POST_form_multiple_values(httpbin_both):
|
def test_POST_form_multiple_values(httpbin_both):
|
||||||
r = http('--form', 'POST', httpbin_both + '/post', 'foo=bar', 'foo=baz')
|
r = http('--form', 'POST', httpbin_both + '/post', 'foo=bar', 'foo=baz')
|
||||||
assert HTTP_OK in r
|
assert HTTP_OK in r
|
||||||
assert r.json['form'] == {'foo': ['bar', 'baz']}
|
assert r.json['form'] == {
|
||||||
|
'foo': ['bar', 'baz']
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def test_POST_stdin(httpbin_both):
|
def test_POST_stdin(httpbin_both):
|
||||||
@ -182,4 +182,4 @@ def test_json_input_preserve_order(httpbin_both):
|
|||||||
'order:={"map":{"1":"first","2":"second"}}')
|
'order:={"map":{"1":"first","2":"second"}}')
|
||||||
assert HTTP_OK in r
|
assert HTTP_OK in r
|
||||||
assert r.json['data'] == \
|
assert r.json['data'] == \
|
||||||
'{"order": {"map": {"1": "first", "2": "second"}}}'
|
'{"order": {"map": {"1":Clean "first", "2": "second"}}}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user