MCPcopy
hub / github.com/psycopg/psycopg / test_dsn_no_password

Function test_dsn_no_password

tests/test_connection_info.py:147–153  ·  view source on GitHub ↗
(dsn)

Source from the content-addressed store, hash-verified

145
146
147def test_dsn_no_password(dsn):
148 dsn2 = make_conninfo(dsn, password="the-pass-word")
149 pgconn = psycopg.pq.PGconn.connect_start(dsn2.encode())
150 info = psycopg.ConnectionInfo(pgconn)
151 assert info.password == "the-pass-word"
152 assert "password" not in info.dsn
153 assert f"dbname={info.dbname}" in info.dsn
154
155
156def test_parameter_status(conn):

Callers

nothing calls this directly

Calls 2

make_conninfoFunction · 0.90
connect_startMethod · 0.45

Tested by

no test coverage detected