server/test/unittest_repository.py
branchstable
changeset 5429 5ca1f8fe8a42
parent 5426 0d4853a6e5ee
child 5556 9ab2b4c74baf
child 5582 3e133b29a1a4
--- a/server/test/unittest_repository.py	Wed Apr 28 12:24:20 2010 +0200
+++ b/server/test/unittest_repository.py	Wed Apr 28 15:42:10 2010 +0200
@@ -295,11 +295,19 @@
         cnx = connect(self.repo.config.appid, u'admin', password='gingkow',
                       initlog=False) # don't reset logging configuration
         try:
+            cnx.load_appobjects(subpath=('entities',))
             # check we can get the schema
             schema = cnx.get_schema()
+            self.failUnless(cnx.vreg)
+            self.failUnless('etypes'in cnx.vreg)
             self.assertEquals(schema.__hashmode__, None)
             cu = cnx.cursor()
             rset = cu.execute('Any U,G WHERE U in_group G')
+            user = iter(rset.entities()).next()
+            self.failUnless(user._cw)
+            self.failUnless(user._cw.vreg)
+            from cubicweb.entities import authobjs
+            self.assertIsInstance(user._cw.user, authobjs.CWUser)
             cnx.close()
             done.append(True)
         finally: