@@ -16,38 +16,49 @@ def base_url():
1616
1717
1818@pytest .fixture
19- def mpt_vendor ( base_url ):
20- return MPTClient . from_config ( api_token = os .getenv ("MPT_API_TOKEN_VENDOR" ), base_url = base_url ) # type: ignore
19+ def api_timeout ( ):
20+ return float ( os .getenv ("MPT_API_TIMEOUT" , "60.0" ))
2121
2222
2323@pytest .fixture
24- def async_mpt_vendor (base_url ):
24+ def mpt_vendor (base_url , api_timeout ):
25+ return MPTClient .from_config (
26+ api_token = os .getenv ("MPT_API_TOKEN_VENDOR" ), base_url = base_url , timeout = api_timeout
27+ ) # type: ignore
28+
29+
30+ @pytest .fixture
31+ def async_mpt_vendor (base_url , api_timeout ):
2532 return AsyncMPTClient .from_config (
26- api_token = os .getenv ("MPT_API_TOKEN_VENDOR" ), base_url = base_url
33+ api_token = os .getenv ("MPT_API_TOKEN_VENDOR" ), base_url = base_url , timeout = api_timeout
2734 ) # type: ignore
2835
2936
3037@pytest .fixture
31- def mpt_ops (base_url ):
32- return MPTClient .from_config (api_token = os .getenv ("MPT_API_TOKEN_OPERATIONS" ), base_url = base_url ) # type: ignore
38+ def mpt_ops (base_url , api_timeout ):
39+ return MPTClient .from_config (
40+ api_token = os .getenv ("MPT_API_TOKEN_OPERATIONS" ), base_url = base_url , timeout = api_timeout
41+ ) # type: ignore
3342
3443
3544@pytest .fixture
36- def async_mpt_ops (base_url ):
45+ def async_mpt_ops (base_url , api_timeout ):
3746 return AsyncMPTClient .from_config (
38- api_token = os .getenv ("MPT_API_TOKEN_OPERATIONS" ), base_url = base_url
47+ api_token = os .getenv ("MPT_API_TOKEN_OPERATIONS" ), base_url = base_url , timeout = api_timeout
3948 ) # type: ignore
4049
4150
4251@pytest .fixture
43- def mpt_client (base_url ):
44- return MPTClient .from_config (api_token = os .getenv ("MPT_API_TOKEN_CLIENT" ), base_url = base_url ) # type: ignore
52+ def mpt_client (base_url , api_timeout ):
53+ return MPTClient .from_config (
54+ api_token = os .getenv ("MPT_API_TOKEN_CLIENT" ), base_url = base_url , timeout = api_timeout
55+ ) # type: ignore
4556
4657
4758@pytest .fixture
48- def async_mpt_client (base_url ):
59+ def async_mpt_client (base_url , api_timeout ):
4960 return AsyncMPTClient .from_config (
50- api_token = os .getenv ("MPT_API_TOKEN_CLIENT" ), base_url = base_url
61+ api_token = os .getenv ("MPT_API_TOKEN_CLIENT" ), base_url = base_url , timeout = api_timeout
5162 ) # type: ignore
5263
5364
0 commit comments