예제 #1
0
def init_example(*args, **kwargs):
    flask_app = Application.flask("Example", Config, template_folder=template_folder)
    flask_app.debug = True
    example = Application(User, flask_app, **kwargs)
    flask_app.config['BOOTSTRAP_JQUERY_STATIC'] = True
    example.couch.setup(flask_app)
    example.couch.sync(flask_app)
    flask_app.register_blueprint(www)
    flask_app.register_blueprint(api)
    return example
예제 #2
0
 def setUp(self):
     self.app = Application.flask("OsilaTests", self.MyTestingConfig)
     self.webapp = Application(self.User, self.app)
     self.testclient = self.app.test_client()
     self.base_url = "http://api.{}".format(self.app.config['SERVER_NAME'])
     self.device_info = dict(device_info=dict(name='flask.test_client'))