Ignore:
Timestamp:
13 Oct 2019, 20:40:12 (5 years ago)
Author:
Henrik Bettermann
Message:

Adjust to changes in base package.

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

    r15574 r15666  
    553553
    554554        error, payment = utils.setPaymentDetails('schoolfee',
    555             self.student, None, None)
     555            self.student, None, None, None)
    556556        self.assertEqual(payment, None)
    557557        # Student is in state 'created' and can thus not pay.
     
    560560        # Previous session must be valid.
    561561        error, payment = utils.setPaymentDetails('schoolfee',
    562             self.student, 2000, 300)
     562            self.student, 2000, 300, None)
    563563        self.assertEqual(payment, None)
    564564        self.assertTrue(u'The previous session must not fall below' in error)
    565565        error, payment = utils.setPaymentDetails('schoolfee',
    566             self.student, 2005, 300)
     566            self.student, 2005, 300, None)
    567567        self.assertEqual(payment, None)
    568568        self.assertTrue(u'This is not a previous session' in error)
     
    571571        # are distinguished by their entry_level
    572572        error, payment = utils.setPaymentDetails('schoolfee',
    573             self.student, 2002, 300)
     573            self.student, 2002, 300, None)
    574574        self.assertEqual(payment.amount_auth, 40000.0)
    575575        self.assertEqual(payment.p_session, 2002)
     
    577577        self.assertFalse(payment.p_current)
    578578        error, payment = utils.setPaymentDetails('schoolfee',
    579             self.student, 2003, 300)
     579            self.student, 2003, 300, None)
    580580        self.assertEqual(payment.amount_auth, 20000.0)
    581581        self.assertEqual(payment.p_session, 2003)
     
    587587        IWorkflowState(self.student).setState('cleared')
    588588        error, payment = utils.setPaymentDetails('schoolfee',
    589             self.student, None, None)
     589            self.student, None, None, None)
    590590        self.assertEqual(payment.p_level, 100)
    591591        self.assertEqual(payment.p_session, 2004)
     
    601601        self.app['configuration']['2005'].penalty_ug_ft = 88.0
    602602        error, payment = utils.setPaymentDetails('schoolfee',
    603             self.student, None, None)
     603            self.student, None, None, None)
    604604        self.assertEqual(payment.amount_auth, 40099.0)
    605605
     
    607607
    608608        #error, payment = utils.setPaymentDetails('schoolfee',
    609         #    self.student, None, None)
     609        #    self.student, None, None, None)
    610610        #self.assertTrue(
    611611        #    u'You have not yet paid your current/active session.' in error)
     
    620620
    621621        error, payment = utils.setPaymentDetails('schoolfee',
    622             self.student, None, None)
     622            self.student, None, None, None)
    623623        self.assertEqual(payment.p_level, 200)
    624624        self.assertEqual(payment.p_session, 2005)
     
    631631        self.certificate.custom_float_1 = 30000.0
    632632        error, payment = utils.setPaymentDetails(
    633             'schoolfee', self.student, None, None)
     633            'schoolfee', self.student, None, None, None)
    634634        self.assertEqual(payment.amount_auth, 20088.0)
    635635
     
    638638        self.student.is_staff = True
    639639        error, payment = utils.setPaymentDetails('schoolfee',
    640             self.student, None, None)
     640            self.student, None, None, None)
    641641        self.assertEqual(payment.p_level, 200)
    642642        self.assertEqual(payment.p_session, 2005)
     
    651651        self.certificate.school_fee_3 = 60000.0
    652652        error, payment = utils.setPaymentDetails(
    653             'schoolfee', self.student, None, None)
     653            'schoolfee', self.student, None, None, None)
    654654        self.assertEqual(payment.p_level, 100)
    655655        self.assertEqual(payment.p_session, 2004)
     
    661661        self.certificate.school_fee_4 = 20000.0
    662662        error, payment = utils.setPaymentDetails(
    663             'schoolfee', self.student, None, None)
     663            'schoolfee', self.student, None, None, None)
    664664        self.assertEqual(payment.p_level, 200)
    665665        self.assertEqual(payment.p_session, 2005)
     
    676676        #self.certificate.school_fee_2 = 10000.0
    677677        #error, payment = utils.setPaymentDetails(
    678         #    'schoolfee', self.student, None, None)
     678        #    'schoolfee', self.student, None, None, None)
    679679        #self.assertEqual(payment.p_level, None)
    680680        #self.assertEqual(payment.p_session, 2005)
     
    685685        #self.certificate.study_mode = 'special_pg_pt'
    686686        #error, payment = utils.setPaymentDetails(
    687         #    'schoolfee', self.student, None, None)
     687        #    'schoolfee', self.student, None, None, None)
    688688        #self.assertEqual(payment.p_level, None)
    689689        #self.assertEqual(payment.p_session, 2005)
     
    693693        #IWorkflowState(self.student).setState('courses validated')
    694694        #error, payment = utils.setPaymentDetails(
    695         #    'schoolfee', self.student, None, None)
     695        #    'schoolfee', self.student, None, None, None)
    696696        #self.assertEqual(payment.p_level, None)
    697697        #self.assertEqual(payment.p_session, 2005)
     
    701701
    702702        error, payment = utils.setPaymentDetails('clearance',
    703             self.student, None, None)
     703            self.student, None, None, None)
    704704        self.assertEqual(payment.p_level, 100)
    705705        self.assertEqual(payment.p_session, 2004)
     
    709709
    710710        error, payment = utils.setPaymentDetails('gown',
    711             self.student, None, None)
     711            self.student, None, None, None)
    712712        self.assertEqual(payment.p_level, 100)
    713713        self.assertEqual(payment.p_session, 2004)
     
    724724
    725725        error, payment = utils.setPaymentDetails('hostel_maintenance',
    726             self.student, None, None)
     726            self.student, None, None, None)
    727727        self.assertEqual(payment.p_level, 100)
    728728        self.assertEqual(payment.p_session, 2004)
     
    733733        #self.certificate.study_mode = 'ug_ft'
    734734        #error, payment = utils.setPaymentDetails('bed_allocation',
    735         #    self.student, None, None)
     735        #    self.student, None, None, None)
    736736        #self.assertTrue(u'Amount could not be determined.' in error)
    737737        #self.student['studycourse'].current_session = 2004
     
    739739        #self.student['studycourse'].current_level = 100
    740740        #error, payment = utils.setPaymentDetails('bed_allocation',
    741         #    self.student, None, None)
     741        #    self.student, None, None, None)
    742742        #self.assertEqual(payment.p_level, 100)
    743743        #self.assertEqual(payment.p_session, 2004)
     
    748748        self.certificate.study_mode = 'pg_ft'
    749749        error, payment = utils.setPaymentDetails('bed_allocation',
    750             self.student, None, None)
     750            self.student, None, None, None)
    751751        self.assertEqual(error, u'Select your favoured hostel first.')
    752752        self.student['accommodation'].desired_hostel = u'no'
    753753        error, payment = utils.setPaymentDetails('bed_allocation',
    754             self.student, None, None)
     754            self.student, None, None, None)
    755755        self.assertEqual(payment.p_level, 100)
    756756        self.assertEqual(payment.p_session, 2004)
     
    760760
    761761        #error, payment = utils.setPaymentDetails('hostel_application',
    762         #    self.student, None, None)
     762        #    self.student, None, None, None)
    763763        #self.assertEqual(payment.p_level, 100)
    764764        #self.assertEqual(payment.p_session, 2004)
     
    771771
    772772        #error, payment = utils.setPaymentDetails('tempmaint_1',
    773         #    self.student, None, None)
     773        #    self.student, None, None, None)
    774774        #self.assertEqual(payment.p_level, 100)
    775775        #self.assertEqual(payment.p_session, 2004)
     
    779779
    780780        #error, payment = utils.setPaymentDetails('tempmaint_2',
    781         #    self.student, None, None)
     781        #    self.student, None, None, None)
    782782        #self.assertEqual(payment.p_level, 100)
    783783        #self.assertEqual(payment.p_session, 2004)
     
    787787
    788788        #error, payment = utils.setPaymentDetails('tempmaint_3',
    789         #    self.student, None, None)
     789        #    self.student, None, None, None)
    790790        #self.assertEqual(payment.p_level, 100)
    791791        #self.assertEqual(payment.p_session, 2004)
     
    795795
    796796        error, payment = utils.setPaymentDetails('transfer',
    797             self.student, None, None)
     797            self.student, None, None, None)
    798798        self.assertEqual(payment.p_level, 100)
    799799        self.assertEqual(payment.p_session, 2004)
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_export.py

    r15371 r15666  
    5959            'marit_stat,matric_number,middlename,nationality,'
    6060            'next_kin_address,next_kin_name,next_kin_phone,next_kin_relation,'
    61             'nysc_lga,nysc_location,nysc_year,officer_comment,parent_email,'
     61            'nysc_lga,nysc_location,nysc_year,officer_comment,parent_email,parents_email,'
    6262            'perm_address,personal_updated,phone,'
    6363            'physical_clearance_date,provisionally_cleared,reg_number,'
     
    6868            '"[(\'printing_craft_practice\', \'A1\')]",my clr code,1981-02-04#,,,'
    6969            'anna@sample.com,,,,,,,,,,,,,Anna,,,,,,"[(\'printing_craft_practice\', \'A1\')]"'
    70             ',,,,,,,,,,,,,,,,Tester,,,,234,M.,NG,,,,,,,,,,'
     70            ',,,,,,,,,,,,,,,,Tester,,,,234,M.,NG,,,,,,,,,,,'
    7171            '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,,,123,,,,,'
    7272            '"[(\'printing_craft_practice\', \'A1\')]",,f,A111111,0,,,created,'
     
    103103        result = open(self.outfile, 'rb').read()
    104104        self.assertMatches(
    105             'ac,amount_auth,creation_date,gateway_amt,p_category,p_current,'
     105            'ac,amount_auth,creation_date,gateway_amt,p_category,p_combi,p_current,'
    106106            'p_id,p_item,p_level,p_session,p_state,payment_date,provider_amt,'
    107107            'r_amount_approved,r_card_num,r_code,r_company,r_desc,'
    108108            'r_pay_reference,rebate_amount,staff_rebate,thirdparty_amt,student_id,state,'
    109109            'current_session\r\n'
    110             '666,12.12,%s-04-01 13:12:01#,,schoolfee,1,my-id,p-item,'
     110            '666,12.12,%s-04-01 13:12:01#,,schoolfee,[],1,my-id,p-item,'
    111111            '100,%s,paid,%s-04-01 14:12:01#,,12.12,'
    112112            '789,r-code,interswatch,,,,,,A111111,created,2012\r\n'
Note: See TracChangeset for help on using the changeset viewer.