Use app_context() instead of test_request_context()

There is no request context needed here.
This commit is contained in:
Sybren A. Stüvel 2018-08-30 18:28:17 +02:00
parent 791906521f
commit a67527d6af

View File

@ -187,7 +187,7 @@ class AbstractPillarTest(TestMinimal):
else:
self.ensure_project_exists()
with self.app.test_request_context():
with self.app.app_context():
files_collection = self.app.data.driver.db['files']
assert isinstance(files_collection, pymongo.collection.Collection)