(self)
| 780 | |
| 781 | @unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'requires unix') |
| 782 | def test_unix_connector(self): |
| 783 | @asyncio.coroutine |
| 784 | def handler(request): |
| 785 | return web.HTTPOk() |
| 786 | |
| 787 | app, srv, url, sock_path = self.loop.run_until_complete( |
| 788 | self.create_unix_server('get', '/', handler)) |
| 789 | |
| 790 | connector = aiohttp.UnixConnector(sock_path, loop=self.loop) |
| 791 | self.assertEqual(sock_path, connector.path) |
| 792 | |
| 793 | r = self.loop.run_until_complete( |
| 794 | client.request( |
| 795 | 'get', url, |
| 796 | connector=connector, |
| 797 | loop=self.loop)) |
| 798 | self.assertEqual(r.status, 200) |
| 799 | r.close() |
| 800 | |
| 801 | def test_connector_cookie_deprecation(self): |
| 802 | with self.assertWarnsRegex(DeprecationWarning, |
nothing calls this directly
no test coverage detected