From 9594c70ffc771e1c0173b1842a8180a4a7803a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 28 Feb 2013 15:31:26 +0100 Subject: [PATCH] add initial test --- .../dms/batchimport/tests/__init__.py | 0 .../dms/batchimport/tests/test_setup.py | 24 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/collective/dms/batchimport/tests/__init__.py create mode 100644 src/collective/dms/batchimport/tests/test_setup.py diff --git a/src/collective/dms/batchimport/tests/__init__.py b/src/collective/dms/batchimport/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/collective/dms/batchimport/tests/test_setup.py b/src/collective/dms/batchimport/tests/test_setup.py new file mode 100644 index 0000000..a997236 --- /dev/null +++ b/src/collective/dms/batchimport/tests/test_setup.py @@ -0,0 +1,24 @@ +import unittest2 as unittest + +from Products.CMFCore.utils import getToolByName + +from collective.dms.batchimport.testing import INTEGRATION + + +class TestSetup(unittest.TestCase): + + layer = INTEGRATION + + def setUp(self): + self.app = self.layer['app'] + self.portal = self.layer['portal'] + self.qi_tool = getToolByName(self.portal, 'portal_quickinstaller') + + def test_product_is_installed(self): + """ Validate that our products GS profile has been run and the product + installed + """ + pid = 'collective.dms.batchimport' + installed = [p['id'] for p in self.qi_tool.listInstalledProducts()] + self.assertTrue(pid in installed, + 'package appears not to have been installed')