Skip to content

Commit 010fcfa

Browse files
committed
Remove temp_env util function
1 parent 6db454d commit 010fcfa

File tree

3 files changed

+3
-51
lines changed

3 files changed

+3
-51
lines changed

tests/client/test_http.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import json
2323
import multiprocessing
24+
import os
2425

2526
import queue
2627
import random
@@ -51,7 +52,7 @@
5152
_get_socket_opts,
5253
_remove_certs_for_non_https,
5354
)
54-
from tests.client.utils import temp_env
55+
5556
from tests.conftest import REQUEST_PATH, fake_response
5657

5758
mocked_request = MagicMock(spec=urllib3.response.HTTPResponse)
@@ -379,7 +380,7 @@ def test_client_ca():
379380
"""
380381
Verify that if env variable `REQUESTS_CA_BUNDLE` is set, certs are loaded into the pool.
381382
"""
382-
with temp_env(REQUESTS_CA_BUNDLE=certifi.where()):
383+
with patch.dict(os.environ, dict(REQUEST_PATH=certifi.where()), clear=True):
383384
client = Client("http://127.0.0.1:4200")
384385
assert 'ca_certs' in client._pool_kw
385386

tests/client/test_utils.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/client/utils.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)