def create_app(self):
        """Overwrites this method is BaseTestCase

        :return: Flask app
        """
        app = create_app_blueprint('testing')
        return app
예제 #2
0
파일: manage.py 프로젝트: LucasJed/Photo
COV = coverage(branch=True,
               include='main/*',
               omit=[
                   'tests/*', 'wsgi.py', 'settings.py', '__init__.py',
                   'main/*/__init__.py'
                   'main/static/*'
                   'main/templates/*'
                   'main/import_policy/*'
                   'main/models/*'
               ])

COV.start()

# create flask application instance
app = create_app_blueprint('development')
manager = Manager(app)


@manager.command
def test():
    """Runs the unit tests without test coverage."""
    test_suite = unittest.TestLoader().discover('tests', pattern='test*.py')
    result = unittest.TextTestRunner(verbosity=2).run(test_suite)
    if result.wasSuccessful():
        return 0
    return 1


@manager.command
def cov():
 def create_app(self):
     # create a new instance of app
     app = create_app_blueprint(config_name)
     return app
예제 #4
0
# -*- coding: utf-8 -*-
""" Web Server Gateway Interface  """

import os
print('wsgi')

from server.main.api import create_app_blueprint

# create and load `.env` file here from the respective environment to overwrite the env settings
# before app is created.

application = create_app_blueprint(os.getenv('FLASK_CONFIG') or 'default')