entities/test/unittest_base.py
changeset 3455 a0a252643227
parent 3451 6b46d73823f5
parent 3450 265331a0920c
child 3890 d7a270f50f54
equal deleted inserted replaced
3454:ad1cddc06997 3455:a0a252643227
   129         # build class from most generic to most specific and make
   129         # build class from most generic to most specific and make
   130         # sure the most specific is always selected
   130         # sure the most specific is always selected
   131         self.vreg._loadedmods[__name__] = {}
   131         self.vreg._loadedmods[__name__] = {}
   132         for etype in ('Company', 'Division', 'SubDivision'):
   132         for etype in ('Company', 'Division', 'SubDivision'):
   133             class Foo(AnyEntity):
   133             class Foo(AnyEntity):
   134                 id = etype
   134                 __regid__ = etype
   135             self.vreg.register_appobject_class(Foo)
   135             self.vreg.register_appobject_class(Foo)
   136             eclass = self.select_eclass('SubDivision')
   136             eclass = self.select_eclass('SubDivision')
   137             self.failUnless(eclass.__autogenerated__)
   137             self.failUnless(eclass.__autogenerated__)
   138             self.failIf(eclass is Foo)
   138             self.failIf(eclass is Foo)
   139             if etype == 'SubDivision':
   139             if etype == 'SubDivision':