Skip to content

Instantly share code, notes, and snippets.

@im-n1
Created October 27, 2019 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save im-n1/8f680e8f840c2010ca6fd51875418a23 to your computer and use it in GitHub Desktop.
Save im-n1/8f680e8f840c2010ca6fd51875418a23 to your computer and use it in GitHub Desktop.
def setup_server():
"""
Kicks off DummyWebServer.
"""
server = HTTPServer((HOST, PORT), DummyWebServer)
server.serve_forever()
# Start dummy server in a thread.
server_thread = threading.Thread(target=setup_server, daemon=True)
server_thread.start()
# Give some time to the server to start.
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment