Changeset 9087 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 7 Aug 2012, 06:17:31 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9074 r9087 167 167 ob_class = view.__implemented__.__name__.replace('waeup.kofa.','') 168 168 if fields_string: 169 grok.getSite().logger.info('%s - saved: %s' % (ob_class, fields_string))169 grok.getSite().logger.info('%s - %s - saved: %s' % (ob_class, view.context.__name__, fields_string)) 170 170 return 171 171 -
main/waeup.kofa/trunk/src/waeup/kofa/university/batching.py
r9001 r9087 123 123 124 124 # Log actions... 125 location_field = self.location_fields[0] 125 126 grok.getSite().logger.info('%s - %s - Record updated: %s' 126 % (self.name, self.location_fields[0], items_changed))127 % (self.name, row[location_field], items_changed)) 127 128 return items_changed 128 129 -
main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_batching.py
r9038 r9087 103 103 #self.app['faculties']['fac1']['dep1'].certificates['CERT1'].addCertCourse( 104 104 # self.course, level=100) 105 106 self.logfile = os.path.join( 107 self.app['datacenter'].storage, 'logs', 'main.log') 108 return 105 109 return 106 110 … … 291 295 shutil.rmtree(os.path.dirname(fin_file)) 292 296 return 297 298 def test_import_update_logging(self): 299 self.app['faculties']['FAC2'] = Faculty(code='FAC2') 300 self.app['faculties']['FAC3'] = Faculty(code='FAC3') 301 self.app['faculties']['FAC4'] = Faculty(code='FAC4') 302 num, num_warns, fin_file, fail_file = self.proc.doImport( 303 self.csv_file_faculty_update, FACULTY_HEADER_FIELDS_UPDATE, 'update') 304 self.assertEqual(num_warns,0) 305 logcontent = open(self.logfile).read() 306 # Logging message from updateEntry 307 self.assertTrue( 308 'INFO - system - Department Processor - DEP2 - ' 309 'Record updated: local_roles=anne|waeup.local.DepartmentManager, ' 310 'code=DEP2' 311 in logcontent) 293 312 294 313 def test_upload_import_reupload(self): … … 403 422 'Not all parents do exist yet. Skipping\r\n' 404 423 ) 405 # Anne got a local role in department ABC.424 # Anne got a local role in department DEP2. 406 425 dep = self.app['faculties']['FAC1']['DEP2'] 407 426 role_map = IPrincipalRoleMap(dep) … … 488 507 'Not all parents do exist yet. Skipping\r\n' 489 508 ) 490 # Anne got a local role in course ABC.509 # Anne got a local role in course CRS2. 491 510 dep = self.app['faculties']['FAC1']['DEP1'].courses['CRS2'] 492 511 role_map = IPrincipalRoleMap(dep) … … 574 593 'Not all parents do exist yet. Skipping\r\n' 575 594 ) 576 # Anne got a local role in certificate ABC.595 # Anne got a local role in certificate CRT2. 577 596 dep = self.app['faculties']['FAC1']['DEP1'].certificates['CRT2'] 578 597 role_map = IPrincipalRoleMap(dep) … … 581 600 self.assertEqual(local_role, 'waeup.local.CourseAdviser100') 582 601 shutil.rmtree(os.path.dirname(fin_file)) 602 603 logcontent = open(self.logfile).read() 604 # Logging message from updateEntry 605 self.assertTrue( 606 'INFO - system - Certificate Processor - CRT2 - Record updated: ' 607 'local_roles=anne|waeup.local.CourseAdviser100, code=CRT2' 608 in logcontent) 609 583 610 return 584 611
Note: See TracChangeset for help on using the changeset viewer.