(tmpdir)
| 505 | |
| 506 | |
| 507 | def test_ssl_db_uri(tmpdir): |
| 508 | with mock.patch.object(PGCli, "connect") as mock_connect: |
| 509 | cli = PGCli(pgclirc_file=str(tmpdir.join("rcfile"))) |
| 510 | cli.connect_uri( |
| 511 | "postgres://bar%5E:%5Dfoo@baz.com/testdb%5B?sslmode=verify-full&sslcert=m%79.pem&sslkey=my-key.pem&sslrootcert=c%61.pem" |
| 512 | ) |
| 513 | mock_connect.assert_called_with( |
| 514 | database="testdb[", |
| 515 | host="baz.com", |
| 516 | user="bar^", |
| 517 | passwd="]foo", |
| 518 | sslmode="verify-full", |
| 519 | sslcert="my.pem", |
| 520 | sslkey="my-key.pem", |
| 521 | sslrootcert="ca.pem", |
| 522 | ) |
| 523 | |
| 524 | |
| 525 | def test_port_db_uri(tmpdir): |
nothing calls this directly
no test coverage detected