File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ In order to test the application, we add a second module
41
41
42
42
def setUp(self):
43
43
self.db_fd, flaskr.app.config['DATABASE'] = tempfile.mkstemp()
44
- flaskr.app.config['TESTING'] = True
44
+ flaskr.app.testing = True
45
45
self.app = flaskr.app.test_client()
46
46
with flaskr.app.app_context():
47
47
flaskr.init_db()
@@ -98,7 +98,7 @@ test method to our class, like this::
98
98
99
99
def setUp(self):
100
100
self.db_fd, flaskr.app.config['DATABASE'] = tempfile.mkstemp()
101
- flaskr.app.config['TESTING'] = True
101
+ flaskr.app.testing = True
102
102
self.app = flaskr.app.test_client()
103
103
with flaskr.app.app_context():
104
104
flaskr.init_db()
@@ -210,7 +210,7 @@ temporarily. With this you can access the :class:`~flask.request`,
210
210
functions. Here is a full example that demonstrates this approach::
211
211
212
212
import flask
213
-
213
+
214
214
app = flask.Flask(__name__)
215
215
216
216
with app.test_request_context('/?name=Peter'):
You can’t perform that action at this time.
0 commit comments