Skip to content

Commit 03857cc

Browse files
committed
use app.testing property instead of config
1 parent 1caa9de commit 03857cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/testing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ In order to test the application, we add a second module
4141

4242
def setUp(self):
4343
self.db_fd, flaskr.app.config['DATABASE'] = tempfile.mkstemp()
44-
flaskr.app.config['TESTING'] = True
44+
flaskr.app.testing = True
4545
self.app = flaskr.app.test_client()
4646
with flaskr.app.app_context():
4747
flaskr.init_db()
@@ -98,7 +98,7 @@ test method to our class, like this::
9898

9999
def setUp(self):
100100
self.db_fd, flaskr.app.config['DATABASE'] = tempfile.mkstemp()
101-
flaskr.app.config['TESTING'] = True
101+
flaskr.app.testing = True
102102
self.app = flaskr.app.test_client()
103103
with flaskr.app.app_context():
104104
flaskr.init_db()
@@ -210,7 +210,7 @@ temporarily. With this you can access the :class:`~flask.request`,
210210
functions. Here is a full example that demonstrates this approach::
211211

212212
import flask
213-
213+
214214
app = flask.Flask(__name__)
215215

216216
with app.test_request_context('/?name=Peter'):

0 commit comments

Comments
 (0)