forked from orbit-oss/flask
Fixed flask tests
This commit is contained in:
parent
e059bf311c
commit
d2d8e66130
5 changed files with 23 additions and 10 deletions
|
|
@ -20,7 +20,8 @@ class MiniTwitTestCase(unittest.TestCase):
|
|||
"""Before each test, set up a blank database"""
|
||||
self.db_fd, minitwit.app.config['DATABASE'] = tempfile.mkstemp()
|
||||
self.app = minitwit.app.test_client()
|
||||
minitwit.init_db()
|
||||
with minitwit.app.app_context():
|
||||
minitwit.init_db()
|
||||
|
||||
def tearDown(self):
|
||||
"""Get rid of the database again after each test."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue