def app():
    app = create_app('functional-testing')
    context = app.app_context()
    context.push()
    thread = Thread(target=app.run)
    thread.daemon = True
    thread.start()
    yield app
    context.pop()
#!/usr/bin/env python

from flask.ext.script import Manager
from mxsampleship import create_app
import os


if __name__ == '__main__':

    app = create_app(os.environ.get('SAMPLE_SHIP_CONFIG', 'development'))
    manager = Manager(app)

    manager.run()
def client():
    app = create_app('testing')
    context = app.app_context()
    context.push()
    yield app.test_client()
    context.pop()