Spaces:
Paused
Paused
Download tests/test_litellm/proxy/test_proxy_utils.py from DesertWolf/test3: direct link, hf CLI and curl.
- Browser
- Download file 518 Bytes
-
https://huggingface.co/spaces/DesertWolf/test3/resolve/main/tests/test_litellm/proxy/test_proxy_utils.py
- Command line
-
hf download hf://spaces/DesertWolf/test3/tests/test_litellm/proxy/test_proxy_utils.py
-
curl -L -o test_proxy_utils.py https://huggingface.co/spaces/DesertWolf/test3/resolve/main/tests/test_litellm/proxy/test_proxy_utils.py
518 Bytes
| import json | |
| import os | |
| import sys | |
| import pytest | |
| from fastapi.testclient import TestClient | |
| sys.path.insert( | |
| 0, os.path.abspath("../../..") | |
| ) # Adds the parent directory to the system path | |
| from unittest.mock import MagicMock | |
| from litellm.proxy.utils import get_custom_url | |
| def test_get_custom_url(monkeypatch): | |
| monkeypatch.setenv("SERVER_ROOT_PATH", "/litellm") | |
| custom_url = get_custom_url(request_base_url="http://0.0.0.0:4000", route="ui/") | |
| assert custom_url == "http://0.0.0.0:4000/litellm/ui/" | |