def create_app():
    """Initialize the Flask app, register blueprints and intialize all libraries like Swagger, database, the trace system...
    return the app and the database objects.
    :return:
    """
    ms = MyMicroservice(path=__file__)
    return ms.create_app()
Esempio n. 2
0
 def setUp(self):
     os.environ[CONFIGMAP_FILE_ENVIRONMENT] = os.path.join(
         self.BASE_DIR, "config-tests.yml")
     ms = MyMicroservice(path=os.path.join(
         os.path.dirname(os.path.dirname(__file__)), "test_views.py"))
     self.app = ms.create_app()
     self.base_url = self.app.config["APPLICATION_ROOT"]
     self.client = self.app.test_client()