You've already forked httpie-cli
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:
@ -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:
|
||||
|
||||
|
Reference in New Issue
Block a user