1
0
mirror of https://github.com/httpie/cli.git synced 2025-06-17 00:17:45 +02:00

Allow stdin to be a closed fd #791

This commit is contained in:
Jakub Roztocil
2019-08-29 13:39:42 +02:00
parent 07da8ea852
commit ced9212c1f
6 changed files with 12 additions and 4 deletions

View File

@ -310,7 +310,7 @@ class TestNoOptions:
assert 'GET /get HTTP/1.1' not in r
class TestIgnoreStdin:
class TestStdin:
def test_ignore_stdin(self, httpbin):
with open(FILE_PATH) as f:
@ -327,6 +327,10 @@ class TestIgnoreStdin:
assert r.exit_status == ExitStatus.ERROR
assert 'because --ignore-stdin' in r.stderr
def test_stdin_closed(self, httpbin):
r = http(httpbin + '/get', env=MockEnvironment(stdin=None))
assert HTTP_OK in r
class TestSchemes: