def _check_active(self):
        port = int(os.read(self.pipein, 5))
        conn = httplib2.HTTPConnectionWithTimeout("localhost", port)
        try:
            conn.request("GET", "/")
            resp = conn.getresponse()
            return resp.status == 200
        except socket.error:
            return False
Check a wsgi service is active by making a GET request.
dataset/ETHPy150Open openstack/neutron/neutron/tests/functional/test_server.py/TestWsgiServer._check_active