title: How to emulate a http.server for faster unittest in python3?
body: <p>I am trying to emulate a http server on localhost for faster testing.</p>
  
  <p>ex:</p>
  
  <pre><code>import my_module
  
  class RequestsTestCase(unittest.TestCase):
      def setUp(self):
          # ...
          html = 'hello, world'
          my_server = MyServer(html, 8888)
          my_server.run()
          ...
  
      def test_my_module_request_phrase(self):
          response = my_module.get_phrase('http://localhost:8888/')
          self.assertEqual(response, 'hello, world')
  </code></pre>
  
  <p>Is something like this possible using python 3?</p>