Ignore:
Timestamp:
13 Jan 2020, 13:06:54 (5 years ago)
Author:
Henrik Bettermann
Message:

Add session_levelfilter to StudentStudyLevelExporter.

Adjust tests.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r15709 r15918  
    37603760            'zope.mgr - students.browser.DatacenterExportJobContainerJobConfig '
    37613761            '- exported: bursary (2004, 100, ug_ft, None, None, None, '
    3762             '13/12/2012, 14/12/2012, all, all, all, all), job_id=%s'
     3762            '13/12/2012, 14/12/2012, all, all, all, all, all), job_id=%s'
    37633763            % job_id in logcontent
    37643764            )
     
    38433843            self.browser.headers['content-disposition'])
    38443844        self.assertTrue(
    3845             '666,12.12,2012-12-13 00:00:00#,schoolfee,[],1,my-id,p-item,100,2013,'
     3845            '666,12.12,2012-12-13 00:00:00#,schoolfee,[],1,my-id,p-item,100,%s,'
    38463846            'paid,2012-12-13 00:00:00#,12.12,r-code,,K1000000,234,123,Anna,,'
    3847             'Tester,created,2004,2004,,fac1,dep1,CERT1' in self.browser.contents)
     3847            'Tester,created,2004,2004,,fac1,dep1,CERT1'
     3848            %(curr_year-6) in self.browser.contents)
    38483849        self.assertEqual(len(self.app['datacenter'].running_exports), 1)
    38493850        job_id = self.app['datacenter'].running_exports[0][0]
     
    38593860            'zope.mgr - students.browser.FacultiesExportJobContainerJobConfig '
    38603861            '- exported: bursary (2004, 100, ug_ft, None, None, None, '
    3861             '13/12/2012, 14/12/2012, all, all, schoolfee, all), job_id=%s'
     3862            '13/12/2012, 14/12/2012, all, all, schoolfee, all, all), job_id=%s'
    38623863            % job_id in logcontent
    38633864            )
     
    38893890            self.browser.headers['content-disposition'])
    38903891        self.assertTrue(
    3891             '666,12.12,2012-12-13 00:00:00#,schoolfee,[],1,my-id,p-item,100,2013,'
     3892            '666,12.12,2012-12-13 00:00:00#,schoolfee,[],1,my-id,p-item,100,%s,'
    38923893            'paid,2012-12-13 00:00:00#,12.12,r-code,,K1000000,234,123,Anna,,'
    3893             'Tester,created,2004,2004,,fac1,dep1,CERT1' in self.browser.contents)
     3894            'Tester,created,2004,2004,,fac1,dep1,CERT1'
     3895            %(curr_year-6) in self.browser.contents)
    38943896
    38953897    def test_faculty_export(self):
     
    39413943            'zope.mgr - students.browser.FacultyExportJobContainerJobConfig '
    39423944            '- exported: students (2004, 100, ug_ft, fac1, None, None, '
    3943             '13/12/2012, 14/12/2012, all, all, all, all), job_id=%s'
     3945            '13/12/2012, 14/12/2012, all, all, all, all, all), job_id=%s'
    39443946            % job_id in logcontent
    39453947            )
     
    40004002            'zope.mgr - students.browser.DepartmentExportJobContainerJobConfig '
    40014003            '- exported: students (2004, 100, ug_ft, None, dep1, None, '
    4002             '13/12/2012, 14/12/2012, all, all, all, all), job_id=%s'
     4004            '13/12/2012, 14/12/2012, all, all, all, all, all), job_id=%s'
    40034005            % job_id in logcontent
    40044006            )
     
    40474049            'zope.mgr - students.browser.CertificateExportJobContainerJobConfig '
    40484050            '- exported: students '
    4049             '(2004, 100, None, None, None, CERT1, , , None, None, None, None), '
     4051            '(2004, 100, None, None, None, CERT1, , , None, None, '
     4052            'None, None, None), '
    40504053            'job_id=%s'
    40514054            % job_id in logcontent
     
    42464249            self.browser.headers['content-disposition'])
    42474250        self.assertTrue(
    4248             '666,12.12,2012-12-13 00:00:00#,schoolfee,[],1,my-id,p-item,100,2013,'
     4251            '666,12.12,2012-12-13 00:00:00#,schoolfee,[],1,my-id,p-item,100,%s,'
    42494252            'paid,2012-12-13 00:00:00#,12.12,r-code,,K1000000,234,123,Anna,,'
    4250             'Tester,created,2004,2004,,fac1,dep1,CERT1' in self.browser.contents)
     4253            'Tester,created,2004,2004,,fac1,dep1,CERT1'
     4254            %(curr_year-6) in self.browser.contents)
    42514255        # ... and discarded
    42524256        self.browser.open('http://localhost/app/faculties/exports')
     
    42724276            self.browser.headers['content-disposition'])
    42734277        self.assertTrue(
    4274             '666,12.12,2012-12-13 00:00:00#,schoolfee,[],1,my-id,p-item,100,2013,'
     4278            '666,12.12,2012-12-13 00:00:00#,schoolfee,[],1,my-id,p-item,100,%s,'
    42754279            'paid,2012-12-13 00:00:00#,12.12,r-code,,K1000000,234,123,Anna,,'
    4276             'Tester,created,2004,2004,,fac1,dep1,CERT1' in self.browser.contents)
     4280            'Tester,created,2004,2004,,fac1,dep1,CERT1'
     4281            %(curr_year-6) in self.browser.contents)
    42774282
    42784283    def test_export_accommodation_officers(self):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r15873 r15918  
    13651365        super(SessionPaymentsOverviewExporterTest, self).setUp()
    13661366        self.setup_for_export()
     1367        paycats = ('schoolfee', 'clearance', 'gown', 'transcript')
     1368        paycatyears = ''
    13671369        grok.getSite()['configuration'].current_academic_session = curr_year - 4
     1370        year_range = range(curr_year-6, curr_year-3)
     1371        year_range_tuple = tuple([str(year)[2:] for year in year_range])
     1372        for cat in paycats:
     1373            for year in year_range_tuple:
     1374                paycatyears += '%s,'%(cat+str(year))
     1375        self.paycatyears = paycatyears.strip(',')
    13681376        return
    13691377
     
    13891397            'student_id,matric_number,display_fullname,state,certcode,'
    13901398            'faccode,depcode,is_postgrad,current_level,current_session,'
    1391             'current_mode,entry_session,reg_number,schoolfee13,'
    1392             'schoolfee14,schoolfee15,clearance13,clearance14,clearance15,'
    1393             'gown13,gown14,gown15,transcript13,transcript14,transcript15\r\n'
     1399            'current_mode,entry_session,reg_number,%s\r\n'
    13941400            'A111111,234,Anna M. Tester,created,CERT1,NA,NA,0,200,'
    13951401            '2012,ug_ft,2010,123,'
    1396             '12.12,,,,,,,,,,,\r\n' in result
     1402            '12.12,,,,,,,,,,,\r\n' %self.paycatyears in result
    13971403            )
    13981404        return
     
    14311437            'student_id,matric_number,display_fullname,state,certcode,faccode,'
    14321438            'depcode,is_postgrad,current_level,current_session,'
    1433             'current_mode,entry_session,reg_number,'
    1434             'schoolfee13,schoolfee14,schoolfee15,'
    1435             'clearance13,clearance14,clearance15,'
    1436             'gown13,gown14,gown15,'
    1437             'transcript13,transcript14,transcript15\r\n'
     1439            'current_mode,entry_session,reg_number,%s\r\n'
    14381440            'A111111,234,Anna M. Tester,created,CERT1,NA,NA,0,200,2012,ug_ft,'
    14391441            '2010,123,'
    14401442            '12.12,14.14,1.01,,,,,,,,,\r\n'
    1441             in result
     1443            %self.paycatyears in result
    14421444            )
    14431445        return
Note: See TracChangeset for help on using the changeset viewer.