def create_app(self): result = tutorial.create_app(self) Bower(result) return result
def setUp(self): self.app = create_app(TestConfig) self.app_context = self.app.app_context() self.app_context.push() db.create_all()
def client(): return testing.TestClient(create_app())
from tutorial import create_app app = create_app() if __name__ == "__main__": app.run(debug=True)
import pdb from wsgiref import simple_server from tutorial import create_app if __name__ == '__main__': application = create_app() httpd = simple_server.make_server('127.0.0.1', 8000, application) pdb.run('httpd.serve_forever()')