forked from orbit-oss/flask
parent
7005c2d534
commit
1caa9de628
1 changed files with 3 additions and 1 deletions
|
|
@ -98,8 +98,10 @@ test method to our class, like this::
|
|||
|
||||
def setUp(self):
|
||||
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