[test] update test: class initialization done in etype_class now
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 03 Aug 2009 15:57:05 +0200
changeset 2660 0d0924d75849
parent 2659 b6f6964bddd3
child 2661 f8df42c9da6b
[test] update test: class initialization done in etype_class now
entities/test/unittest_base.py
--- a/entities/test/unittest_base.py	Mon Aug 03 15:56:27 2009 +0200
+++ b/entities/test/unittest_base.py	Mon Aug 03 15:57:05 2009 +0200
@@ -263,13 +263,16 @@
 class InterfaceTC(EnvBasedTC):
 
     def test_nonregr_subclasses_and_mixins_interfaces(self):
+        self.failUnless(implements(CWUser, IWorkflowable))
         class MyUser(CWUser):
             __implements__ = (IMileStone,)
         self.vreg._loadedmods[__name__] = {}
         self.vreg.register_appobject_class(MyUser)
-        self.failUnless(implements(CWUser, IWorkflowable))
-        self.failUnless(implements(MyUser, IMileStone))
-        self.failUnless(implements(MyUser, IWorkflowable))
+        self.vreg['etypes'].initialization_completed()
+        MyUser_ = self.vreg['etypes'].etype_class('CWUser')
+        self.failUnless(MyUser is MyUser_)
+        self.failUnless(implements(MyUser_, IMileStone))
+        self.failUnless(implements(MyUser_, IWorkflowable))
 
 
 class SpecializedEntityClassesTC(EnvBasedTC):