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

Function test_application_name_db_uri

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

Source from the content-addressed store, hash-verified

543
544
545def test_application_name_db_uri(tmpdir):
546 with mock.patch.object(PGExecute, "__init__") as mock_pgexecute:
547 mock_pgexecute.return_value = None
548 cli = PGCli(pgclirc_file=str(tmpdir.join("rcfile")))
549 cli.connect_uri("postgres://bar@baz.com/?application_name=cow")
550 mock_pgexecute.assert_called_with("bar", "bar", "", "baz.com", "", "", notify_callback, application_name="cow")
551
552
553@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

connect_uriMethod · 0.95
PGCliClass · 0.90

Tested by

no test coverage detected