You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
@@ -22,6 +22,7 @@ def test_default_headers_case_insensitive(httpbin):
|
||||
assert 'Content-Type' not in r
|
||||
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
class TestImplicitHTTPMethod:
|
||||
def test_implicit_GET(self, httpbin):
|
||||
r = http(httpbin.url + '/get')
|
||||
@@ -51,9 +52,9 @@ class TestImplicitHTTPMethod:
|
||||
|
||||
class TestAutoContentTypeAndAcceptHeaders:
|
||||
"""
|
||||
Test that Accept and Content-Type correctly defaults to JSON,
|
||||
but can still be overridden. The same with Content-Type when --form
|
||||
-f is used.
|
||||
Test that `Accept` and `Content-Type` correctly default to JSON,
|
||||
but can still be overridden. The same with Content-Type when `--form`
|
||||
`-f` is used.
|
||||
|
||||
"""
|
||||
|
||||
@@ -84,7 +85,7 @@ class TestAutoContentTypeAndAcceptHeaders:
|
||||
assert r.json['headers']['Accept'] == JSON_ACCEPT
|
||||
assert r.json['headers']['Content-Type'] == 'application/json'
|
||||
|
||||
def test_POST_explicit_JSON_auto_JSON_accept(self, httpbin):
|
||||
def test_POST_explicit_JSON_JSON_ACCEPT(self, httpbin):
|
||||
r = http('--json', 'POST', httpbin.url + '/post')
|
||||
assert HTTP_OK in r
|
||||
assert r.json['headers']['Accept'] == JSON_ACCEPT
|
||||
|
Reference in New Issue
Block a user