Ignore:
Timestamp:
19 Feb 2017, 07:38:38 (8 years ago)
Author:
Henrik Bettermann
Message:

Pin waeup.kofa 1.5

Location:
main/kofacustom.sampleuni/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.sampleuni/trunk/CHANGES.txt

    r13827 r14557  
    55=====================
    66
    7 * Pin waeup.kofa 1.4.1
     7* Pin waeup.kofa 1.5
    88
    99* Adjust to layout changes made in base package.
  • main/kofacustom.sampleuni/trunk/setup.py

    r13827 r14557  
    99    'grokui.admin',
    1010    'grokcore.startup',
    11     'waeup.kofa >= 1.4.1',
     11    'waeup.kofa >= 1.5',
    1212    ],
    1313
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/applicants/tests/test_browser.py

    r12482 r14557  
    2424from zope.catalog.interfaces import ICatalog
    2525from zope.intid.interfaces import IIntIds
     26from hurry.workflow.interfaces import IWorkflowState
    2627from kofacustom.sampleuni.testing import FunctionalLayer
    27 from waeup.kofa.schoolgrades import ResultEntry
    28 from waeup.kofa.utils.utils import KofaUtils
     28from waeup.kofa.browser.tests.test_pdf import samples_dir
    2929from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
    3030from waeup.kofa.applicants.tests.test_batching import ApplicantImportExportSetup
     
    5555        applicant.lastname = u'Tester'
    5656        applicant.middlename = u'M.'
     57        applicant.nationality = u'NG'
    5758        applicant.date_of_birth = datetime.date(1981, 2, 4)
    5859        applicant.sex = 'f'
     
    6364        applicant.course_admitted = self.certificate
    6465        applicant.notice = u'Some notice\nin lines.'
     66        applicant.screening_score = 98
     67        applicant.screening_venue = u'Exam Room'
     68        applicant.screening_date = u'Saturday, 16th June 2012 2:00:00 PM'
    6569        applicant.password = 'any password'
    66         result_entry = ResultEntry(
    67             KofaUtils.EXAM_SUBJECTS_DICT.keys()[0],
    68             KofaUtils.EXAM_GRADES[0][0]
    69             )
    70         applicant.school_grades = [
    71             result_entry]
    7270        return applicant
    7371
    74     def test_export_reimport_all(self):
    75         # we can export all applicants in a portal
    76         # set values we can expect in export file
    77         self.applicant = self.setup_applicant(self.applicant)
    78         exporter = CustomApplicantExporter()
    79         exporter.export_all(self.app, self.outfile)
    80         result = open(self.outfile, 'rb').read()
    81         self.assertTrue(
    82             'applicant_id,application_date,application_number,course1,course2,'
    83             'course_admitted,date_of_birth,display_fullname,email,firstname,'
    84             'history,lastname,locked,middlename,notice,password,phone,'
    85             'reg_number,sex,special_application,state,'
    86             'student_id,suspended,container_code\r\n'
    87             'dp2011_654321,,654321,CERT1,CERT1,CERT1,1981-02-04#,'
    88             'Anna M. Tester,anna@sample.com,Anna,'
    89             in result)
    90         self.assertTrue(
    91             'Application initialized by system\'],'
    92             'Tester,0,M.,"Some notice\nin lines.",any password,'
    93             '+234-123-12345#,123456,f,,initialized,,0,dp2011\r\n'
    94             in result)
    95         # We can import the same file if we ignore some columns.
    96         # Since the applicants_catalog hasn't been notified, the same
    97         # record with same reg_number can be imported twice.
    98         processor = CustomApplicantProcessor()
    99         result = processor.doImport(
    100             self.outfile,
    101             ['ignore_applicant_id','application_date',
    102             'ignore_application_number','course1','course2',
    103             'course_admitted','date_of_birth',
    104             'ignore_display_fullname','email','firstname',
    105             'ignore_history','lastname','locked','middlename',
    106             'notice','password','phone',
    107             'reg_number','sex','special_application','state',
    108             'student_id','suspended','container_code'],
    109             mode='create')
    110         num_succ, num_fail, finished_path, failed_path = result
    111         #content = open(failed_path).read()
    112         self.assertEqual(num_succ,1)
    113         self.assertEqual(num_fail,0)
    114         return
     72class ApplicantsContainerUITests(ApplicantsFullSetup):
     73    # Tests for ApplicantsContainer class views and pages
     74
     75    layer = FunctionalLayer
     76
     77    def test_application_slip(self):
     78        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     79        self.slip_path = self.view_path + '/application_slip.pdf'
     80        self.browser.open(self.manage_path)
     81        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     82        self.fill_correct_values()
     83        self.browser.getControl("Save").click()
     84        IWorkflowState(self.applicant).setState('submitted')
     85        self.browser.open(self.manage_path)
     86        self.browser.getLink("Download application slip").click()
     87        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     88        self.assertEqual(self.browser.headers['Content-Type'],
     89                         'application/pdf')
     90        path = os.path.join(samples_dir(), 'application_slip.pdf')
     91        open(path, 'wb').write(self.browser.contents)
     92        print "Sample application_slip.pdf written to %s" % path
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/tests/test_export.py

    r13289 r14557  
    44from waeup.kofa.interfaces import ICSVExporter
    55from waeup.kofa.schoolgrades import ResultEntry
    6 from waeup.kofa.students.tests.test_batching import StudentImportExportSetup
     6from waeup.kofa.students.tests.test_batching import (
     7    StudentImportExportSetup, curr_year)
    78from kofacustom.sampleuni.utils.utils import CustomKofaUtils
    89from kofacustom.sampleuni.students.export import (
     
    4647        result = open(self.outfile, 'rb').read()
    4748        self.assertMatches(
    48             'adm_code,clearance_locked,clr_code,date_of_birth,email,'
    49             'employer,firstname,lastname,matric_number,middlename,'
     49            'adm_code,clr_code,date_of_birth,email,'
     50            'employer,firstname,flash_notice,lastname,matric_number,middlename,'
    5051            'nationality,officer_comment,perm_address,personal_updated,'
    5152            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
    5253            'password,state,history,certcode,is_postgrad,current_level,'
    53             'current_session\r\nmy adm code,0,my clr code,1981-02-04#,'
    54             'anna@sample.com,,Anna,Tester,234,M.,NG,,'
     54            'current_session\r\nmy adm code,my clr code,1981-02-04#,'
     55            'anna@sample.com,,Anna,,Tester,234,M.,NG,,'
    5556            '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,123,'
    5657            'f,A111111,0,,,created,'
     
    9091            'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
    9192            'r_code,r_desc,student_id,state,current_session\r\n666,'
    92             '12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,p-item,'
    93             '100,2012,paid,2012-04-01 14:12:01#,12.12,r-code,,'
    94             'A111111,created,2012\r\n',
    95             result
     93            '12.12,%s-04-01 13:12:01#,schoolfee,1,my-id,p-item,'
     94            '100,%s,paid,%s-04-01 14:12:01#,12.12,r-code,,'
     95            'A111111,created,2012\r\n'
     96            % (curr_year-6, curr_year-6, curr_year-6), result
    9697            )
    9798        return
  • main/kofacustom.sampleuni/trunk/versions.cfg

    r13827 r14557  
    157157zope.xmlpickle = 3.4.0
    158158
    159 # Added by buildout at 2016-04-11 08:52:15.063438
    160 waeup.kofa = 1.4.1
     159# Added by buildout at 2017-02-19 08:18:44.136240
     160waeup.kofa = 1.5
Note: See TracChangeset for help on using the changeset viewer.