mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-29 16:12:06 -04:00
test: split endpoint resolver tests (#4957)
This commit is contained in:
committed by
GitHub
parent
fbe3a0d73b
commit
259662e914
@@ -0,0 +1,16 @@
|
||||
"""Tests for endpoint_resolver — request header construction."""
|
||||
from src.endpoint_resolver import build_headers
|
||||
|
||||
|
||||
class TestBuildHeaders:
|
||||
def test_no_key(self):
|
||||
assert build_headers(None, "https://api.openai.com/v1") == {}
|
||||
|
||||
def test_openai_bearer(self):
|
||||
assert build_headers("sk-abc", "https://api.openai.com/v1") == {"Authorization": "Bearer sk-abc"}
|
||||
|
||||
def test_anthropic_headers(self):
|
||||
assert build_headers("sk-ant-abc", "https://api.anthropic.com") == {"x-api-key": "sk-ant-abc", "anthropic-version": "2023-06-01"}
|
||||
|
||||
def test_empty_key(self):
|
||||
assert build_headers("", "https://api.openai.com/v1") == {}
|
||||
Reference in New Issue
Block a user