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 |
---|
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_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.