- Timestamp:
- 10 Jul 2012, 09:26:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_student.py
r8863 r8968 21 21 from zope.component.interfaces import IFactory 22 22 from zope.interface import verify 23 from zope.schema.interfaces import ConstraintNotSatisfied 23 24 from waeup.kofa.testing import FunctionalTestCase 24 25 from kofacustom.nigeria.students.student import NigeriaStudent, NigeriaStudentFactory … … 57 58 implemented_by = self.factory.getInterfaces() 58 59 assert implemented_by.isOrExtends(INigeriaStudent) 60 61 def test_is_foreigner(self): 62 student = self.factory() 63 self.assertRaises( 64 ConstraintNotSatisfied, setattr, student, 'nationality', 'XX') 65 student.nationality = 'NG' 66 self.assertFalse(student.is_foreigner) 67 student.nationality = 'DE' 68 self.assertTrue(student.is_foreigner) 59 69 60 70 class NigeriaStudentStudyCourseFactoryTest(FunctionalTestCase):
Note: See TracChangeset for help on using the changeset viewer.