We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90bf9fc commit 81cd2a8Copy full SHA for 81cd2a8
2 files changed
openapi_python_sdk/oauth_client.py
@@ -35,7 +35,6 @@ def client(self) -> Any:
35
"""
36
if self._client is not None:
37
return self._client
38
-
39
if not hasattr(self._thread_local, "client"):
40
self._thread_local.client = httpx.Client(timeout=self.timeout)
41
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