Skip to content

Commit 5ae974b

Browse files
Add to_url tests
1 parent 4a27b3b commit 5ae974b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_api_endpoint_config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,13 @@ def test_api_endpoint_env_override(self):
4343
if original_env:
4444
os.environ['AI_API_ENDPOINT'] = original_env
4545

46+
def test_to_url_models_github(self):
47+
endpoint = AI_API_ENDPOINT_ENUM.AI_API_MODELS_GITHUB
48+
assert endpoint.to_url() == 'https://models.github.ai/inference'
49+
50+
def test_to_url_githubcopilot(self):
51+
endpoint = AI_API_ENDPOINT_ENUM.AI_API_GITHUBCOPILOT
52+
assert endpoint.to_url() == 'https://api.githubcopilot.com'
53+
4654
if __name__ == '__main__':
4755
pytest.main([__file__, '-v'])

0 commit comments

Comments
 (0)