Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_applicants.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_applicants.py	(revision 6296)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_applicants.py	(revision 6297)
@@ -22,10 +22,6 @@
 """Tests for applicants and related.
 """
-import logging
 import unittest
-from StringIO import StringIO
-from hurry.file.file import IdFileRetrieval
-from hurry.file.interfaces import IFileRetrieval
-from zope.app.testing import placelesssetup
+from zope.app.testing.functional import FunctionalTestCase
 from zope.component import (
     provideAdapter, adapts, getGlobalSiteManager, provideUtility)
@@ -35,5 +31,4 @@
 from zope.publisher.base import TestRequest
 from zope.publisher.interfaces import NotFound
-from waeup.sirp.interfaces import IWAeUPSIRPPluggable
 from waeup.sirp.image.image import WAeUPImageFile
 from waeup.sirp.image.interfaces import IWAeUPImageFile
@@ -44,4 +39,5 @@
     IResultEntry, IApplicant,
     )
+from waeup.sirp.testing import FunctionalLayer
 
 class FakeImageLocation(object):
@@ -69,13 +65,12 @@
         assert entry.score == 3.7
 
-class ApplicantTest(unittest.TestCase):
+class ApplicantTest(FunctionalTestCase):
+
+    layer = FunctionalLayer
 
     def setUp(self):
-        placelesssetup.setUp()
-        provideUtility(IdFileRetrieval(), IFileRetrieval)
         self.applicant = Applicant()
 
     def tearDown(self):
-        placelesssetup.tearDown()
         pass
 
@@ -84,5 +79,7 @@
         verify.verifyObject(IApplicant, self.applicant)
 
-class ApplicantFactoryTest(unittest.TestCase):
+class ApplicantFactoryTest(FunctionalTestCase):
+
+    layer = FunctionalLayer
 
     def setUp(self):
@@ -104,18 +101,21 @@
         assert implemented_by.isOrExtends(IApplicant)
 
-class ApplicantTraverserTest(unittest.TestCase):
+
+class ApplicantTraverserTest(FunctionalTestCase):
+
+    layer = FunctionalLayer
 
     def setUp(self):
+        super(ApplicantTraverserTest, self).setUp()
+        provideAdapter(FakeImageLocation)
         self.applicant = Applicant()
+
         self.request = TestRequest('')
-        self.gsm = getGlobalSiteManager()
-        self.gsm.registerAdapter(FakeImageLocation)
-        self.fileretrieval = IdFileRetrieval()
-        provideUtility(self.fileretrieval, IFileRetrieval)
         return
 
     def tearDown(self):
-        self.gsm.unregisterAdapter(FakeImageLocation)
-        self.gsm.unregisterUtility(self.fileretrieval, IFileRetrieval)
+        gsm = getGlobalSiteManager()
+        gsm.unregisterAdapter(FakeImageLocation)
+        super(ApplicantTraverserTest, self).tearDown()
         return
 
@@ -162,14 +162,2 @@
         self.assertTrue(isinstance(result, FakeImageLocation))
         return
-
-def test_suite():
-    suite = unittest.TestSuite()
-    for testcase in [
-        ResultEntryTest, ApplicantTest, ApplicantFactoryTest,
-        ApplicantTraverserTest,
-        ]:
-        suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
-                testcase
-                )
-        )
-    return suite
