MCPcopy
hub / github.com/httpie/cli / test_POST_stdin

Function test_POST_stdin

tests/test_httpie.py:109–116  ·  view source on GitHub ↗
(httpbin_both)

Source from the content-addressed store, hash-verified

107
108
109def test_POST_stdin(httpbin_both):
110 env = MockEnvironment(
111 stdin=StdinBytesIO(FILE_PATH.read_bytes()),
112 stdin_isatty=False,
113 )
114 r = http('--form', 'POST', httpbin_both + '/post', env=env)
115 assert HTTP_OK in r
116 assert FILE_CONTENT in r
117
118
119def test_POST_file(httpbin_both):

Callers

nothing calls this directly

Calls 3

MockEnvironmentClass · 0.85
StdinBytesIOClass · 0.85
httpFunction · 0.85

Tested by

no test coverage detected