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

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

Bring test coverage for Faculty to 100%.

File size: 971 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(self):
19        # Make sure we get a longtitle
20        fac = Faculty()
21        self.assertEqual(fac.longtitle(),
22                         u'Faculty of Unnamed Faculty (NA)')
23
24    def test_longtitle_no_terms(self):
25        # Make sure we get a longtitle also if no term for the title
26        # prefix is available
27        fac = Faculty()
28        fac.title_prefix = 'Studio for' # Not a valid prefix
29        self.assertEqual(fac.longtitle(),
30                         u'Unnamed Faculty (NA)')
Note: See TracBrowser for help on using the repository browser.