Commit 9c7c1dfa50b3397b9b857e80b3a6bf5f69765f76
1 parent
3f07ad83
Exists in
master
and in
4 other branches
Fix test with new test sqlite file
Showing
2 changed files
with
6 additions
and
5 deletions
Show diff stats
No preview for this file type
tests/backend_tests.py
... | ... | @@ -10,10 +10,11 @@ class BaseTestCase(unittest.TestCase): |
10 | 10 | self.app = create_app(TestConfig) |
11 | 11 | self.app_context = self.app.app_context() |
12 | 12 | self.app_context.push() |
13 | - db.create_all() | |
14 | - admin = User(email='admin@nowhere.org', name='admin', login='admin', password='admin', role='admin') | |
15 | - db.session.add(admin) | |
16 | - db.session.commit() | |
13 | + # TODO: shall we always copy db from resources ? | |
14 | + #db.create_all() | |
15 | + #admin = User(email='admin@nowhere.org', name='admin', login='admin', password='admin', role='admin') | |
16 | + #db.session.add(admin) | |
17 | + #db.session.commit() | |
17 | 18 | |
18 | 19 | def tearDown(self): |
19 | 20 | self.app_context.pop() |
... | ... | @@ -31,7 +32,7 @@ class DbMgrTestCase(BaseTestCase): |
31 | 32 | |
32 | 33 | def test_charges_by_agent(self): |
33 | 34 | all_charges = db_mgr.charges_by_agent(355) |
34 | - self.assertEqual(6, len(all_charges)) | |
35 | + self.assertEqual(17, len(all_charges)) | |
35 | 36 | |
36 | 37 | |
37 | 38 | class AuthModelTestCase(BaseTestCase): | ... | ... |