MCPcopy Index your code
hub / github.com/httpie/cli / test_session_by_path

Method test_session_by_path

tests/test_sessions.py:192–202  ·  view source on GitHub ↗
(self, httpbin)

Source from the content-addressed store, hash-verified

190 assert HTTP_OK in r
191
192 def test_session_by_path(self, httpbin):
193 self.start_session(httpbin)
194 session_path = self.config_dir / 'session-by-path.json'
195 r1 = http('--session', str(session_path), 'GET', httpbin + '/get',
196 'Foo:Bar', env=self.env())
197 assert HTTP_OK in r1
198
199 r2 = http('--session', str(session_path), 'GET', httpbin + '/get',
200 env=self.env())
201 assert HTTP_OK in r2
202 assert r2.json['headers']['Foo'] == 'Bar'
203
204 def test_session_with_cookie_followed_by_another_header(self, httpbin):
205 """

Callers

nothing calls this directly

Calls 3

httpFunction · 0.85
envMethod · 0.80
start_sessionMethod · 0.45

Tested by

no test coverage detected