Commit 7b12291b authored by Arnaud Fontaine's avatar Arnaud Fontaine

TypesTool.getInterfaceTypeList(): Filesystem Interfaces were not returned.

And thus filesystem Interfaces were not displayed/selectable in BaseType_view.
parent 1f8301a5
......@@ -274,9 +274,11 @@ class TypesTool(TypeProvider):
Return a list of class names that can be used as Interfaces
"""
from Products.ERP5Type import interfaces
from zope.interface.interface import InterfaceClass
return self._getTypeList(
'Interface Component',
[name for name, _ in inspect.getmembers(interfaces, inspect.isclass)])
[name for name, _ in inspect.getmembers(interfaces,
lambda x: isinstance(x, InterfaceClass))])
security.declareProtected(Permissions.ModifyPortalContent,
'resetDynamicDocumentsOnceAtTransactionBoundary')
......
......@@ -226,9 +226,10 @@ class TestPortalTypeClass(ERP5TypeTestCase):
# a new interface
class IForTest(Interface):
pass
self.assertFalse('IForTest' in self.portal.portal_types.getInterfaceTypeList())
from Products.ERP5Type import interfaces
interfaces.IForTest = IForTest
self.assertTrue('IForTest' in self.portal.portal_types.getInterfaceTypeList())
# one new type
dummy_type = types_tool.newContent('InterfaceTestType',
......
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