diff -r 68ca7fe0ca29 -r a46fb3f58ea2 cubicweb/pyramid/session.py --- a/cubicweb/pyramid/session.py Thu Nov 30 11:55:35 2017 +0100 +++ b/cubicweb/pyramid/session.py Fri Dec 01 11:12:09 2017 +0100 @@ -255,17 +255,18 @@ secret = settings['cubicweb.session.secret'] except KeyError: secret = 'notsosecret' - warnings.warn(''' + if config.registry['cubicweb.config'].mode != 'test': + warnings.warn(''' - !! WARNING !! !! WARNING !! + !! WARNING !! !! WARNING !! - The session cookies are signed with a static secret key. - To put your own secret key, edit your pyramid.ini file - and set the 'cubicweb.session.secret' key. + The session cookies are signed with a static secret key. + To put your own secret key, edit your pyramid.ini file + and set the 'cubicweb.session.secret' key. - YOU SHOULD STOP THIS INSTANCE unless your really know what you - are doing !! + YOU SHOULD STOP THIS INSTANCE unless your really know what you + are doing !! - ''') + ''') session_factory = CWSessionFactory(secret) config.set_session_factory(session_factory)