Skip to content

Commit b50a47a

Browse files
feat: ensure all required dependencies are installed
1 parent 9e72c57 commit b50a47a

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@
4949
python_requires=">=3.6",
5050
install_requires=[
5151
"setuptools",
52+
"collective.easyform",
5253
"cusy.exportimport",
5354
"cusy.restapi.easyform",
5455
"cusy.restapi.info",
5556
"cusy.restapi.patches",
57+
"plone.restapi",
5658
],
5759
extras_require={
5860
"test": [

src/cusy/cms/configure.zcml

+2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66

77
<i18n:registerTranslations directory="locales" />
88

9+
<include package="collective.easyform" />
910
<include package="cusy.exportimport" />
1011
<include package="cusy.restapi.easyform" />
1112
<include package="cusy.restapi.info" />
1213
<include package="cusy.restapi.patches" />
14+
<include package="plone.restapi" />
1315

1416
<include file="permissions.zcml" />
1517
<include file="profiles.zcml" />

src/cusy/cms/profiles/default/metadata.xml

+2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<metadata>
33
<version>1000</version>
44
<dependencies>
5+
<dependency>profile-collective.easyform:default</dependency>
56
<dependency>profile-cusy.exportimport:default</dependency>
67
<dependency>profile-cusy.restapi.easyform:default</dependency>
78
<dependency>profile-cusy.restapi.info:default</dependency>
89
<dependency>profile-cusy.restapi.patches:default</dependency>
10+
<dependency>profile-plone.restapi:default</dependency>
911
</dependencies>
1012
</metadata>

src/cusy/cms/tests/test_setup.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def test_browserlayer(self):
3838

3939
self.assertIn(ICusyCmsLayer, utils.registered_layers())
4040

41+
def test_collective_easyform_installed(self):
42+
"""Validate that `collective.easyform` is installed."""
43+
self.assertTrue(self.installer.isProductInstalled("collective.easyform"))
44+
4145
def test_cusy_exportimport_installed(self):
4246
"""Validate that `cusy.exportimport` is installed."""
4347
self.assertTrue(self.installer.isProductInstalled("cusy.exportimport"))
@@ -51,9 +55,13 @@ def test_cusy_restapi_info_installed(self):
5155
self.assertTrue(self.installer.isProductInstalled("cusy.restapi.info"))
5256

5357
def test_cusy_restapi_patches_installed(self):
54-
"""Validate that `cusy.restapi.patches` is installed."""
58+
"""Validate that `cusy.restapi` is installed."""
5559
self.assertTrue(self.installer.isProductInstalled("cusy.restapi.patches"))
5660

61+
def test_plone_restapi_installed(self):
62+
"""Validate that `plone.restapi` is installed."""
63+
self.assertTrue(self.installer.isProductInstalled("plone.restapi"))
64+
5765

5866
class TestUninstall(unittest.TestCase):
5967

0 commit comments

Comments
 (0)