Files
requests3/tests/test_requests.py
T
2019-04-21 14:41:38 -04:00

17 lines
338 B
Python

import requests3
from requests3 import HTTPSession
def httpbin_url(httpbin, s):
return f"{httpbin.url}{s}"
def test_idenpotent_methods(httpbin):
http = HTTPSession()
for method in ('get', 'head'):
url = httpbin_url(httpbin, f'/{method}')
r = http.request(method, url)
assert r.status_code == 200