Changeset 15704
- Timestamp:
- 28 Oct 2019, 07:12:20 (5 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/browser.py
r15696 r15704 99 99 </payment_item_detail>""" % xmldict 100 100 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 101 102 self.xml_data = None103 104 101 self.context.provider_amt = provider_amt 105 102 self.context.gateway_amt = GATEWAY_AMT -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py
r15696 r15704 71 71 '<span>40000.0</span>' in self.browser.contents) 72 72 self.payment_url = self.browser.url 73 self.browser.getLink(" CollegePAY", index=0).click()74 self.assertTrue('<input type="hidden" name="pay_item_id" value=" 0000" />' in73 self.browser.getLink("Pay via Interswitch", index=0).click() 74 self.assertTrue('<input type="hidden" name="pay_item_id" value="103" />' in 75 75 self.browser.contents) 76 76 self.assertEqual(self.student.current_mode, 'ug_ft') … … 92 92 self.student['payments']['xyz'] = acc_payment 93 93 self.browser.open(self.payments_path + '/xyz') 94 self.browser.getLink(" CollegePAY", index=0).click()95 self.assertMatches('...<input type="hidden" name="pay_item_id" value=" 0000" />...',94 self.browser.getLink("Pay via Interswitch", index=0).click() 95 self.assertMatches('...<input type="hidden" name="pay_item_id" value="103" />...', 96 96 self.browser.contents) 97 97 self.assertMatches('...Total Amount Authorized:...', … … 104 104 acc_payment.creation_date -= delta 105 105 self.browser.open(self.payments_path + '/xyz') 106 self.browser.getLink(" CollegePAY", index=0).click()106 self.browser.getLink("Pay via Interswitch", index=0).click() 107 107 self.assertMatches( 108 108 '...This payment ticket is too old. Please create a new ticket...', … … 111 111 acc_payment.creation_date += delta 112 112 self.browser.open(self.payments_path + '/xyz') 113 self.browser.getLink(" CollegePAY", index=0).click()113 self.browser.getLink("Pay via Interswitch", index=0).click() 114 114 self.assertMatches('...Total Amount Authorized:...', 115 115 self.browser.contents) … … 230 230 def test_interswitch_form(self): 231 231 # Manager can access InterswitchForm 232 self.browser.getLink(" CollegePAY", index=0).click()232 self.browser.getLink("Pay via Interswitch", index=0).click() 233 233 self.assertMatches('...Total Amount Authorized:...', 234 234 self.browser.contents) … … 239 239 self.applicant.values()[0].creation_date -= delta 240 240 self.browser.open(self.payment_url) 241 self.browser.getLink(" CollegePAY", index=0).click()241 self.browser.getLink("Pay via Interswitch", index=0).click() 242 242 self.assertMatches( 243 243 '...This payment ticket is too old. Please create a new ticket...', -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py
r15696 r15704 34 34 from kofacustom.nigeria.students.browser import ( 35 35 NigeriaOnlinePaymentDisplayFormPage, 36 NigeriaStudentBaseDisplayFormPage, 36 37 NigeriaStudentBaseManageFormPage, 37 38 NigeriaStudentClearanceEditFormPage, … … 40 41 NigeriaExportPDFClearanceSlip, 41 42 NigeriaExportPDFCourseRegistrationSlip, 43 NigeriaStudentBaseEditFormPage, 42 44 ) 43 45 44 46 from kofacustom.iuokada.students.interfaces import ( 45 47 ICustomStudentOnlinePayment, ICustomStudentStudyCourse, 46 ICustomStudentStudyLevel )48 ICustomStudentStudyLevel, ICustomStudentBase) 47 49 from kofacustom.iuokada.interfaces import MessageFactory as _ 50 51 class CustomStudentBaseDisplayFormPage(NigeriaStudentBaseDisplayFormPage): 52 """ Page to display student base data 53 """ 54 form_fields = grok.AutoFields(ICustomStudentBase).omit( 55 'password', 'suspended', 'suspended_comment', 'flash_notice') 56 57 class CustomStudentBaseManageFormPage(NigeriaStudentBaseManageFormPage): 58 """ View to manage student base data 59 """ 60 form_fields = grok.AutoFields(ICustomStudentBase).omit( 61 'student_id', 'adm_code', 'suspended') 62 63 class StudentBaseEditFormPage(NigeriaStudentBaseEditFormPage): 64 """ View to edit student base data 65 """ 66 form_fields = grok.AutoFields(ICustomStudentBase).select( 67 'email', 'email2', 'parents_email', 'phone',) 48 68 49 69 class CustomExportPDFCourseRegistrationSlip( -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/interfaces.py
r15563 r15704 19 19 from zope import schema 20 20 from waeup.kofa.students.vocabularies import StudyLevelSource 21 from waeup.kofa.interfaces import validate_email 21 22 from kofacustom.nigeria.students.interfaces import ( 22 23 INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance, … … 32 33 33 34 """ 35 36 email2 = schema.ASCIILine( 37 title = _(u'Second Email'), 38 required = False, 39 constraint=validate_email, 40 ) 41 42 ICustomStudentBase['email2'].order = ICustomStudentBase[ 43 'phone'].order 44 ICustomStudentBase['phone'].order = ICustomStudentBase[ 45 'email'].order 34 46 35 47 class ICustomStudentPersonal(INigeriaStudentPersonal): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_export.py
r15672 r15704 48 48 self.assertMatches( 49 49 'adm_code,alr_date,alr_fname,alr_no,alr_results,' 50 'clr_code,date_of_birth,def_adm,disabled,email,em p2_end,'50 'clr_code,date_of_birth,def_adm,disabled,email,email2,emp2_end,' 51 51 'emp2_position,emp2_reason,emp2_start,emp_end,emp_position,' 52 52 'emp_reason,emp_start,employer,employer2,' … … 67 67 'current_level,current_session\r\nmy adm code,,,,' 68 68 '"[(\'printing_craft_practice\', \'A1\')]",my clr code,1981-02-04#,,,' 69 'anna@sample.com,,,,,,,,,,,,, Anna,,,,,,"[(\'printing_craft_practice\', \'A1\')]"'69 'anna@sample.com,,,,,,,,,,,,,,Anna,,,,,,"[(\'printing_craft_practice\', \'A1\')]"' 70 70 ',,,,,,,,,,,,,,,,Tester,,,234,M.,NG,,,,,,,,,,' 71 71 '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,,,123,,,,,'
Note: See TracChangeset for help on using the changeset viewer.