def test_constructor_postgresql(username, password, host, port, database, expected_url):
    """Test DBConfig.postgresql constructor creates the instance correctly.

    Args:
        username: Database username.
        password: Database password.
        host: Database host.
        port: Database port.
        database: Database name.
        expected_url: Expected database URL generated.
    """
    db_config = DBConfig.postgresql(
        username=username, password=password, host=host, port=port, database=database
    )
    assert db_config.engine == "postgresql"
    assert db_config.username == username
    assert db_config.password == password
    assert db_config.host == host
    assert db_config.port == port
    assert db_config.database == database
    assert db_config.get_url() == expected_url
Test DBConfig.postgresql constructor creates the instance correctly.

    Args:
        username: Database username.
        password: Database password.
        host: Database host.
        port: Database port.
        database: Database name.
        expected_url: Expected database URL generated.
    
tests/units/test_db_config.py