Index: main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_certificatecontainer.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_certificatecontainer.py	(revision 7321)
+++ 	(revision )
@@ -1,139 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
-## 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 certificate containers and related components.
-"""
-import shutil
-import tempfile
-import unittest
-from zope.component.hooks import setSite, clearSite
-from zope.interface.verify import verifyClass, verifyObject
-
-from waeup.sirp.app import University
-from waeup.sirp.interfaces import DuplicationError
-from waeup.sirp.testing import (
-    FunctionalLayer, doctestsuite_for_module, FunctionalTestCase)
-from waeup.sirp.university.certificate import Certificate
-from waeup.sirp.university.certificatecontainer import CertificateContainer
-from waeup.sirp.university.interfaces import ICertificateContainer
-
-
-class CertificateContainerTests(FunctionalTestCase):
-
-    layer = FunctionalLayer
-
-    def setUp(self):
-        super(CertificateContainerTests, self).setUp()
-
-        # Setup a sample site for each test
-        app = University()
-        self.dc_root = tempfile.mkdtemp()
-        app['datacenter'].setStoragePath(self.dc_root)
-
-        # Prepopulate the ZODB...
-        self.getRootFolder()['app'] = app
-        self.app = self.getRootFolder()['app']
-        setSite(self.app)
-
-    def tearDown(self):
-        super(CertificateContainerTests, self).tearDown()
-        clearSite()
-        shutil.rmtree(self.dc_root)
-
-    def test_create(self):
-        # we can create instances
-        container = CertificateContainer()
-        result = isinstance(container, CertificateContainer)
-        assert result is True
-
-    def test_provides_icertificatecontainer(self):
-        # instances tell they provide their main interface
-        container = CertificateContainer()
-        result = ICertificateContainer.providedBy(container)
-        assert result is True
-
-    def test_interfaces(self):
-        # class and instances comply with their main interface
-        container = CertificateContainer()
-        self.assertTrue(verifyClass(ICertificateContainer, CertificateContainer))
-        self.assertTrue(verifyObject(ICertificateContainer, container))
-
-    def test_add_certificate_non_icertificate(self):
-        # we cannot add certificates that do not implement ICertificate.
-        container = CertificateContainer()
-        self.assertRaises(
-            TypeError, container.addCertificate, 'some_string')
-
-    def test_add_certificate_no_duplicate_entry(self):
-        # we cannot add certificates that are registered already.
-        container = CertificateContainer()
-        # We must place this container in the ZODB to make catalogs work.
-        self.app['certs'] = container
-        cert1 = Certificate(code="CERT1")
-        cert2 = Certificate(code="CERT1")
-        container.addCertificate(cert1)
-        self.assertRaises(
-            DuplicationError,
-            container.addCertificate, cert2)
-
-    def test_setitem_duplicate_entry(self):
-        # we cannot add certificates whose code exists already in catalog
-        container1 = CertificateContainer()
-        container2 = CertificateContainer()
-        self.app['certs1'] = container1 # enable catalogs
-        self.app['certs2'] = container2
-        cert1 = Certificate(code="CERT1")
-        cert2 = Certificate(code="CERT1")
-        self.app['certs1']['CERT1'] = cert1
-        self.assertRaises(
-            DuplicationError,
-            self.app['certs2'].__setitem__, 'CERT1', cert2)
-        assert len(container2) == 0
-
-    def test_setitem_name_unequal_code(self):
-        # we cannot add certificates whose code != key
-        container = CertificateContainer()
-        self.app['certs'] = container # enable catalogs
-        cert1 = Certificate(code="CERT1")
-        self.assertRaises(
-            ValueError,
-            container.__setitem__, 'OtherKey', cert1)
-        assert len(container) == 0
-
-    def test_clear(self):
-        # clear() really empties the container.
-        container = CertificateContainer()
-        self.app['certs'] = container # enable catalogs
-        cert1 = Certificate(code="CERT1")
-        cert2 = Certificate(code="CERT2")
-        container['CERT1'] = cert1
-        container['CERT2'] = cert2
-        container.clear()
-        assert len(container) == 0
-
-
-def test_suite():
-    suite = unittest.TestSuite((
-        unittest.makeSuite(CertificateContainerTests),
-        doctestsuite_for_module(
-                'waeup.sirp.university.certificatecontainer'),
-        ))
-    return suite
-
-if __name__=='__main__':
-    unittest.main(defaultTest='test_suite')
Index: main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_certificatescontainer.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_certificatescontainer.py	(revision 7333)
+++ main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_certificatescontainer.py	(revision 7333)
@@ -0,0 +1,139 @@
+## $Id$
+##
+## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
+## 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 certificate containers and related components.
+"""
+import shutil
+import tempfile
+import unittest
+from zope.component.hooks import setSite, clearSite
+from zope.interface.verify import verifyClass, verifyObject
+
+from waeup.sirp.app import University
+from waeup.sirp.interfaces import DuplicationError
+from waeup.sirp.testing import (
+    FunctionalLayer, doctestsuite_for_module, FunctionalTestCase)
+from waeup.sirp.university.certificate import Certificate
+from waeup.sirp.university.certificatescontainer import CertificatesContainer
+from waeup.sirp.university.interfaces import ICertificatesContainer
+
+
+class CertificatesContainerTests(FunctionalTestCase):
+
+    layer = FunctionalLayer
+
+    def setUp(self):
+        super(CertificatesContainerTests, self).setUp()
+
+        # Setup a sample site for each test
+        app = University()
+        self.dc_root = tempfile.mkdtemp()
+        app['datacenter'].setStoragePath(self.dc_root)
+
+        # Prepopulate the ZODB...
+        self.getRootFolder()['app'] = app
+        self.app = self.getRootFolder()['app']
+        setSite(self.app)
+
+    def tearDown(self):
+        super(CertificatesContainerTests, self).tearDown()
+        clearSite()
+        shutil.rmtree(self.dc_root)
+
+    def test_create(self):
+        # we can create instances
+        container = CertificatesContainer()
+        result = isinstance(container, CertificatesContainer)
+        assert result is True
+
+    def test_provides_icertificatescontainer(self):
+        # instances tell they provide their main interface
+        container = CertificatesContainer()
+        result = ICertificatesContainer.providedBy(container)
+        assert result is True
+
+    def test_interfaces(self):
+        # class and instances comply with their main interface
+        container = CertificatesContainer()
+        self.assertTrue(verifyClass(ICertificatesContainer, CertificatesContainer))
+        self.assertTrue(verifyObject(ICertificatesContainer, container))
+
+    def test_add_certificate_non_icertificate(self):
+        # we cannot add certificates that do not implement ICertificate.
+        container = CertificatesContainer()
+        self.assertRaises(
+            TypeError, container.addCertificate, 'some_string')
+
+    def test_add_certificate_no_duplicate_entry(self):
+        # we cannot add certificates that are registered already.
+        container = CertificatesContainer()
+        # We must place this container in the ZODB to make catalogs work.
+        self.app['certs'] = container
+        cert1 = Certificate(code="CERT1")
+        cert2 = Certificate(code="CERT1")
+        container.addCertificate(cert1)
+        self.assertRaises(
+            DuplicationError,
+            container.addCertificate, cert2)
+
+    def test_setitem_duplicate_entry(self):
+        # we cannot add certificates whose code exists already in catalog
+        container1 = CertificatesContainer()
+        container2 = CertificatesContainer()
+        self.app['certs1'] = container1 # enable catalogs
+        self.app['certs2'] = container2
+        cert1 = Certificate(code="CERT1")
+        cert2 = Certificate(code="CERT1")
+        self.app['certs1']['CERT1'] = cert1
+        self.assertRaises(
+            DuplicationError,
+            self.app['certs2'].__setitem__, 'CERT1', cert2)
+        assert len(container2) == 0
+
+    def test_setitem_name_unequal_code(self):
+        # we cannot add certificates whose code != key
+        container = CertificatesContainer()
+        self.app['certs'] = container # enable catalogs
+        cert1 = Certificate(code="CERT1")
+        self.assertRaises(
+            ValueError,
+            container.__setitem__, 'OtherKey', cert1)
+        assert len(container) == 0
+
+    def test_clear(self):
+        # clear() really empties the container.
+        container = CertificatesContainer()
+        self.app['certs'] = container # enable catalogs
+        cert1 = Certificate(code="CERT1")
+        cert2 = Certificate(code="CERT2")
+        container['CERT1'] = cert1
+        container['CERT2'] = cert2
+        container.clear()
+        assert len(container) == 0
+
+
+def test_suite():
+    suite = unittest.TestSuite((
+        unittest.makeSuite(CertificatesContainerTests),
+        doctestsuite_for_module(
+                'waeup.sirp.university.certificatescontainer'),
+        ))
+    return suite
+
+if __name__=='__main__':
+    unittest.main(defaultTest='test_suite')
Index: main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_coursecontainer.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_coursecontainer.py	(revision 7321)
+++ 	(revision )
@@ -1,39 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
-## 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
-##
-
-# Test course containers
-
-import unittest
-from zope.interface.verify import verifyClass, verifyObject
-from waeup.sirp.university.interfaces import ICourseContainer
-from waeup.sirp.university import CourseContainer, Course
-
-class CourseContainerTests(unittest.TestCase):
-
-    def test_ifaces(self):
-        container = CourseContainer()
-        self.assertTrue(verifyClass(ICourseContainer, CourseContainer))
-        self.assertTrue(verifyObject(ICourseContainer, container))
-
-    def test_setitem_name_ne_code(self):
-        # If we add a course under a wrong name that will give an error
-        container = CourseContainer()
-        course = Course(code='MYCOURSE')
-        self.assertRaises(
-            ValueError,
-            container.__setitem__, 'NOTMYCOURSE', course)
Index: main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_coursescontainer.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_coursescontainer.py	(revision 7333)
+++ main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_coursescontainer.py	(revision 7333)
@@ -0,0 +1,39 @@
+## $Id$
+##
+## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
+## 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
+##
+
+# Test course containers
+
+import unittest
+from zope.interface.verify import verifyClass, verifyObject
+from waeup.sirp.university.interfaces import ICoursesContainer
+from waeup.sirp.university import CoursesContainer, Course
+
+class CoursesContainerTests(unittest.TestCase):
+
+    def test_ifaces(self):
+        container = CoursesContainer()
+        self.assertTrue(verifyClass(ICoursesContainer, CoursesContainer))
+        self.assertTrue(verifyObject(ICoursesContainer, container))
+
+    def test_setitem_name_ne_code(self):
+        # If we add a course under a wrong name that will give an error
+        container = CoursesContainer()
+        course = Course(code='MYCOURSE')
+        self.assertRaises(
+            ValueError,
+            container.__setitem__, 'NOTMYCOURSE', course)
Index: main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_facultiescontainer.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_facultiescontainer.py	(revision 7333)
+++ main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_facultiescontainer.py	(revision 7333)
@@ -0,0 +1,114 @@
+## $Id$
+##
+## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
+## 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 FacultiesContainer.
+import logging
+import unittest
+from StringIO import StringIO
+from zope.interface.verify import verifyObject, verifyClass
+from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer
+from waeup.sirp.university.interfaces import IFacultiesContainer
+from waeup.sirp.university import FacultiesContainer
+from waeup.sirp.university.facultiescontainer import AcademicsPlugin
+
+class FakeLogger(object):
+
+    _stream = None
+
+    def get_logger(self):
+        logger = logging.getLogger('test')
+        logger.propagate = False
+        self._stream = StringIO()
+        self.handler = logging.StreamHandler(self._stream)
+        logger.setLevel(logging.DEBUG)
+        logger.addHandler(self.handler)
+        return logger
+
+    def close(self, logger):
+        # Remove handler from logger
+        handler = self.handler
+        if handler not in logger.handlers:
+            return
+        del logger.handlers[logger.handlers.index(handler)]
+        return
+
+    def get_messages(self):
+        self._stream.seek(0)
+        result = self._stream.read()
+        self._stream.seek(0, 2) # Seek to end of stream
+        return result
+
+class FacultiesContainerTests(unittest.TestCase):
+
+    def test_ifaces(self):
+        container = FacultiesContainer()
+        self.assertTrue(verifyClass(IFacultiesContainer, FacultiesContainer))
+        self.assertTrue(verifyObject(IFacultiesContainer, container))
+
+class AcademicsPluginTests(unittest.TestCase):
+
+    def setUp(self):
+        self._logger_factory = FakeLogger()
+        self.logger = self._logger_factory.get_logger()
+
+    def tearDown(self):
+        self._logger_factory.close(self.logger)
+
+    def test_setup(self):
+        site = dict()
+        logger = self.logger
+        plugin = AcademicsPlugin()
+        plugin.setup(site, 'testsite', logger)
+        self.assertTrue('faculties' in site.keys())
+        self.assertTrue(isinstance(site['faculties'], FacultiesContainer))
+        self.assertEqual(
+            self._logger_factory.get_messages(),
+            'Container for faculties created\n'
+            )
+
+    def test_setup_already_set_up(self):
+        site = dict(faculties=object())
+        logger = self.logger
+        plugin = AcademicsPlugin()
+        plugin.setup(site, 'testsite', logger)
+        self.assertTrue('faculties' in site.keys())
+        self.assertEqual(
+            self._logger_factory.get_messages(),
+            'Could not create container for faculties in SIRP.\n'
+            )
+
+    def test_update(self):
+        site = dict()
+        logger = self.logger
+        plugin = AcademicsPlugin()
+        plugin.update(site, 'testsite', logger)
+        self.assertTrue('faculties' in site.keys())
+        self.assertTrue(isinstance(site['faculties'], FacultiesContainer))
+        self.assertEqual(
+            self._logger_factory.get_messages(),
+            'Container for faculties created\n'
+            )
+
+    def test_update_already_set_up(self):
+        site = dict(faculties=object())
+        logger = self.logger
+        plugin = AcademicsPlugin()
+        plugin.update(site, 'testsite', logger)
+        self.assertTrue('faculties' in site.keys())
+        self.assertEqual(
+            self._logger_factory.get_messages(), '')
Index: main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_facultycontainer.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_facultycontainer.py	(revision 7321)
+++ 	(revision )
@@ -1,114 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
-## 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 FacultyContainer.
-import logging
-import unittest
-from StringIO import StringIO
-from zope.interface.verify import verifyObject, verifyClass
-from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer
-from waeup.sirp.university.interfaces import IFacultyContainer
-from waeup.sirp.university import FacultyContainer
-from waeup.sirp.university.facultycontainer import AcademicsPlugin
-
-class FakeLogger(object):
-
-    _stream = None
-
-    def get_logger(self):
-        logger = logging.getLogger('test')
-        logger.propagate = False
-        self._stream = StringIO()
-        self.handler = logging.StreamHandler(self._stream)
-        logger.setLevel(logging.DEBUG)
-        logger.addHandler(self.handler)
-        return logger
-
-    def close(self, logger):
-        # Remove handler from logger
-        handler = self.handler
-        if handler not in logger.handlers:
-            return
-        del logger.handlers[logger.handlers.index(handler)]
-        return
-
-    def get_messages(self):
-        self._stream.seek(0)
-        result = self._stream.read()
-        self._stream.seek(0, 2) # Seek to end of stream
-        return result
-
-class FacultyContainerTests(unittest.TestCase):
-
-    def test_ifaces(self):
-        container = FacultyContainer()
-        self.assertTrue(verifyClass(IFacultyContainer, FacultyContainer))
-        self.assertTrue(verifyObject(IFacultyContainer, container))
-
-class AcademicsPluginTests(unittest.TestCase):
-
-    def setUp(self):
-        self._logger_factory = FakeLogger()
-        self.logger = self._logger_factory.get_logger()
-
-    def tearDown(self):
-        self._logger_factory.close(self.logger)
-
-    def test_setup(self):
-        site = dict()
-        logger = self.logger
-        plugin = AcademicsPlugin()
-        plugin.setup(site, 'testsite', logger)
-        self.assertTrue('faculties' in site.keys())
-        self.assertTrue(isinstance(site['faculties'], FacultyContainer))
-        self.assertEqual(
-            self._logger_factory.get_messages(),
-            'Created faculty container for University\n'
-            )
-
-    def test_setup_already_set_up(self):
-        site = dict(faculties=object())
-        logger = self.logger
-        plugin = AcademicsPlugin()
-        plugin.setup(site, 'testsite', logger)
-        self.assertTrue('faculties' in site.keys())
-        self.assertEqual(
-            self._logger_factory.get_messages(),
-            'Could not create faculty container in SIRP.\n'
-            )
-
-    def test_update(self):
-        site = dict()
-        logger = self.logger
-        plugin = AcademicsPlugin()
-        plugin.update(site, 'testsite', logger)
-        self.assertTrue('faculties' in site.keys())
-        self.assertTrue(isinstance(site['faculties'], FacultyContainer))
-        self.assertEqual(
-            self._logger_factory.get_messages(),
-            'Created faculty container for University\n'
-            )
-
-    def test_update_already_set_up(self):
-        site = dict(faculties=object())
-        logger = self.logger
-        plugin = AcademicsPlugin()
-        plugin.update(site, 'testsite', logger)
-        self.assertTrue('faculties' in site.keys())
-        self.assertEqual(
-            self._logger_factory.get_messages(), '')
Index: main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_university.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_university.py	(revision 7321)
+++ main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_university.py	(revision 7333)
@@ -27,7 +27,7 @@
         names = globals().keys()
         self.assertTrue('Course' in names)
-        self.assertTrue('CourseContainer' in names)
+        self.assertTrue('CoursesContainer' in names)
         self.assertTrue('Faculty' in names)
-        self.assertTrue('FacultyContainer' in names)
+        self.assertTrue('FacultiesContainer' in names)
 
 def test_suite():
