We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d47338 commit 7c7dc37Copy full SHA for 7c7dc37
2 files changed
openapi_python_sdk/oauth_client.py
@@ -34,7 +34,6 @@ def client(self) -> Any:
34
"""
35
if self._client is not None:
36
return self._client
37
-
38
if not hasattr(self._thread_local, "client"):
39
self._thread_local.client = httpx.Client()
40
return self._thread_local.client
tests/test_thread_safety.py
@@ -1,8 +1,11 @@
1
import threading
2
import unittest
3
-from openapi_python_sdk import Client, OauthClient
+
4
import httpx
5
6
+from openapi_python_sdk import Client, OauthClient
7
8
9
class TestThreadSafety(unittest.TestCase):
10
def test_oauth_client_thread_safety(self):
11
oauth = OauthClient(username="user", apikey="key")
0 commit comments