[session] retire session.vreg
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 16 Mar 2016 12:11:18 +0100
changeset 11201 4db44a475b9b
parent 11200 8ddfed7a5981
child 11202 c8b80abab369
[session] retire session.vreg Related to #1381328.
cubicweb/server/session.py
cubicweb/web/test/unittest_views_staticcontrollers.py
--- a/cubicweb/server/session.py	Wed Jul 16 16:26:16 2014 +0200
+++ b/cubicweb/server/session.py	Wed Mar 16 12:11:18 2016 +0100
@@ -1010,7 +1010,6 @@
         self.sessionid = _id or make_uid(unormalize(user.login))
         self.user = user # XXX repoapi: deprecated and store only a login.
         self.repo = repo
-        self.vreg = repo.vreg
         self._timestamp = Timestamp()
         self.data = {}
         self.closed = False
--- a/cubicweb/web/test/unittest_views_staticcontrollers.py	Wed Jul 16 16:26:16 2014 +0200
+++ b/cubicweb/web/test/unittest_views_staticcontrollers.py	Wed Mar 16 12:11:18 2016 +0100
@@ -55,7 +55,7 @@
 
     def test_check_static_dir_access(self):
         """write a file in the static directory and test the access"""
-        staticdir = osp.join(self.session.vreg.config.static_directory)
+        staticdir = osp.join(self.vreg.config.static_directory)
         if not os.path.exists(staticdir):
             os.makedirs(staticdir)
         filename = osp.join(staticdir, 'test')