Exemplo n.º 1
0
    def setUp(self):
        self.app = create_app(**test_config)
        self.client = self.app.test_client()
        self.db = db

        self._ctx = self.app.test_request_context()
        self._ctx.push()

        with self.app.app_context():
            self.db.create_all()

        # create test model
        self.model_name = 'test_model'
        self.model = Model(self.model_name)

        # create test user
        self.user = User(email='*****@*****.**', password='******', name='sup')
        self.model.register(self.user)
        self.db.session.add(self.user)
        self.db.session.add(self.model)
        self.db.session.commit()
Exemplo n.º 2
0
from lib import db, create_app
db.create_all(app=create_app())
Exemplo n.º 3
0
from lib import create_app

application = create_app('production')

if __name__ == '__main__':
	application.run(debug=False)
Exemplo n.º 4
0
from lib import create_app

app = create_app()

if __name__ == '__main__':
    app.socketio.run(app, host='0.0.0.0', port=5001, debug=True)
Exemplo n.º 5
0
from lib import create_app

app = create_app()

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