Index: /main/waeup.sirp/trunk/src/waeup/sirp/utils/tests/test_helpers.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/utils/tests/test_helpers.py	(revision 5736)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/utils/tests/test_helpers.py	(revision 5737)
@@ -20,4 +20,7 @@
 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 ##
+import os
+import shutil
+import tempfile
 import unittest
 import doctest
@@ -30,4 +33,71 @@
 class FakeObject(object):
     implements(IFakeObject)
+
+class CopyFileSystemTreeTestCase(unittest.TestCase):
+    # Test edge cases of copyFileSystemTree().
+    #
+    # This is a typical case of tests not written as doctest as it is
+    # normally not interesting for developers and we only want to make
+    # sure everything works as expected.
+    def setUp(self):
+        self.existing_src = tempfile.mkdtemp()
+        self.filepath = os.path.join(self.existing_src, 'somefile')
+        open(self.filepath, 'wb').write('Hi!')
+        self.existing_dst = tempfile.mkdtemp()
+        self.not_existing_dir = tempfile.mkdtemp()
+        shutil.rmtree(self.not_existing_dir)
+
+        pass
+
+    def tearDown(self):
+        shutil.rmtree(self.existing_src)
+        shutil.rmtree(self.existing_dst)
+        pass
+
+    def test_source_and_dst_existing(self):
+        helpers.copyFileSystemTree(self.existing_src, self.existing_dst)
+        self.assertTrue(
+            os.path.exists(
+                os.path.join(self.existing_dst, 'somefile')
+                )
+            )
+        return
+
+    def test_source_not_existing(self):
+        self.assertRaises(
+            ValueError,
+            helpers.copyFileSystemTree,
+            self.not_existing_dir,
+            self.existing_dst
+            )
+        return
+
+    def test_dest_not_existing(self):
+        self.assertRaises(
+            ValueError,
+            helpers.copyFileSystemTree,
+            self.existing_src,
+            self.not_existing_dir
+            )
+        return
+
+    def test_src_not_a_dir(self):
+        self.assertRaises(
+            ValueError,
+            helpers.copyFileSystemTree,
+            self.filepath,
+            self.existing_dst
+            )
+        return
+
+    def test_dst_not_a_dir(self):
+        self.assertRaises(
+            ValueError,
+            helpers.copyFileSystemTree,
+            self.existing_src,
+            self.filepath
+            )
+        return
+
 
 class FactoryBaseTestCase(unittest.TestCase):
@@ -44,5 +114,8 @@
     suite = unittest.TestSuite()
     # Register local test cases...
-    for testcase in [FactoryBaseTestCase, ]:
+    for testcase in [
+        FactoryBaseTestCase,
+        CopyFileSystemTreeTestCase,
+        ]:
         suite.addTests(
             unittest.TestLoader().loadTestsFromTestCase(testcase)
