Fixed flask tests
This commit is contained in:
parent
e059bf311c
commit
d2d8e66130
5 changed files with 23 additions and 10 deletions
|
|
@ -21,7 +21,8 @@ class FlaskrTestCase(unittest.TestCase):
|
|||
self.db_fd, flaskr.app.config['DATABASE'] = tempfile.mkstemp()
|
||||
flaskr.app.config['TESTING'] = True
|
||||
self.app = flaskr.app.test_client()
|
||||
flaskr.init_db()
|
||||
with flaskr.app.app_context():
|
||||
flaskr.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