Test _initialize_globals helper.
()
| 242 | |
| 243 | |
| 244 | def 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 | |
| 260 | def test_initialize_proxy_settings_no_port(): |
nothing calls this directly
no test coverage detected