Changeset 7534 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 29 Jan 2012, 08:29:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_batching.py
r7531 r7534 132 132 133 133 def test_entryExists(self): 134 self.assertFalse(self.importer.entryExists( 135 dict(student_id='ID_NONE'), self.app)) 136 student = self.importer.getEntry( 137 dict(student_id=self.student.student_id), self.app) 138 self.assertEqual(student.reg_number, u'123') 134 assert self.importer.entryExists( 135 dict(student_id='ID_NONE'), self.app) is False 136 assert self.importer.entryExists( 137 dict(reg_number='123'), self.app) is True 139 138 140 139 def test_getParent(self): … … 267 266 def test_entryExists(self): 268 267 assert self.importer.entryExists( 269 dict(reg_number='REG_NONE'), self.app) is None270 student = self.importer.entryExists(dict(reg_number='1'), self.app)271 self.assertEqual(student.reg_number, u'1')268 dict(reg_number='REG_NONE'), self.app) is False 269 assert self.importer.entryExists( 270 dict(reg_number='1'), self.app) is True 272 271 273 272 def test_getEntry(self): 274 studycourse = self.importer.getEntry(dict(reg_number='1'), self.app) 275 student = studycourse.__parent__ 276 s_id = student.student_id 277 assert studycourse is self.app['students'][s_id]['studycourse'] 273 student = self.importer.getEntry( 274 dict(reg_number='1'), self.app).__parent__ 275 self.assertEqual(student.reg_number,'1') 278 276 279 277 def test_import(self):
Note: See TracChangeset for help on using the changeset viewer.