Spaces:
Running
Running
Download tests/test_database_url.py from basyx/MediaRouter: direct link, hf CLI and curl.
- Browser
- Download file 621 Bytes
-
https://huggingface.co/spaces/basyx/MediaRouter/resolve/refs%2Fpr%2F5/tests/test_database_url.py
- Command line
-
hf download hf://spaces/basyx/MediaRouter@refs/pr/5/tests/test_database_url.py
-
curl -L -o test_database_url.py https://huggingface.co/spaces/basyx/MediaRouter/resolve/refs%2Fpr%2F5/tests/test_database_url.py
621 Bytes
| from app.core.database_url import normalize_async_database_url | |
| def test_bare_postgres_urls_use_the_installed_async_driver() -> None: | |
| assert ( | |
| normalize_async_database_url("postgresql://user:secret@db.example/app") | |
| == "postgresql+asyncpg://user:secret@db.example/app" | |
| ) | |
| assert ( | |
| normalize_async_database_url("postgres://user:secret@db.example/app") | |
| == "postgresql+asyncpg://user:secret@db.example/app" | |
| ) | |
| assert ( | |
| normalize_async_database_url("postgresql+asyncpg://user:secret@db.example/app") | |
| == "postgresql+asyncpg://user:secret@db.example/app" | |
| ) | |