Added missing testing config

fixes #1302
This commit is contained in:
accraze 2016-12-19 08:03:37 -08:00 committed by David Lord
parent 7005c2d534
commit 1caa9de628
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8

View file

@ -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)