diff --git a/tests/unit_tests/provider/test_requester_base.py b/tests/unit_tests/provider/test_requester_base.py index c3acd7e0..325c0be0 100644 --- a/tests/unit_tests/provider/test_requester_base.py +++ b/tests/unit_tests/provider/test_requester_base.py @@ -223,11 +223,10 @@ def test_token_manager_next_token_empty(): """Test TokenManager.next_token with empty tokens doesn't error.""" mgr = token.TokenManager(name='test', tokens=[]) - # Should not error, but behavior is modulo 0 - # Actually this would cause ZeroDivisionError if next_token is called - # Let's check if it handles empty case - with pytest.raises(ZeroDivisionError): - mgr.next_token() + mgr.next_token() + + assert mgr.get_token() == '' + assert mgr.using_token_index == 0 # ============================================================================ @@ -633,4 +632,4 @@ def test_llm_model_info_optional_fields(): assert info.model_name is None assert info.tool_call_supported == False # default - assert info.vision_supported == False # default \ No newline at end of file + assert info.vision_supported == False # default