Commit 17cf1c5a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Arnaud Fontaine

fixup! bt5/test

parent d2e12dfe
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
############################################################################## ##############################################################################
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
import six
import unittest import unittest
implements_tuple_list = [ implements_tuple_list = [
...@@ -60,7 +59,7 @@ def makeTestMethod(import_tuple, interface): ...@@ -60,7 +59,7 @@ def makeTestMethod(import_tuple, interface):
"""Common method which checks if documents implements interface""" """Common method which checks if documents implements interface"""
def testMethod(self): def testMethod(self):
Klass = getattr( Klass = getattr(
__import__(import_tuple[0], globals(), locals(), [import_tuple[0]] if six.PY2 else ['erp5']), __import__(import_tuple[0], globals(), locals(), ['']),
import_tuple[1]) import_tuple[1])
import Products.ERP5Type.interfaces import Products.ERP5Type.interfaces
...@@ -69,7 +68,7 @@ def makeTestMethod(import_tuple, interface): ...@@ -69,7 +68,7 @@ def makeTestMethod(import_tuple, interface):
except AttributeError: except AttributeError:
InterfaceModuleName = 'erp5.component.interface.%s' % interface InterfaceModuleName = 'erp5.component.interface.%s' % interface
Interface = getattr( Interface = getattr(
__import__(InterfaceModuleName, globals(), locals(), [InterfaceModuleName] if six.PY2 else ['erp5']), __import__(InterfaceModuleName, globals(), locals(), ['']),
interface) interface)
verifyClass(Interface, Klass) verifyClass(Interface, Klass)
......
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