← Files Dispensa: lista de comprasARCHIVED FILE

tests/test_db.py

447 Bytes · Nov 15, 2026 · 06:36 UTC

↓ Download file

See the change to this file →

from mcp_despensa_hub.db import normalize_database_url


def test_normalize_database_url_troca_postgres_por_psycopg():
    assert (
        normalize_database_url("postgres://u:p@localhost/db")
        == "postgresql+psycopg://u:p@localhost/db"
    )
    assert (
        normalize_database_url("postgresql://u:p@localhost/db")
        == "postgresql+psycopg://u:p@localhost/db"
    )
    assert normalize_database_url("sqlite://") == "sqlite://"

SHA-256: c0ae929a8dcc180af3d15a3f194216c88596d8d47dd8d8910f2da6e76daa5a0f