diff --git a/conftest.py b/conftest.py new file mode 100644 index 000000000..b2488d926 --- /dev/null +++ b/conftest.py @@ -0,0 +1,12 @@ +import pytest + +import requests + +@pytest.fixture() +def http_client(): + sess = requests.Session() + adapter = requests.adapters.HTTPAdapter(pool_connections=100, + pool_maxsize=100) + sess.mount('http://', adapter) + sess.mount('https://', adapter) + return sess diff --git a/oauth/test/test_oidc.py b/oauth/test/test_oidc.py index e8bdd0c0e..4f15bfe0d 100644 --- a/oauth/test/test_oidc.py +++ b/oauth/test/test_oidc.py @@ -6,7 +6,6 @@ import urlparse import jwt import pytest -import requests from httmock import urlmatch, HTTMock from Crypto.PublicKey import RSA @@ -14,15 +13,6 @@ from jwkest.jwk import RSAKey from oauth.oidc import OIDCLoginService, OAuthLoginException -@pytest.fixture() -def http_client(): - sess = requests.Session() - adapter = requests.adapters.HTTPAdapter(pool_connections=100, - pool_maxsize=100) - sess.mount('http://', adapter) - sess.mount('https://', adapter) - return sess - @pytest.fixture(params=[True, False]) def app_config(http_client, request): return {