Files
GTI_GERENCIADOR_FISCAL/central/tests/test_config.py
T

12 lines
391 B
Python

import importlib
def test_database_url_encodes_password_from_component_environment(monkeypatch):
monkeypatch.delenv("DATABASE_URL", raising=False)
monkeypatch.setenv("POSTGRES_PASSWORD", "a@b/c")
import central.app.config as config
module = importlib.reload(config)
assert module.settings.database_url == "postgresql+psycopg://gti:a%40b%2Fc@postgres:5432/gti_fiscal"