diff options
| author | A.Avenel <avenel.alexandre@gmail.com> | 2013-02-19 15:27:51 +0100 |
|---|---|---|
| committer | A.Avenel <avenel.alexandre@gmail.com> | 2013-02-19 15:27:51 +0100 |
| commit | a4b8283fba6a6fd910e52b1f61afce2a9160d08d (patch) | |
| tree | 143ec60c709b9f29a03b5845b94d76c321029acf /budget | |
| parent | bfea4e436fbe3126949785eff66aef901f6e2f65 (diff) | |
| download | ihatemoney-mirror-a4b8283fba6a6fd910e52b1f61afce2a9160d08d.zip ihatemoney-mirror-a4b8283fba6a6fd910e52b1f61afce2a9160d08d.tar.gz ihatemoney-mirror-a4b8283fba6a6fd910e52b1f61afce2a9160d08d.tar.bz2 | |
Update tests to work with flask 0.9
Diffstat (limited to 'budget')
| -rw-r--r-- | budget/tests.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/budget/tests.py b/budget/tests.py index d127b06..3fdc0fa 100644 --- a/budget/tests.py +++ b/budget/tests.py @@ -21,9 +21,11 @@ class TestCase(unittest.TestCase): run.app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///memory" run.app.config['CSRF_ENABLED'] = False # simplify the tests self.app = run.app.test_client() - - models.db.init_app(run.app) - run.mail.init_app(run.app) + try: + models.db.init_app(run.app) + run.mail.init_app(run.app) + except: + pass models.db.app = run.app models.db.create_all() |
