Commit b18e6a76 authored by Jérome Perrin's avatar Jérome Perrin

testDynamicClassGeneration: fix test class hierarchy

because TestZodbDocumentComponent contains test specific to Document
Component, tests for other component should not inherit from it, because
tests that apply for Document Component only does not apply for other
components.

The correct base class containing tests that apply to any type of
component is _TestZodbComponent

TestZodbDocumentComponentReload was another case, this test tests some
special cases of document edition/reload, it does not need to extend
TestZodbDocumentComponent, otherwise it will run again all tests from
TestZodbDocumentComponent.
parent 6b12e2b2
......@@ -3055,7 +3055,7 @@ class Test(ERP5TypeTestCase):
self.commit()
from Products.ERP5Type.Core.InterfaceComponent import InterfaceComponent
class TestZodbInterfaceComponent(TestZodbDocumentComponent):
class TestZodbInterfaceComponent(_TestZodbComponent):
"""
Tests specific to ZODB Interface Component.
"""
......@@ -3172,7 +3172,7 @@ class %s(Interface):
self.assertFalse(new_person.providesITestPortalType())
from Products.ERP5Type.Core.MixinComponent import MixinComponent
class TestZodbMixinComponent(TestZodbInterfaceComponent):
class TestZodbMixinComponent(_TestZodbComponent):
"""
Tests specific to ZODB Mixin Component.
"""
......@@ -3233,7 +3233,7 @@ class TestZodbMixinComponent(TestZodbInterfaceComponent):
self.commit()
class TestZodbDocumentComponentReload(TestZodbDocumentComponent):
class TestZodbDocumentComponentReload(ERP5TypeTestCase):
def getBusinessTemplateList(self):
return (
'erp5_core',
......
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