1 | from Testing import ZopeTestCase |
---|
2 | from Products.PloneTestCase import PloneTestCase |
---|
3 | |
---|
4 | DEPENDENCIES = ['Archetypes'] |
---|
5 | PRODUCT_DEPENDENCIES = ['MimetypesRegistry', 'PortalTransforms', |
---|
6 | 'basesyndication', 'fatsyndication'] |
---|
7 | |
---|
8 | # Install all (product-) dependencies, install them too |
---|
9 | for dependency in PRODUCT_DEPENDENCIES + DEPENDENCIES: |
---|
10 | ZopeTestCase.installProduct(dependency) |
---|
11 | |
---|
12 | PRODUCTS = list(DEPENDENCIES) |
---|
13 | |
---|
14 | PloneTestCase.setupPloneSite(products=PRODUCTS) |
---|
15 | |
---|
16 | from Products.Five import zcml |
---|
17 | import p4a.common |
---|
18 | import p4a.audio |
---|
19 | import p4a.fileimage |
---|
20 | import p4a.audiopatch |
---|
21 | |
---|
22 | def testclass_builder(**kwargs): |
---|
23 | class PloneIntegrationTestCase(PloneTestCase.PloneTestCase): |
---|
24 | """Base integration TestCase for p4a.audio.""" |
---|
25 | |
---|
26 | def _setup(self): |
---|
27 | PloneTestCase.PloneTestCase._setup(self) |
---|
28 | zcml.load_config('configure.zcml', p4a.common) |
---|
29 | zcml.load_config('configure.zcml', p4a.audio) |
---|
30 | zcml.load_config('configure.zcml', p4a.fileimage) |
---|
31 | zcml.load_config('configure.zcml', p4a.audiopatch) |
---|
32 | |
---|
33 | for key, value in kwargs.items(): |
---|
34 | setattr(PloneIntegrationTestCase, key, value) |
---|
35 | return PloneIntegrationTestCase |
---|