(
self, sslmode, *, host='localhost',
exc_type=asyncpg.InvalidAuthorizationSpecificationError,
)
| 2128 | host=host, user='ssl_user', expected_ssl=expected_ssl) |
| 2129 | |
| 2130 | async def _test_sslmode_fails( |
| 2131 | self, sslmode, *, host='localhost', |
| 2132 | exc_type=asyncpg.InvalidAuthorizationSpecificationError, |
| 2133 | ): |
| 2134 | # XXX: uvloop artifact |
| 2135 | old_handler = self.loop.get_exception_handler() |
| 2136 | try: |
| 2137 | self.loop.set_exception_handler(lambda *args: None) |
| 2138 | with self.assertRaises(exc_type): |
| 2139 | await self._test_works( |
| 2140 | dsn='postgresql://foo/?sslmode=' + sslmode, |
| 2141 | host=host, user='ssl_user') |
| 2142 | finally: |
| 2143 | self.loop.set_exception_handler(old_handler) |
| 2144 | |
| 2145 | async def _test_connect_interruption(self, *, ready, cancel, **conn_args): |
| 2146 | async def connect(): |
no test coverage detected