source: main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_faculty.py @ 6563

Last change on this file since 6563 was 6563, checked in by uli, 13 years ago

Start unittests for faculties. We only cover those bits yet, not
covered by other tests. In the long run we might want to switch to
unittests (from doctests) completely here.

File size: 695 bytes
Line 
1# Test faculties
2import tempfile
3import shutil
4import unittest
5from zope.interface.verify import verifyObject, verifyClass
6from waeup.sirp.university import Faculty
7from waeup.sirp.university.interfaces import IFaculty
8
9class FacultyTests(unittest.TestCase):
10
11    def test_ifaces(self):
12        # Make sure we implement the promised interfaces
13        fac = Faculty()
14        verifyClass(IFaculty, Faculty)
15        verifyObject(IFaculty, fac)
16        return
17
18    def test_longtitle_no_terms(self):
19        # Make sure we get a longtitle also if no terms are available
20        fac = Faculty()
21        self.assertEqual(fac.longtitle(),
22                         u'Faculty of Unnamed Faculty (NA)')
Note: See TracBrowser for help on using the repository browser.