def setUp(self): # This is a test of the test setup, # so it does not need to run as part of the unit test suite # You can re-enable it by commenting out the line below raise SkipTest # Create the server server_port = 8034 self.server_url = 'http://127.0.0.1:%d' % server_port self.server = MockXQueueServer(server_port, { 'correct': True, 'score': 1, 'msg': '' }) # Start the server in a separate daemon thread server_thread = threading.Thread(target=self.server.serve_forever) server_thread.daemon = True server_thread.start()