- Timestamp:
- 4 Jan 2015, 16:09:45 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
r11615 r12394 165 165 notify(grok.ObjectModifiedEvent(student)) 166 166 # Save application slip 167 self._createApplicationPDF(student, view=view) 168 169 return True, _('Student ${a} created', mapping = {'a':student.student_id}) 167 try: 168 self._createApplicationPDF(student, view=view) 169 return True, _('Student ${a} created', mapping = {'a':student.student_id}) 170 except IOError: 171 return False, _('IOError: Application Slip could not be created.') 170 172 171 173 def _createApplicationPDF(self, student, view=None): -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_container_data.csv
r8314 r12394 1 1 code,title,prefix,year,application_category,description,startdate,enddate,strict_deadline,mode 2 app201 2,General Studies 2012/2013,app,2012,basic,"This text can been seen by anonymous users.2 app2014,General Studies,app,2014,basic,"This text can been seen by anonymous users. 3 3 >>de<< 4 4 Dieser Text kann von anonymen Benutzern gelesen werden.",2012-03-01,2012-04-25,1,create 5 app201 3,General Studies 2013/2014,app,2012,basic,"This text can been seen by anonymous users.5 app2015,General Studies,app,2015,basic,"This text can been seen by anonymous users. 6 6 >>de<< 7 7 Dieser Text kann von anonymen Benutzern gelesen werden.",2013-03-01,2013-04-25,1,create -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py
r10613 r12394 151 151 self.csv_file, APPS_CONTAINER_HEADER_FIELDS) 152 152 avail_containers = [x for x in self.app['applicants'].keys()] 153 container = self.app['applicants'].get('app201 2', None)154 container2 = self.app['applicants'].get('app201 3', None)153 container = self.app['applicants'].get('app2014', None) 154 container2 = self.app['applicants'].get('app2015', None) 155 155 self.assertTrue(container is not None) 156 156 self.assertTrue(container2 is not None) 157 157 158 158 # check attributes 159 self.assertEqual(container.code, u'app201 2')160 self.assertEqual(container.title, u'General Studies 2012/2013')159 self.assertEqual(container.code, u'app2014') 160 self.assertEqual(container.title, u'General Studies') 161 161 self.assertEqual(container.prefix, u'app') 162 self.assertEqual(container.year, 201 2)162 self.assertEqual(container.year, 2014) 163 163 self.assertEqual(container.application_category, 'basic') 164 164 self.assertEqual( -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py
r12079 r12394 49 49 def setup_container(self, container): 50 50 # set all attributes of a container 51 container.code = u'dp201 2'52 container.title = u'General Studies 2012/13'51 container.code = u'dp2015' 52 container.title = u'General Studies' 53 53 container.prefix = list(ApplicationTypeSource()(container))[0] 54 container.year = 201 254 container.year = 2015 55 55 container.application_category = list(AppCatSource()(container))[0] 56 56 container.description = u'Some Description\nwith linebreak\n' 57 57 container.description += u'<<de>>man spriht deutsh' 58 58 container.startdate = datetime.datetime( 59 201 2, 1, 1, 12, 0, 0, tzinfo=pytz.utc)59 2015, 1, 1, 12, 0, 0, tzinfo=pytz.utc) 60 60 container.enddate = datetime.datetime( 61 201 2, 1, 31, 23, 0, 0, tzinfo=pytz.utc)61 2015, 1, 31, 23, 0, 0, tzinfo=pytz.utc) 62 62 return container 63 63 … … 74 74 'enddate,hidden,mode,prefix,startdate,strict_deadline,title,year\r\n' 75 75 76 'basic,0.0,,dp201 2,'76 'basic,0.0,,dp2015,' 77 77 '"Some Description\nwith linebreak\n<<de>>man spriht deutsh",' 78 '201 2-01-31 23:00:00+00:00#,0,,app,2012-01-01 12:00:00+00:00#,1,'79 'General Studies 2012/13,2012\r\n'78 '2015-01-31 23:00:00+00:00#,0,,app,2015-01-01 12:00:00+00:00#,1,' 79 'General Studies,2015\r\n' 80 80 ) 81 81 return
Note: See TracChangeset for help on using the changeset viewer.