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 |
---|
2 | import tempfile |
---|
3 | import shutil |
---|
4 | import unittest |
---|
5 | from zope.interface.verify import verifyObject, verifyClass |
---|
6 | from waeup.sirp.university import Faculty |
---|
7 | from waeup.sirp.university.interfaces import IFaculty |
---|
8 | |
---|
9 | class 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.