# Path: server/websockets/test_client_server.py
# @asyncio.coroutine
# def handler(ws, path):
#     if path == '/attributes':
#         yield from ws.send(repr((ws.host, ws.port, ws.secure)))
#     elif path == '/headers':
#         yield from ws.send(str(ws.request_headers))
#         yield from ws.send(str(ws.response_headers))
#     elif path == '/raw_headers':
#         yield from ws.send(repr(ws.raw_request_headers))
#         yield from ws.send(repr(ws.raw_response_headers))
#     elif path == '/subprotocol':
#         yield from ws.send(repr(ws.subprotocol))
#     else:
#         yield from ws.send((yield from ws.recv()))


import asyncio
from ..client import *
from ..server import *
from ..test_client_server import handler
# Tests containing Python 3.5+ syntax, extracted from test_client_server.py.
# To avoid test discovery, this module's name must not start with test_.




class ClientServerContextManager:

    def setUp(self):
        self.loop = asyncio.new_event_loop()
        asyncio.set_event_loop(self.loop)


# Path: server/websockets/test_client_server.py
# @asyncio.coroutine
# def handler(ws, path):
#     if path == '/attributes':
#         yield from ws.send(repr((ws.host, ws.port, ws.secure)))
#     elif path == '/headers':
#         yield from ws.send(str(ws.request_headers))
#         yield from ws.send(str(ws.response_headers))
#     elif path == '/raw_headers':
#         yield from ws.send(repr(ws.raw_request_headers))
#         yield from ws.send(repr(ws.raw_response_headers))
#     elif path == '/subprotocol':
#         yield from ws.send(repr(ws.subprotocol))
#     else:
#         yield from ws.send((yield from ws.recv()))


# Path: server/websockets/py35/client_server.py
import asyncio
from ..client import *
from ..server import *
from ..test_client_server import handler

# Tests containing Python 3.5+ syntax, extracted from test_client_server.py.
# To avoid test discovery, this module's name must not start with test_.




class ClientServerContextManager:

    def setUp(self):
        self.loop = asyncio.new_event_loop()
        asyncio.set_event_loop(self.loop)


    def tearDown(self):