diff options
| author | A.Avenel <avenel.alexandre@gmail.com> | 2013-02-19 15:36:37 +0100 |
|---|---|---|
| committer | A.Avenel <avenel.alexandre@gmail.com> | 2013-02-19 15:36:37 +0100 |
| commit | b410e48851b440c279366de1cda151bfef09d9b8 (patch) | |
| tree | 1c428916c5a4049b8fc641ba7ea5694d3b7f615a /budget/tests.py | |
| parent | 79bd22c25cab0c7b869ae35a72def30a5c2a6dba (diff) | |
| parent | a4b8283fba6a6fd910e52b1f61afce2a9160d08d (diff) | |
| download | ihatemoney-mirror-b410e48851b440c279366de1cda151bfef09d9b8.zip ihatemoney-mirror-b410e48851b440c279366de1cda151bfef09d9b8.tar.gz ihatemoney-mirror-b410e48851b440c279366de1cda151bfef09d9b8.tar.bz2 | |
Merge branch 'flask0.9' of github.com:aavenel/ihatemoney
Diffstat (limited to 'budget/tests.py')
| -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 7790bb4..d848112 100644 --- a/budget/tests.py +++ b/budget/tests.py @@ -22,9 +22,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() |
