Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_applicant.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_applicant.py	(revision 6632)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_applicant.py	(revision 6632)
@@ -0,0 +1,199 @@
+##
+## test_applicant.py
+## Login : <uli@pu.smp.net>
+## Started on  Tue Aug 24 04:36:11 2010 Uli Fouquet
+## $Id$
+## 
+## Copyright (C) 2010 Uli Fouquet
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+## 
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+## 
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""Tests for applicants and related.
+"""
+import unittest
+from StringIO import StringIO
+from hurry.file.interfaces import IFileRetrieval
+from zope.app.testing.functional import FunctionalTestCase
+from zope.component import (
+    provideAdapter, adapts, getGlobalSiteManager, provideUtility)
+from zope.component.hooks import setSite
+from zope.component.interfaces import IFactory
+from zope.interface import verify, implements
+from zope.location.interfaces import ILocation
+from zope.publisher.base import TestRequest
+from zope.publisher.interfaces import NotFound
+from waeup.sirp.app import University
+from waeup.sirp.image import WAeUPImageFile, createWAeUPImageFile
+from waeup.sirp.image.interfaces import IWAeUPImageFile
+from waeup.sirp.applicants import (
+    ResultEntry, Applicant, ApplicantFactory, ApplicantTraverser,
+    )
+from waeup.sirp.applicants.interfaces import (
+    IResultEntry, IApplicant,
+    )
+from waeup.sirp.imagestorage import ImageStorageFileRetrieval
+from waeup.sirp.testing import FunctionalLayer
+
+class FakeImageLocation(object):
+    implements(ILocation)
+    adapts(IWAeUPImageFile)
+    def __init__(self, context):
+        pass
+
+class ResultEntryTest(unittest.TestCase):
+
+    def setUp(self):
+        self.result_entry = ResultEntry()
+        return
+
+    def tearDown(self):
+        pass
+
+    def test_interfaces(self):
+        verify.verifyClass(IResultEntry, ResultEntry)
+        verify.verifyObject(IResultEntry, self.result_entry)
+
+    def test_resultentry(self):
+        entry = ResultEntry('Some subject', 3.7)
+        assert entry.subject == 'Some subject'
+        assert entry.score == 3.7
+
+class ApplicantTest(FunctionalTestCase):
+
+    layer = FunctionalLayer
+
+    def setUp(self):
+        super(ApplicantTest, self).setUp()
+        self.applicant = Applicant()
+        return
+
+    def tearDown(self):
+        super(ApplicantTest, self).tearDown()
+        return
+
+    def test_interfaces(self):
+        verify.verifyClass(IApplicant, Applicant)
+        verify.verifyObject(IApplicant, self.applicant)
+        return
+
+    def test_passport_no_site(self):
+        # make sure we get a real image stored in passport attr
+        image = self.applicant.passport.file.read()
+        self.assertEqual(len(image), 2059)
+        return
+
+    def test_passport_insite(self):
+        # make sure we get a real image in passport attr when inside a site.
+        # When an applicant is created 'inside a site', its passport
+        # photograph should be put inside the images folder of the
+        # site, even if it is only a placeholder.
+        self.getRootFolder()['app'] = University()
+        app = self.getRootFolder()['app']
+        setSite(app)
+        applicant = Applicant()
+        image = self.applicant.passport.file.read()
+        self.assertEqual(len(image), 2059)
+        # The image contains a file_id instead of real image-data
+        self.assertEqual(self.applicant.passport.data,
+                         u'b48a1d39bbcb32e955d9ff2dea4ed0e6-1')
+        assert u'b48a1d39bbcb32e955d9ff2dea4ed0e6' in app['images'].keys()
+        return
+
+class ApplicantFactoryTest(FunctionalTestCase):
+
+    layer = FunctionalLayer
+
+    def setUp(self):
+        # Install a IFileRetrieval utility that returns WAeUPImageFiles.
+        storage = ImageStorageFileRetrieval()
+        provideUtility(storage, IFileRetrieval)
+        self.factory = ApplicantFactory()
+
+    def tearDown(self):
+        pass
+
+    def test_interfaces(self):
+        verify.verifyClass(IFactory, ApplicantFactory)
+        verify.verifyObject(IFactory, self.factory)
+
+    def test_factory(self):
+        obj = self.factory()
+        assert isinstance(obj, Applicant)
+
+    def test_getInterfaces(self):
+        implemented_by = self.factory.getInterfaces()
+        assert implemented_by.isOrExtends(IApplicant)
+
+
+class ApplicantTraverserTest(FunctionalTestCase):
+
+    layer = FunctionalLayer
+
+    def setUp(self):
+        super(ApplicantTraverserTest, self).setUp()
+        provideAdapter(FakeImageLocation)
+        self.applicant = Applicant()
+
+        self.request = TestRequest('')
+        return
+
+    def tearDown(self):
+        gsm = getGlobalSiteManager()
+        gsm.unregisterAdapter(FakeImageLocation)
+        super(ApplicantTraverserTest, self).tearDown()
+        return
+
+    def test_traverse_wo_passport(self):
+        # Ask for some attribute not provided
+        traverser = ApplicantTraverser(
+            self.applicant, self.request
+            )
+        self.assertRaises(
+            NotFound,
+            traverser.publishTraverse, self.request, 'passport'
+            )
+        return
+
+    def test_traverse_wo_image_passport_jpg(self):
+        # Ask for applicant pic if we didn't provided one
+        # We get a placeholder.
+        traverser = ApplicantTraverser(
+            self.applicant, self.request
+            )
+        result = traverser.publishTraverse(self.request, 'passport.jpg')
+        self.assertTrue(isinstance(result, FakeImageLocation))
+        return
+
+    def test_traverse_w_image_passport_jpg(self):
+        # Ask for applicant pic that's named 'passport.jpg'
+        traverser = ApplicantTraverser(
+            self.applicant, self.request
+            )
+        self.applicant.passport = createWAeUPImageFile(
+            'nofile.jpg', StringIO('no-content'))
+        self.applicant.passport.filename = 'mypic.jpg'
+        result = traverser.publishTraverse(self.request, 'passport.jpg')
+        self.assertTrue(isinstance(result, FakeImageLocation))
+        return
+
+    def test_traverse_w_image_some_jpg(self):
+        # Ask for applicant pic by correct name
+        traverser = ApplicantTraverser(
+            self.applicant, self.request
+            )
+        self.applicant.passport = WAeUPImageFile('nofile.jpg', '')
+        self.applicant.passport.filename = 'mypic.jpg'
+        result = traverser.publishTraverse(self.request, 'mypic.jpg')
+        self.assertTrue(isinstance(result, FakeImageLocation))
+        return
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 6611)
+++ 	(revision )
@@ -1,199 +1,0 @@
-##
-## test_applicants.py
-## Login : <uli@pu.smp.net>
-## Started on  Tue Aug 24 04:36:11 2010 Uli Fouquet
-## $Id$
-## 
-## Copyright (C) 2010 Uli Fouquet
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-## 
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-## 
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-"""Tests for applicants and related.
-"""
-import unittest
-from StringIO import StringIO
-from hurry.file.interfaces import IFileRetrieval
-from zope.app.testing.functional import FunctionalTestCase
-from zope.component import (
-    provideAdapter, adapts, getGlobalSiteManager, provideUtility)
-from zope.component.hooks import setSite
-from zope.component.interfaces import IFactory
-from zope.interface import verify, implements
-from zope.location.interfaces import ILocation
-from zope.publisher.base import TestRequest
-from zope.publisher.interfaces import NotFound
-from waeup.sirp.app import University
-from waeup.sirp.image import WAeUPImageFile, createWAeUPImageFile
-from waeup.sirp.image.interfaces import IWAeUPImageFile
-from waeup.sirp.applicants import (
-    ResultEntry, Applicant, ApplicantFactory, ApplicantTraverser,
-    )
-from waeup.sirp.applicants.interfaces import (
-    IResultEntry, IApplicant,
-    )
-from waeup.sirp.imagestorage import ImageStorageFileRetrieval
-from waeup.sirp.testing import FunctionalLayer
-
-class FakeImageLocation(object):
-    implements(ILocation)
-    adapts(IWAeUPImageFile)
-    def __init__(self, context):
-        pass
-
-class ResultEntryTest(unittest.TestCase):
-
-    def setUp(self):
-        self.result_entry = ResultEntry()
-        return
-
-    def tearDown(self):
-        pass
-
-    def test_interfaces(self):
-        verify.verifyClass(IResultEntry, ResultEntry)
-        verify.verifyObject(IResultEntry, self.result_entry)
-
-    def test_resultentry(self):
-        entry = ResultEntry('Some subject', 3.7)
-        assert entry.subject == 'Some subject'
-        assert entry.score == 3.7
-
-class ApplicantTest(FunctionalTestCase):
-
-    layer = FunctionalLayer
-
-    def setUp(self):
-        super(ApplicantTest, self).setUp()
-        self.applicant = Applicant()
-        return
-
-    def tearDown(self):
-        super(ApplicantTest, self).tearDown()
-        return
-
-    def test_interfaces(self):
-        verify.verifyClass(IApplicant, Applicant)
-        verify.verifyObject(IApplicant, self.applicant)
-        return
-
-    def test_passport_no_site(self):
-        # make sure we get a real image stored in passport attr
-        image = self.applicant.passport.file.read()
-        self.assertEqual(len(image), 2059)
-        return
-
-    def test_passport_insite(self):
-        # make sure we get a real image in passport attr when inside a site.
-        # When an applicant is created 'inside a site', its passport
-        # photograph should be put inside the images folder of the
-        # site, even if it is only a placeholder.
-        self.getRootFolder()['app'] = University()
-        app = self.getRootFolder()['app']
-        setSite(app)
-        applicant = Applicant()
-        image = self.applicant.passport.file.read()
-        self.assertEqual(len(image), 2059)
-        # The image contains a file_id instead of real image-data
-        self.assertEqual(self.applicant.passport.data,
-                         u'b48a1d39bbcb32e955d9ff2dea4ed0e6-1')
-        assert u'b48a1d39bbcb32e955d9ff2dea4ed0e6' in app['images'].keys()
-        return
-
-class ApplicantFactoryTest(FunctionalTestCase):
-
-    layer = FunctionalLayer
-
-    def setUp(self):
-        # Install a IFileRetrieval utility that returns WAeUPImageFiles.
-        storage = ImageStorageFileRetrieval()
-        provideUtility(storage, IFileRetrieval)
-        self.factory = ApplicantFactory()
-
-    def tearDown(self):
-        pass
-
-    def test_interfaces(self):
-        verify.verifyClass(IFactory, ApplicantFactory)
-        verify.verifyObject(IFactory, self.factory)
-
-    def test_factory(self):
-        obj = self.factory()
-        assert isinstance(obj, Applicant)
-
-    def test_getInterfaces(self):
-        implemented_by = self.factory.getInterfaces()
-        assert implemented_by.isOrExtends(IApplicant)
-
-
-class ApplicantTraverserTest(FunctionalTestCase):
-
-    layer = FunctionalLayer
-
-    def setUp(self):
-        super(ApplicantTraverserTest, self).setUp()
-        provideAdapter(FakeImageLocation)
-        self.applicant = Applicant()
-
-        self.request = TestRequest('')
-        return
-
-    def tearDown(self):
-        gsm = getGlobalSiteManager()
-        gsm.unregisterAdapter(FakeImageLocation)
-        super(ApplicantTraverserTest, self).tearDown()
-        return
-
-    def test_traverse_wo_passport(self):
-        # Ask for some attribute not provided
-        traverser = ApplicantTraverser(
-            self.applicant, self.request
-            )
-        self.assertRaises(
-            NotFound,
-            traverser.publishTraverse, self.request, 'passport'
-            )
-        return
-
-    def test_traverse_wo_image_passport_jpg(self):
-        # Ask for applicant pic if we didn't provided one
-        # We get a placeholder.
-        traverser = ApplicantTraverser(
-            self.applicant, self.request
-            )
-        result = traverser.publishTraverse(self.request, 'passport.jpg')
-        self.assertTrue(isinstance(result, FakeImageLocation))
-        return
-
-    def test_traverse_w_image_passport_jpg(self):
-        # Ask for applicant pic that's named 'passport.jpg'
-        traverser = ApplicantTraverser(
-            self.applicant, self.request
-            )
-        self.applicant.passport = createWAeUPImageFile(
-            'nofile.jpg', StringIO('no-content'))
-        self.applicant.passport.filename = 'mypic.jpg'
-        result = traverser.publishTraverse(self.request, 'passport.jpg')
-        self.assertTrue(isinstance(result, FakeImageLocation))
-        return
-
-    def test_traverse_w_image_some_jpg(self):
-        # Ask for applicant pic by correct name
-        traverser = ApplicantTraverser(
-            self.applicant, self.request
-            )
-        self.applicant.passport = WAeUPImageFile('nofile.jpg', '')
-        self.applicant.passport.filename = 'mypic.jpg'
-        result = traverser.publishTraverse(self.request, 'mypic.jpg')
-        self.assertTrue(isinstance(result, FakeImageLocation))
-        return
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py	(revision 6611)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py	(revision 6632)
@@ -36,5 +36,5 @@
 from waeup.sirp.app import University
 from waeup.sirp.applicants.container import ApplicantsContainer
-from waeup.sirp.applicants.applicants import Applicant
+from waeup.sirp.applicants.applicant import Applicant
 from waeup.sirp.university.faculty import Faculty
 from waeup.sirp.university.department import Department
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_catalog.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_catalog.py	(revision 6611)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_catalog.py	(revision 6632)
@@ -36,5 +36,5 @@
 from waeup.sirp.app import University
 from waeup.sirp.applicants.container import ApplicantsContainer
-from waeup.sirp.applicants.applicants import Applicant
+from waeup.sirp.applicants.applicant import Applicant
 from waeup.sirp.testing import FunctionalLayer
 
