- Timestamp:
- 13 Feb 2025, 11:36:26 (2 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py
r17766 r18021 22 22 from waeup.kofa.testing import KofaUnitTestLayer, FunctionalLayer 23 23 from waeup.kofa.utils.utils import KofaUtils 24 25 curr_year = datetime.datetime.now().year 24 26 25 27 class ApplicantsContainersExporterTest(unittest.TestCase): … … 319 321 def test_export_filtered(self): 320 322 self.applicant = self.setup_applicant(self.applicant) 323 cdate = str('%s#' % self.applicant['p120'].creation_date) 324 self.applicant['p120'].payment_date = datetime.datetime( 325 curr_year-6, 4, 1, 14, 12, 1) 321 326 exporter = ApplicantPaymentExporter() 322 327 exporter.export_filtered( 323 328 self.app, self.outfile, container=self.container.code) 324 329 result = open(self.outfile, 'rb').read() 325 cdate = str('%s#' % self.applicant['p120'].creation_date)326 330 self.assertEqual( 327 331 'ac,amount_auth,creation_date,p_category,p_combi,p_id,' 328 332 'p_item,p_session,p_state,payment_date,r_amount_approved,' 329 333 'r_code,r_desc,applicant_id,reg_number,display_fullname\r\n' 330 ',0.0,%s,application,[],p120,,2012,paid,,0.0,,,dp2011_654321,' 334 ',0.0,%s,application,[],p120,,2012,paid,2019-04-01 14:12:01#,0.0,' 335 ',,dp2011_654321,' 336 '123456,Anna M. Tester\r\n' % cdate, result) 337 exporter.export_filtered( 338 self.app, self.outfile, container=self.container.code, 339 p_start='03/02/2025', p_end='04/02/2025') 340 result = open(self.outfile, 'rb').read() 341 self.assertEqual( 342 'ac,amount_auth,creation_date,p_category,p_combi,p_id,' 343 'p_item,p_session,p_state,payment_date,r_amount_approved,' 344 'r_code,r_desc,applicant_id,reg_number,display_fullname\r\n', 345 result) 346 exporter.export_filtered( 347 self.app, self.outfile, container=self.container.code, 348 p_start='03/02/2019', p_end='04/05/2019') 349 result = open(self.outfile, 'rb').read() 350 self.assertEqual( 351 'ac,amount_auth,creation_date,p_category,p_combi,p_id,' 352 'p_item,p_session,p_state,payment_date,r_amount_approved,' 353 'r_code,r_desc,applicant_id,reg_number,display_fullname\r\n' 354 ',0.0,%s,application,[],p120,,2012,paid,2019-04-01 14:12:01#,0.0,' 355 ',,dp2011_654321,' 331 356 '123456,Anna M. Tester\r\n' % cdate, result) 332 357 return
Note: See TracChangeset for help on using the changeset viewer.