def run(self):
                app = create_app()
                app.config['TESTING'] = True
                app.config['LIVESERVER_PORT'] = ConvertTestCase.PORT

                # this route has to be added in order to ensure server is killed on
                # tearDown
                @app.route(ConvertTestCase.get_server_kill_route(), methods=['POST'])
                def shutdown():
                    request.environ.get('werkzeug.server.shutdown')()
                    return 'Server shutting down...'

                # Debug must be set to false - otherwise flask will try to bind signal,
                # which is not possible in the thread (not main process)
                app.run(port=ConvertTestCase.PORT, debug=False)
 def setUp(self):
     super(HepdataConverterWSTestCase, self).setUp()
     self.app = hepdata_converter_ws.create_app()
     self.app.config['TESTING'] = True
     self.app_client = self.app.test_client()
 def setUp(self):
     super(HepdataConverterWSTestCase, self).setUp()
     self.app = hepdata_converter_ws.create_app()
     self.app.config['TESTING'] = True
     self.app_client = self.app.test_client()