Skip to content
Myr

test_api.py

This file

Path

tests/requests_compat/test_api.py

29 lines · 826 bytes · Python

Last changed by

Document digest auth (#348)Yeray Diaz Diazbefore adoption8155352

History of this file

Take it

1"""Test compatibility with the Requests high-level API."""2import pytest3import requests456@pytest.mark.copied_from(7    "https://github.com/psf/requests/blob/v2.22.0/tests/test_requests.py#L61-L70"8)9def test_entrypoints():10    requests.session11    requests.session().get12    requests.session().head13    requests.get14    requests.head15    requests.put16    requests.patch17    requests.post181920@pytest.mark.copied_from(21    "https://github.com/psf/requests/blob/v2.22.0/tests/test_requests.py#L72",22    changes=["added noqa comment to silence flake8"],23)24@pytest.mark.xfail(25    reason="PoolManager has no obvious equivalent in HTTPX", raises=ImportError26)27def test_poolmanager_entrypoint():28    # Not really an entry point, but people rely on it.29    from requests.packages.urllib3.poolmanager import PoolManager  # noqa: F401