- web_server = HTTPServer(('', 0), FakeGlowficHTTPRequestHandler)
- self._port = web_server.socket.getsockname()[1]
- self._thread = threading.Thread(target=web_server.serve_forever)
+ self._request_counter = 0
+ handler = type("Handler", (FakeGlowficHTTPRequestHandler,), {
+ '_notify_test': lambda _: self._count_request()})
+ self._web_server = HTTPServer(('', 0), handler)
+ self._thread = threading.Thread(target=self._web_server.serve_forever)