forked from orbit-oss/flask
Clarified how to test with click
This commit is contained in:
parent
d2d8e66130
commit
b9013ede22
2 changed files with 12 additions and 4 deletions
|
|
@ -43,7 +43,8 @@ In order to test the application, we add a second module
|
|||
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):
|
||||
os.close(self.db_fd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue