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

Function test_quoted_db_uri

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

Source from the content-addressed store, hash-verified

445
446
447def test_quoted_db_uri(tmpdir):
448 with mock.patch.object(PGCli, "connect") as mock_connect:
449 cli = PGCli(pgclirc_file=str(tmpdir.join("rcfile")))
450 cli.connect_uri("postgres://bar%5E:%5Dfoo@baz.com/testdb%5B")
451 mock_connect.assert_called_with(database="testdb[", host="baz.com", user="bar^", passwd="]foo")
452
453
454def test_pg_service_file(tmpdir):

Callers

nothing calls this directly

Calls 2

connect_uriMethod · 0.95
PGCliClass · 0.90

Tested by

no test coverage detected