Commit ab2b26f9 authored by Nicolas Dumazet's avatar Nicolas Dumazet

do not use hasattr for zope objects; put an @expectedFailure as corresponding...

do not use hasattr for zope objects; put an @expectedFailure as corresponding code was not yet committed.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38836 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0053b022
...@@ -4,7 +4,9 @@ import unittest ...@@ -4,7 +4,9 @@ import unittest
import transaction import transaction
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.backportUnittest import expectedFailure
@expectedFailure # XXX remove me once portal type classes code is committed
class TestNewStyleClasses(ERP5TypeTestCase): class TestNewStyleClasses(ERP5TypeTestCase):
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
...@@ -97,7 +99,7 @@ class TestNewStyleClasses(ERP5TypeTestCase): ...@@ -97,7 +99,7 @@ class TestNewStyleClasses(ERP5TypeTestCase):
transaction.commit() transaction.commit()
self.assertTrue(hasattr(person, 'asText')) self.assertNotEquals(getattr(person, 'asText', None), None)
finally: finally:
# reset the type # reset the type
person_type.setTypeMixin(None) person_type.setTypeMixin(None)
...@@ -121,7 +123,7 @@ class TestNewStyleClasses(ERP5TypeTestCase): ...@@ -121,7 +123,7 @@ class TestNewStyleClasses(ERP5TypeTestCase):
transaction.commit() transaction.commit()
self.assertTrue(hasattr(person, 'getCorporateName')) self.assertNotEquals(getattr(person, 'getCorporateName', None), None)
finally: finally:
# reset the type # reset the type
person_type.setTypeClass('Person') person_type.setTypeClass('Person')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment