MCPcopy Index your code
hub / github.com/dbcli/pgcli / test_port_db_uri

Function test_port_db_uri

tests/test_main.py:525–529  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

523
524
525def test_port_db_uri(tmpdir):
526 with mock.patch.object(PGCli, "connect") as mock_connect:
527 cli = PGCli(pgclirc_file=str(tmpdir.join("rcfile")))
528 cli.connect_uri("postgres://bar:foo@baz.com:2543/testdb")
529 mock_connect.assert_called_with(database="testdb", host="baz.com", user="bar", passwd="foo", port="2543")
530
531
532def test_multihost_db_uri(tmpdir):

Callers

nothing calls this directly

Calls 2

connect_uriMethod · 0.95
PGCliClass · 0.90

Tested by

no test coverage detected