May be better: 
```
class VideoSourceHttpService(StubHttpService):
    """
    Simple HTTP server for serving HTML5 Video sources locally for tests
    """
    HANDLER_CLASS = VideoSourceRequestHandler
   def __init__(self, port_num=0):
       """
        Configure the server to listen on localhost.
        Default is to choose an arbitrary open port.
        """
        # Files are automatically served from the current directory
        # so we need to change it, start the server, then set it back.
        orig_wd = os.getcwd()
 
         # Set the path to root, which we will add on to with a setting
         # for root_dir when we start it up.
         os.chdir('/')
 
        StubHttpServicet.__init__(self, address, self.HANDLER_CLASS)
 
         # Reset the current working directory
         os.chdir(orig_wd)
 
         # Log the port we're using to help identify port conflict errors
         LOGGER.debug('Starting service on port {0}'.format(self.port))
```
and so you can get rid of shutdown and port?