Changeset 15351
- Timestamp:
- 11 Mar 2019, 20:43:33 (6 years ago)
- Location:
- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/tests.py
r15270 r15351 204 204 in self.browser.contents) 205 205 self.assertTrue( 206 'action="http ://www.remitademo.net/remita/ecomm/finalize.reg"'206 'action="https://www.remitademo.net/remita/ecomm/finalize.reg"' 207 207 in self.browser.contents) 208 208 self.assertEqual(self.payment.r_company, 'remita') … … 235 235 self.payment.p_id = self.orderId 236 236 self.browser.getLink("Requery Remita Payment Status").click() 237 self.assertTrue(' Successful payment' in self.browser.contents)237 self.assertTrue('Payment successfully completed' in self.browser.contents) 238 238 self.assertEqual(self.payment.r_desc, 'Approved') 239 239 self.assertEqual(self.payment.r_amount_approved , 1000.0) -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/webservices.py
r14801 r15351 38 38 merchantId = '2547916' 39 39 host = 'www.remitademo.net' 40 https = False40 https = True 41 41 api_key = '1946' 42 42 -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/export.py
r13944 r15351 96 96 'state','current_session', 97 97 'entry_session', 'entry_mode', 98 'faccode', 'depcode','certcode') 98 'faccode', 'depcode','certcode','lga') 99 100 def mangle_value(self, value, name, context=None): 101 """The mangler fetches the student data. 102 """ 103 if context is not None: 104 student = context.student 105 if name in [ 106 'student_id','matric_number', 'reg_number', 107 'firstname', 'middlename', 'lastname', 108 'state', 'current_session', 109 'entry_session', 'entry_mode', 110 'faccode', 'depcode', 'certcode', 111 'lga'] and student is not None: 112 value = getattr(student, name, None) 113 return super( 114 StudentPaymentExporter, self).mangle_value( 115 value, name, context=context) 99 116 100 117 class ClearanceRequestedStudentExporter(StudentExporter): -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_browser.py
r14274 r15351 37 37 from waeup.kofa.students.interfaces import IStudentsUtils 38 38 from waeup.kofa.browser.tests.test_pdf import samples_dir 39 from waeup.kofa.tests.test_authentication import SECRET 39 40 from kofacustom.nigeria.students.batching import NigeriaStudentProcessor 40 41 from kofacustom.nigeria.testing import FunctionalLayer … … 352 353 353 354 def test_financial_clearance(self): 354 self.app['users'].addUser('mrbursary', 'mrbursarysecret')355 self.app['users'].addUser('mrbursary', SECRET) 355 356 self.app['users']['mrbursary'].email = 'mrbursary@foo.ng' 356 357 self.app['users']['mrbursary'].title = u'Carlo Pitter' … … 367 368 self.browser.open(self.login_path) 368 369 self.browser.getControl(name="form.login").value = 'mrbursary' 369 self.browser.getControl(name="form.password").value = 'mrbursarysecret'370 self.browser.getControl(name="form.password").value = SECRET 370 371 self.browser.getControl("Login").click() 371 372 # BO can see his roles -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_export.py
r15045 r15351 26 26 from kofacustom.nigeria.students.export import ( 27 27 NigeriaStudentExporter, NigeriaStudentPaymentExporter, 28 ClearanceRequestedStudentExporter )28 ClearanceRequestedStudentExporter, NigeriaDataForBursaryExporter) 29 29 from kofacustom.nigeria.testing import FunctionalLayer 30 30 … … 168 168 ) 169 169 return 170 171 class BursaryDataExporterTest(StudentImportExportSetup): 172 173 layer = FunctionalLayer 174 175 def setUp(self): 176 super(BursaryDataExporterTest, self).setUp() 177 self.setup_for_export() 178 return 179 180 def test_export_all(self): 181 # we can really export all payments 182 # set values we can expect in export file 183 self.setup_student(self.student) 184 exporter = NigeriaDataForBursaryExporter() 185 exporter.export_all(self.app, self.outfile) 186 result = open(self.outfile, 'rb').read() 187 self.assertEqual( 188 result, 189 'ac,amount_auth,creation_date,formatted_p_date,gateway_amt,' 190 'p_category,p_current,p_id,p_item,p_level,p_session,p_state,' 191 'payment_date,provider_amt,r_amount_approved,r_card_num,r_code,' 192 'r_company,r_desc,r_pay_reference,thirdparty_amt,student_id,' 193 'matric_number,reg_number,firstname,middlename,lastname,state,' 194 'current_session,entry_session,entry_mode,faccode,depcode,certcode,lga\r\n' 195 196 '666,12.12,%s-04-01 13:12:01#,,,schoolfee,1,my-id,p-item,' 197 '100,%s,paid,%s-04-01 14:12:01#,,12.12,,r-code,,,,,A111111,' 198 '234,123,Anna,M.,Tester,created,2012,2010,ug_ft,NA,NA,CERT1,\r\n' 199 % (curr_year-6, curr_year-6, curr_year-6) 200 ) 201 return
Note: See TracChangeset for help on using the changeset viewer.