Browse Source

Added missing testing config

fixes #1302
pull/2117/head
accraze 8 years ago committed by David Lord
parent
commit
1caa9de628
No known key found for this signature in database
GPG Key ID: 7A1C87E3F5BC42A8
  1. 4
      docs/testing.rst

4
docs/testing.rst

@ -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…
Cancel
Save