Spaces:
Running
Running
| 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" | |
| ) | |