fix(pyramid/predicates): avoid to show an error without a session connection

* Related to issue #335
3 jobs for branch/default in 15 minutes and 23 seconds (queued for 2 minutes and 22 seconds)
Status Name Job ID Coverage
  Tests
failed py3-from-forge-misc #298444
allowed to fail

00:11:25

failed py3-from-forge-server #298442
allowed to fail

00:10:06

failed py3-from-forge-web #298443
allowed to fail

00:15:22

 
Name Stage Failure
failed
py3-from-forge-web Tests
cubicweb/web/test/test_jscript.py ERROR: InvocationError for command '/builds/cubicweb/cubicweb/.tox/py3-from-forge-web/bin/python -m pytest -rs --html=from-forge-web.html --self-contained-html --junitxml=from-forge-web.xml /builds/cubicweb/cubicweb/cubicweb/web/test' (exited with code -9)
___________________________________ summary ____________________________________
ERROR: py3-from-forge-web: commands failed
Uploading artifacts for failed job
Uploading artifacts...
WARNING: /builds/cubicweb/cubicweb/from-forge-web.xml: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1
failed
py3-from-forge-misc Tests
cubicweb/test/unittest_cwctl.py ..ERROR: InvocationError for command '/builds/cubicweb/cubicweb/.tox/py3-from-forge-misc/bin/python -m pytest -rs --html=from-forge-misc.html --junitxml=from-forge-misc.xml --self-contained-html /builds/cubicweb/cubicweb/cubicweb/test /builds/cubicweb/cubicweb/cubicweb/dataimport/test /builds/cubicweb/cubicweb/cubicweb/devtools/test /builds/cubicweb/cubicweb/cubicweb/entities/test /builds/cubicweb/cubicweb/cubicweb/ext/test /builds/cubicweb/cubicweb/cubicweb/hooks/test /builds/cubicweb/cubicweb/cubicweb/sobjects/test /builds/cubicweb/cubicweb/cubicweb/wsgi/test /builds/cubicweb/cubicweb/cubicweb/pyramid/test' (exited with code -9)
___________________________________ summary ____________________________________
ERROR: py3-from-forge-misc: commands failed
Uploading artifacts for failed job
Uploading artifacts...
WARNING: /builds/cubicweb/cubicweb/from-forge-misc.xml: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1
failed
py3-from-forge-server Tests
cubicweb/server/test/unittest_checkintegrity.py ERROR: InvocationError for command '/builds/cubicweb/cubicweb/.tox/py3-from-forge-server/bin/python -m pytest -rs --html=from-forge-server.html --junitxml=from-forge-server.xml --self-contained-html /builds/cubicweb/cubicweb/cubicweb/server/test' (exited with code -9)
___________________________________ summary ____________________________________
ERROR: py3-from-forge-server: commands failed
Uploading artifacts for failed job
Uploading artifacts...
WARNING: /builds/cubicweb/cubicweb/from-forge-server.xml: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1