- Timestamp:
- 11 Mar 2019, 20:43:33 (6 years ago)
- Location:
- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.