Fix stale test assertions and truthsocial pytest dependency
- test_models: update xAI model expectations to grok-4-1-fast (matching current XAI_POLICY_MAP) - test_openai_reddit: update fallback order assertion to gpt-4.1 (matching current MODEL_FALLBACK_ORDER) - test_codex_auth: expect 'reddit' not 'web' when no API keys (Reddit is available via public JSON fallback) - test_truthsocial: convert from pytest-style classes to unittest.TestCase, fix import path to use sys.path.insert pattern (matching all other tests)
This commit is contained in:
@@ -84,7 +84,7 @@ class TestSelectXAIModel(unittest.TestCase):
|
||||
"fake-key",
|
||||
policy="latest"
|
||||
)
|
||||
self.assertEqual(result, "grok-4-latest")
|
||||
self.assertEqual(result, "grok-4-1-fast")
|
||||
|
||||
def test_stable_policy(self):
|
||||
# Clear cache first to avoid interference
|
||||
@@ -94,7 +94,7 @@ class TestSelectXAIModel(unittest.TestCase):
|
||||
"fake-key",
|
||||
policy="stable"
|
||||
)
|
||||
self.assertEqual(result, "grok-4")
|
||||
self.assertEqual(result, "grok-4-1-fast")
|
||||
|
||||
def test_pinned_policy(self):
|
||||
result = models.select_xai_model(
|
||||
@@ -125,10 +125,10 @@ class TestGetModels(unittest.TestCase):
|
||||
"XAI_API_KEY": "xai-test",
|
||||
}
|
||||
mock_openai = [{"id": "gpt-5.2", "created": 1704067200}]
|
||||
mock_xai = [{"id": "grok-4-latest", "created": 1704067200}]
|
||||
mock_xai = [{"id": "grok-4-1-fast", "created": 1704067200}]
|
||||
result = models.get_models(config, mock_openai, mock_xai)
|
||||
self.assertEqual(result["openai"], "gpt-5.2")
|
||||
self.assertEqual(result["xai"], "grok-4-latest")
|
||||
self.assertEqual(result["xai"], "grok-4-1-fast")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user