test/unittest_vregistry.py
changeset 4490 d45cde54d464
parent 4252 6c4f109c2b03
parent 4485 5f99eb0b99f7
child 4491 a0f48c31b58a
--- a/test/unittest_vregistry.py	Sat Feb 06 08:45:14 2010 +0100
+++ b/test/unittest_vregistry.py	Mon Feb 08 11:08:55 2010 +0100
@@ -13,6 +13,7 @@
 from cubicweb.appobject import AppObject
 from cubicweb.cwvreg import CubicWebVRegistry, UnknownProperty
 from cubicweb.devtools import TestServerConfiguration
+from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.interfaces import IMileStone
 
 from cubes.card.entities import Card
@@ -40,10 +41,6 @@
         self.vreg.initialization_completed()
         self.assertEquals(len(self.vreg['views']['primary']), 1)
 
-    def test_properties(self):
-        self.failIf('system.version.cubicweb' in self.vreg['propertydefs'])
-        self.failUnless(self.vreg.property_info('system.version.cubicweb'))
-        self.assertRaises(UnknownProperty, self.vreg.property_info, 'a.non.existent.key')
 
     def test_load_subinterface_based_appobjects(self):
         self.vreg.reset()
@@ -60,6 +57,18 @@
         # check progressbar isn't kicked
         self.assertEquals(len(self.vreg['views']['progressbar']), 1)
 
+    def test_properties(self):
+        self.failIf('system.version.cubicweb' in self.vreg['propertydefs'])
+        self.failUnless(self.vreg.property_info('system.version.cubicweb'))
+        self.assertRaises(UnknownProperty, self.vreg.property_info, 'a.non.existent.key')
+
+
+class CWVregTC(CubicWebTC):
+
+    def test_property_default_overriding(self):
+        # see data/views.py
+        from cubicweb.web.views.xmlrss import RSSIconBox
+        self.assertEquals(self.vreg.property_info(RSSIconBox._cwpropkey('visible'))['default'], True)
 
 if __name__ == '__main__':
     unittest_main()