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

Function test_multihost_db_uri

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

Source from the content-addressed store, hash-verified

530
531
532def test_multihost_db_uri(tmpdir):
533 with mock.patch.object(PGCli, "connect") as mock_connect:
534 cli = PGCli(pgclirc_file=str(tmpdir.join("rcfile")))
535 cli.connect_uri("postgres://bar:foo@baz1.com:2543,baz2.com:2543,baz3.com:2543/testdb")
536 mock_connect.assert_called_with(
537 database="testdb",
538 host="baz1.com,baz2.com,baz3.com",
539 user="bar",
540 passwd="foo",
541 port="2543,2543,2543",
542 )
543
544
545def test_application_name_db_uri(tmpdir):

Callers

nothing calls this directly

Calls 2

connect_uriMethod · 0.95
PGCliClass · 0.90

Tested by

no test coverage detected