@@ -22,13 +22,14 @@ def _reload_capi_module():
2222
2323 def test_default_api_endpoint (self ):
2424 """Test that default API endpoint is set to models.github.ai/inference."""
25- from seclab_taskflow_agent .capi import AI_API_ENDPOINT , AI_API_ENDPOINT_ENUM
25+ import seclab_taskflow_agent .capi
2626 # When no env var is set, it should default to models.github.ai/inference
2727 # Note: We can't easily test this without manipulating the environment
2828 # so we'll just import and verify the constant exists
29- assert AI_API_ENDPOINT is not None
30- assert isinstance (AI_API_ENDPOINT , str )
31- assert urlparse (AI_API_ENDPOINT ).netloc == AI_API_ENDPOINT_ENUM .AI_API_MODELS_GITHUB
29+ endpoint = seclab_taskflow_agent .capi .AI_API_ENDPOINT
30+ assert endpoint is not None
31+ assert isinstance (endpoint , str )
32+ assert urlparse (endpoint ).netloc == AI_API_ENDPOINT_ENUM .AI_API_MODELS_GITHUB
3233
3334 def test_api_endpoint_env_override (self ):
3435 """Test that AI_API_ENDPOINT can be overridden by environment variable."""
@@ -43,8 +44,8 @@ def test_api_endpoint_env_override(self):
4344 # Reload the module to pick up the new env var
4445 self ._reload_capi_module ()
4546
46- from seclab_taskflow_agent .capi import AI_API_ENDPOINT
47- assert AI_API_ENDPOINT == test_endpoint
47+ import seclab_taskflow_agent .capi
48+ assert seclab_taskflow_agent . capi . AI_API_ENDPOINT == test_endpoint
4849 finally :
4950 # Restore original env
5051 if original_env is None :
0 commit comments