From 58be89f70413ff1d8ba801c93bd92526f75cec7e Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida <leonardo@nexedi.com> Date: Wed, 21 Oct 2009 13:48:05 +0000 Subject: [PATCH] Make sure no left-overs exist in the test environment before testing transactional behaviour of the ClassTool filesystem manipulation git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29874 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/tests/testClassTool.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/product/ERP5Type/tests/testClassTool.py b/product/ERP5Type/tests/testClassTool.py index c01bbe4539..72e86109b7 100644 --- a/product/ERP5Type/tests/testClassTool.py +++ b/product/ERP5Type/tests/testClassTool.py @@ -30,6 +30,7 @@ from Testing import ZopeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from AccessControl.SecurityManagement import newSecurityManager from Products.ERP5Type.tests.utils import installRealClassTool +from App.config import getConfiguration from zLOG import LOG try: @@ -84,6 +85,11 @@ class TestClassTool(ERP5TypeTestCase): portal = self.getPortal() portal_classes = portal.portal_classes + self.assertEqual(portal_classes.getLocalDocumentList(), [], + 'Test environment is dirty. Please clean up the instance home of ' + 'the test environment and fix up tests that might have left over ' + 'files at %s' % getConfiguration().instancehome + ) portal_classes.newDocument('Toto') get_transaction().abort() self.assertNotEqual(portal_classes.getLocalDocumentList(), ['Toto']) -- 2.30.9