(create_app_and_client, loop, ssl_ctx)
| 230 | |
| 231 | @pytest.mark.run_loop |
| 232 | def test_client_ssl(create_app_and_client, loop, ssl_ctx): |
| 233 | connector = aiohttp.TCPConnector(verify_ssl=False, loop=loop) |
| 234 | |
| 235 | @asyncio.coroutine |
| 236 | def handler(request): |
| 237 | return web.HTTPOk(text='Test message') |
| 238 | |
| 239 | app, client = yield from create_app_and_client( |
| 240 | server_params=dict(ssl_ctx=ssl_ctx), |
| 241 | client_params=dict(connector=connector)) |
| 242 | app.router.add_route('GET', '/', handler) |
| 243 | |
| 244 | resp = yield from client.get('/') |
| 245 | try: |
| 246 | assert 200 == resp.status |
| 247 | txt = yield from resp.text() |
| 248 | assert txt == 'Test message' |
| 249 | finally: |
| 250 | yield from resp.release() |
| 251 | |
| 252 | |
| 253 | @pytest.mark.parametrize('fingerprint', [ |
nothing calls this directly
no test coverage detected