def make_test_app(use_cookies=False): app.config['TESTING'] = True app.config['CACHE'] = False app.config['PLUGINS'] = [] app.config['CELERY_ALWAYS_EAGER'] = True app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:' db.create_all() return app.test_client(use_cookies=use_cookies)
def make_test_app(use_cookies=False): app.config['TESTING'] = True app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:' #import ipdb; ipdb.set_trace() from grano.model import Account db.create_all() client = app.test_client(use_cookies=use_cookies) app.test_user = Account.create(TEST_USER) db.session.commit() return client
def make_test_app(use_cookies=False): """For some reason this does not work when imported from util. Error is: AttributeError: 'FlaskClient' object has no attribute 'test_request_context' """ app.config['TESTING'] = True app.config['CACHE'] = False app.config['PLUGINS'] = [] app.config['CELERY_ALWAYS_EAGER'] = True app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:' db.create_all() create_fixtures() return app
def createdb(): """ Create the database schema. """ db.create_all()
def createdb(): """ Create the SQLAlchemy database. """ db.create_all()