'Stops the serve_forever loop.
Blocks until the loop has finished. This must be called while
serve_forever() is running in another thread, or it will
deadlock.'

def shutdown(self):

    self.__serving = False
    if (not self.__is_shut_down.wait(2)):
        raise RuntimeError(u'Failed    to    shutdown    the    live    test    server    in    2    seconds.    The    server    might    be    stuck    or    generating    a    slow    response.')
