Ignore:
Timestamp:
3 Jan 2023, 17:40:18 (2 years ago)
Author:
Henrik Bettermann
Message:

Add ExportPDFTishipSlip.

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

Legend:

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

    r17111 r17255  
    12201220        open(path, 'wb').write(self.browser.contents)
    12211221        print "Sample PDF medical_questionnaire_slip.pdf written to %s" % path
     1222
     1223        self.browser.open(self.student_path)
     1224        self.browser.getLink("Medical Questionnaire").click()
     1225        self.browser.getControl(name="form.bloodgroup").value = 'A'
     1226        self.browser.getControl(name="form.genotype").value = 'XYZ'
     1227        self.browser.getControl("Save").click()
     1228        self.browser.getLink("Download TISHIP registration slip").click()
     1229        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     1230        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     1231        path = os.path.join(samples_dir(), 'tiship_slip.pdf')
     1232        open(path, 'wb').write(self.browser.contents)
     1233        print "Sample PDF tiship_slip.pdf written to %s" % path
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_export.py

    r16437 r17255  
    1 import datetime
     1    import datetime
    22from zope.component import queryUtility
    33from zope.interface.verify import verifyObject, verifyClass
     
    141141        result = open(self.outfile, 'rb').read()
    142142        self.assertMatches(
    143             'asthma,body_pains,breathing,catarrh,company_confirmed,'
    144             'company_suspected,cough,diabetes,fever,headaches,hypertension,'
     143            'asthma,bloodgroup,body_pains,breathing,catarrh,company_confirmed,'
     144            'company_suspected,cough,diabetes,fever,genotype,headaches,hypertension,'
    145145            'lagos_abuja,medical_updated,medicines,negative,obesity,'
    146146            'others,outside,positive,smell,sneezing,sore_throat,taste,'
     
    148148            'matric_number,faccode,depcode,state,current_session,'
    149149            'current_level\r\n'
    150             ',,,,,,,,,,,,,,,,,,,,,1,,,,A111111,Anna M. Tester,234,'
     150            ',,,,,,,,,,,,,,,,,,,,,,,1,,,,A111111,Anna M. Tester,234,'
    151151            'NA,NA,created,2012,200\r\n' , result
    152152            )
Note: See TracChangeset for help on using the changeset viewer.