from ttfrog import db
from ttfrog.pwic.pwic_admin import PwicConst


def test_db_init():
    config = db.init({"SALT": "salt", "DB_DEFAULT_PORT": "012345"})
    assert config.SALT == "salt"
    assert config.DEFAULTS["port"] == "012345"
    assert config.DEFAULTS["page"] == PwicConst.DEFAULTS["page"]
