mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Update tests to work with flask 0.9
This commit is contained in:
parent
bfea4e436f
commit
a4b8283fba
1 changed files with 5 additions and 3 deletions
|
@ -21,9 +21,11 @@ class TestCase(unittest.TestCase):
|
||||||
run.app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///memory"
|
run.app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///memory"
|
||||||
run.app.config['CSRF_ENABLED'] = False # simplify the tests
|
run.app.config['CSRF_ENABLED'] = False # simplify the tests
|
||||||
self.app = run.app.test_client()
|
self.app = run.app.test_client()
|
||||||
|
try:
|
||||||
models.db.init_app(run.app)
|
models.db.init_app(run.app)
|
||||||
run.mail.init_app(run.app)
|
run.mail.init_app(run.app)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
models.db.app = run.app
|
models.db.app = run.app
|
||||||
models.db.create_all()
|
models.db.create_all()
|
||||||
|
|
Loading…
Reference in a new issue