def test_redirected_stream(httpbin):
 with open(BIN_FILE_PATH, 'rb') as f:
  env = TestEnvironment(stdout_isatty=False, stdin_isatty=False, stdin=f)
  r = http('--pretty=none', '--stream', '--verbose', 'GET', (httpbin.url + '/get'), env=env)
 assert (BIN_FILE_CONTENT in r)

def test_redirected_stream ( httpbin ) : with open ( BIN_FILE_PATH , 'rb' ) as f : env = TestEnvironment ( stdout_isatty = False , stdin_isatty = False , stdin = f ) r = http ( '--pretty=none' , '--stream' , '--verbose' , 'GET' , ( httpbin . url + '/get' ) , env = env ) assert ( BIN_FILE_CONTENT in r )
test that --stream works with non-prettified redirected terminal output .