Example #1
0
    def setUp(self):
        """
        Method for setUp TestCategoryController test module
        :return: OK or ERROR
        """
        self.app = create_app('development')
        self.app.testing = True
        self.client = self.app.test_client()
        self.ctx = self.app.app_context()
        self.ctx.push()

        self.faker = Faker()

        self.test_category_controller = TestCategoryController(
            test_category=TestCategory(name=self.faker.name()))
Example #2
0
import os
from flask_migrate import MigrateCommand
from flask_script import Manager
from FlaskProject import create_app

env = os.environ.get("FLASK_PROJECT", "default")

app = create_app(env)

manager = Manager(app=app)
manager.add_command("db", MigrateCommand)

if __name__ == "__main__":
    manager.run()
Example #3
0
from FlaskProject import create_app

app = create_app()

if __name__ == '__main__':
    app.run(debug=True)