mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-28 15:45:22 -04:00
fix(endpoints): normalize URL handling (#4338)
This commit is contained in:
@@ -419,6 +419,14 @@ class TestClassifyEndpoint:
|
||||
def test_private_10(self):
|
||||
assert _classify_endpoint("http://10.0.0.5:8000") == "local"
|
||||
|
||||
@pytest.mark.parametrize("host", [
|
||||
"10.example-cloud.com",
|
||||
"172.16.example-cloud.com",
|
||||
"192.168.example-cloud.com",
|
||||
])
|
||||
def test_private_prefix_dns_names_are_api(self, host):
|
||||
assert _classify_endpoint(f"https://{host}/v1") == "api"
|
||||
|
||||
def test_public_api(self):
|
||||
assert _classify_endpoint("https://api.openai.com/v1") == "api"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user