MCPcopy
hub / github.com/aio-libs/aiohttp / test_unix_connector

Method test_unix_connector

tests/test_connector.py:782–799  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 3

create_unix_serverMethod · 0.95
requestMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected