I\'d like to test a resource. The response of that depends on a parameter in session (logged) To test this resource, I\'ve wrote those tests:
import app
import u
If you did not set a custom app.session_interface
, then you forgot to set a secret key:
def setUp(self):
app.config['SECRET_KEY'] = 'sekrit!'
self.app = app.app.test_client()
This just sets a mock secret key for the tests, but for your application to work you'll need to generate a production secret key, see the sessions section in the Quickstart documentation for tips on how to produce a good secret key.
Without a secret key, the default session implementation fails to create a session.