def setUp(self, wbapi_mock): self.app = create_app('tests.config') self.client = self.app.test_client() self.wbapi_mock = wbapi_mock
import json import os import fe app = fe.create_app() # This is only used when running locally. When running live, gunicorn runs # the application. if __name__ == '__main__': # This will prevent the need for a custom gist # to run main.py locally. The hack is right here app.run(host='127.0.0.1', port=8080)
def setUp(self, gh_exception_mock, wb_exception_mock): self.app = create_app('tests.config') self.client = self.app.test_client() self.gh_exception_mock = gh_exception_mock self.wb_exception_mock = wb_exception_mock
#!/usr/bin/env python from fe import create_app if __name__ == '__main__': app = create_app() app = create_app('config.development') app.run(debug=True) else: app = create_app('config.production') app.debug = True app.secret_key = "thing"