MCPcopy
hub / github.com/psycopg/psycopg / test_conninfo_parse_96

Function test_conninfo_parse_96

tests/pq/test_conninfo.py:34–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33@pytest.mark.libpq("< 10")
34def test_conninfo_parse_96():
35 conninfo = pq.Conninfo.parse(
36 b"postgresql://other@localhost/otherdb"
37 b"?connect_timeout=10&application_name=myapp"
38 )
39 info = {i.keyword: i.val for i in conninfo if i.val is not None}
40 assert info[b"host"] == b"localhost"
41 assert info[b"dbname"] == b"otherdb"
42 assert info[b"application_name"] == b"myapp"
43
44
45def test_conninfo_parse_bad():

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected