[test] Use user_session_cache_key function
to generate cache key.
--- a/cubicweb/devtools/repotest.py Fri Mar 10 17:52:44 2017 +0100
+++ b/cubicweb/devtools/repotest.py Fri Mar 10 17:57:13 2017 +0100
@@ -27,7 +27,7 @@
from logilab.common.testlib import SkipTest
from cubicweb.devtools.testlib import RepoAccess
-
+from cubicweb.entities.authobjs import user_session_cache_key
def tuplify(mylist):
return [tuple(item) for item in mylist]
@@ -251,7 +251,7 @@
# use cnx.user.eid to get correct owned_by relation, unless explicit eid
with self._access.cnx() as cnx:
user_eid = cnx.user.eid
- cnx.user._cw.data['groups-%s' % user_eid] = set(groups)
+ cnx.user._cw.data[user_session_cache_key(user_eid, 'groups')] = set(groups)
yield cnx
def qexecute(self, rql, args=None, build_descr=True):