MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / test_initialize_globals

Function test_initialize_globals

tests/api_utils/test_app.py:244–257  ·  view source on GitHub ↗

Test _initialize_globals helper.

()

Source from the content-addressed store, hash-verified

242
243
244def test_initialize_globals():
245 """Test _initialize_globals helper."""
246 # Ensure state starts clean
247 state.request_queue = None
248 state.processing_lock = None
249
250 with patch("api_utils.auth_utils.initialize_keys") as mock_init_keys:
251 _initialize_globals()
252
253 assert state.request_queue is not None
254 assert state.processing_lock is not None
255 assert state.model_switching_lock is not None
256 assert state.params_cache_lock is not None
257 mock_init_keys.assert_called_once()
258
259
260def test_initialize_proxy_settings_no_port():

Callers

nothing calls this directly

Calls 1

_initialize_globalsFunction · 0.90

Tested by

no test coverage detected