fix: rename test methods to remove stale _in_backup suffix and test actual helper

This commit is contained in:
Chesars 2026-03-20 23:32:45 -03:00
parent 89a5a44ee0
commit 871df9f40b
2 changed files with 11 additions and 18 deletions

View file

@ -17,16 +17,9 @@ def test_get_model_cost_map():
def test_get_local_model_cost_map():
"""Test that we can load the local model cost map"""
from pathlib import Path
"""Test that load_local_model_cost_map returns a valid non-empty dict."""
from litellm.litellm_core_utils.get_model_cost_map import GetModelCostMap
# Test loading from project root (development scenario)
project_root = Path(__file__).parent.parent.parent
model_cost_map_path = project_root / "model_prices_and_context_window.json"
with open(model_cost_map_path, "r") as f:
print("inside local model cost map")
content = json.load(f)
print("content", content)
assert content is not None
assert len(content) > 0
content = GetModelCostMap.load_local_model_cost_map()
assert isinstance(content, dict)
assert len(content) > 0

View file

@ -52,33 +52,33 @@ class TestDeepSeekModelCostEntries:
"""Verify that provider-prefixed DeepSeek entries contain the same
capability flags as their bare-name counterparts in the JSON files."""
def test_deepseek_chat_supports_response_schema_in_backup(self):
def test_deepseek_chat_supports_response_schema(self):
data = _load_model_cost_json()
entry = data.get("deepseek/deepseek-chat", {})
assert entry.get("supports_response_schema") is True
def test_deepseek_reasoner_supports_response_schema_in_backup(self):
def test_deepseek_reasoner_supports_response_schema(self):
data = _load_model_cost_json()
entry = data.get("deepseek/deepseek-reasoner", {})
assert entry.get("supports_response_schema") is True
def test_deepseek_chat_supports_system_messages_in_backup(self):
def test_deepseek_chat_supports_system_messages(self):
data = _load_model_cost_json()
entry = data.get("deepseek/deepseek-chat", {})
assert entry.get("supports_system_messages") is True
def test_deepseek_reasoner_supports_system_messages_in_backup(self):
def test_deepseek_reasoner_supports_system_messages(self):
data = _load_model_cost_json()
entry = data.get("deepseek/deepseek-reasoner", {})
assert entry.get("supports_system_messages") is True
def test_deepseek_chat_max_input_tokens_matches_bare_in_backup(self):
def test_deepseek_chat_max_input_tokens_matches_bare(self):
data = _load_model_cost_json()
bare = data.get("deepseek-chat", {})
prefixed = data.get("deepseek/deepseek-chat", {})
assert prefixed.get("max_input_tokens") == bare.get("max_input_tokens")
def test_deepseek_reasoner_max_output_tokens_matches_bare_in_backup(self):
def test_deepseek_reasoner_max_output_tokens_matches_bare(self):
data = _load_model_cost_json()
bare = data.get("deepseek-reasoner", {})
prefixed = data.get("deepseek/deepseek-reasoner", {})