Changeset 14366


Ignore:
Timestamp:
5 Jan 2017, 08:31:51 (8 years ago)
Author:
Henrik Bettermann
Message:

Fix tests after turn of the year.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r14282 r14366  
    16851685            '\nmsg: Dear Linda Tree,'
    16861686            '\nmsg: '
    1687             '\nmsg: The candidate with Id app2014_372052 and name John Anthony Tester applied to'
    1688             '\nmsg: the Sample University to study Unnamed Certificate for the 2014/2015 session.'
     1687            '\nmsg: The candidate with Id app%s_372052 and name John Anthony Tester applied to'
     1688            '\nmsg: the Sample University to study Unnamed Certificate for the %s/%s session.'
    16891689            '\nmsg: The candidate has listed you as referee. You are thus required to kindly use'
    16901690            '\nmsg: the link below to provide your referral remarks on or before'
     
    17111711            '\nmsg: Dear Otis Stone,'
    17121712            '\nmsg: '
    1713             '\nmsg: The candidate with Id app2014_<6-DIGITS> and name John Anthony Tester applied to'
    1714             '\nmsg: the Sample University to study Unnamed Certificate for the 2014/2015 session.'
     1713            '\nmsg: The candidate with Id app%s_<6-DIGITS> and name John Anthony Tester applied to'
     1714            '\nmsg: the Sample University to study Unnamed Certificate for the %s/%s session.'
    17151715            '\nmsg: The candidate has listed you as referee. You are thus required to kindly use'
    17161716            '\nmsg: the link below to provide your referral remarks on or before'
     
    17241724            '\nmsg: Post Graduate School'
    17251725            '\nmsg: Sample University'
    1726             '\nmsg: ' % (mandate_id_0, mandate_id_1),
     1726            '\nmsg: '
     1727            % (session_1, session_1, session_2, mandate_id_0,
     1728               session_1, session_1, session_2, mandate_id_1,),
    17271729            self.get_fake_smtp_output()
    17281730            )
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py

    r13872 r14366  
    158158    '\n')[0].split(',')
    159159
     160curr_year = datetime.datetime.now().year
     161
    160162class StudentImportExportSetup(FunctionalTestCase):
    161163
     
    274276        # get a payment with all fields set
    275277        payment = StudentOnlinePayment()
    276         payment.creation_date = datetime.datetime(2012, 4, 1, 13, 12, 1)
     278        payment.creation_date = datetime.datetime(curr_year-6, 4, 1, 13, 12, 1)
    277279        payment.p_id = 'my-id'
    278280        payment.p_category = u'schoolfee'
     
    281283        payment.p_item = u'p-item'
    282284        payment.p_level = 100
    283         payment.p_session = 2012
    284         payment.payment_date = datetime.datetime(2012, 4, 1, 14, 12, 1)
     285        payment.p_session = curr_year - 6
     286        payment.payment_date = datetime.datetime(curr_year-6, 4, 1, 14, 12, 1)
    285287        payment.amount_auth = 12.12
    286288        payment.r_amount_approved = 12.12
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r13711 r14366  
    766766            'r_code,r_desc,student_id,state,current_session\r\n'
    767767
    768             '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
    769             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
     768            '666,12.12,%s-04-01 13:12:01#,schoolfee,1,my-id,'
     769            'p-item,100,%s,paid,%s-04-01 14:12:01#,12.12,'
    770770            'r-code,,A111111,created,2012\r\n'
     771            % (curr_year-6, curr_year-6, curr_year-6)
    771772            )
    772773        return
     
    785786            'r_code,r_desc,student_id,state,current_session\r\n'
    786787
    787             '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
    788             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
     788            '666,12.12,%s-04-01 13:12:01#,schoolfee,1,my-id,'
     789            'p-item,100,%s,paid,%s-04-01 14:12:01#,12.12,'
    789790            'r-code,,A111111,created,2012\r\n'
     791            % (curr_year-6, curr_year-6, curr_year-6)
    790792            )
    791793        return
     
    804806            'r_code,r_desc,student_id,state,current_session\r\n'
    805807
    806             '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
    807             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
     808            '666,12.12,%s-04-01 13:12:01#,schoolfee,1,my-id,'
     809            'p-item,100,%s,paid,%s-04-01 14:12:01#,12.12,'
    808810            'r-code,,A111111,created,2012\r\n'
     811            % (curr_year-6, curr_year-6, curr_year-6)
    809812            )
    810813        return
     
    826829            'r_code,r_desc,student_id,state,current_session\r\n'
    827830
    828             '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
    829             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
     831            '666,12.12,%s-04-01 13:12:01#,schoolfee,1,my-id,'
     832            'p-item,100,%s,paid,%s-04-01 14:12:01#,12.12,'
    830833            'r-code,,A111111,created,2012\r\n'
     834            % (curr_year-6, curr_year-6, curr_year-6)
    831835            )
    832836        return
     
    854858            self.app, self.outfile,
    855859            current_session=None, current_level=None,
    856             payments_start='01/04/2012', payments_end='01/04/2012')
     860            payments_start='01/04/%s' % (curr_year-6),
     861            payments_end='01/04/%s' % (curr_year-6))
    857862        result = open(self.outfile, 'rb').read()
    858863        self.assertEqual(
     
    862867            'r_code,r_desc,student_id,state,current_session\r\n'
    863868
    864             '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
    865             'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
     869            '666,12.12,%s-04-01 13:12:01#,schoolfee,1,my-id,'
     870            'p-item,100,%s,paid,%s-04-01 14:12:01#,12.12,'
    866871            'r-code,,A111111,created,2012\r\n'
     872            % (curr_year-6, curr_year-6, curr_year-6)
    867873            )
    868874        # Payment date is 2012-04-01, 14:12:01.
     
    938944            'r_code,r_desc,student_id,state,current_session\r\n'
    939945
    940             '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
    941             'p-item,100,2012,unpaid,2012-04-01 14:12:01#,12.12,'
     946            '666,12.12,%s-04-01 13:12:01#,schoolfee,1,my-id,'
     947            'p-item,100,%s,unpaid,%s-04-01 14:12:01#,12.12,'
    942948            'r-code,,A111111,created,2012\r\n'
     949            % (curr_year-6, curr_year-6, curr_year-6)
    943950            )
    944951        return
     
    967974            'state,current_session,entry_session,entry_mode,faccode,depcode,certcode\r\n'
    968975
    969             '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,p-item,100,2012,'
    970             'paid,2012-04-01 14:12:01#,12.12,r-code,,A111111,234,123,'
     976            '666,12.12,%s-04-01 13:12:01#,schoolfee,1,my-id,p-item,100,%s,'
     977            'paid,%s-04-01 14:12:01#,12.12,r-code,,A111111,234,123,'
    971978            'Anna,M.,Tester,created,2012,2010,ug_ft,NA,NA,CERT1\r\n'
     979            % (curr_year-6, curr_year-6, curr_year-6)
    972980            )
    973981        return
     
    11541162            'current_level,current_session,current_mode,entry_session,'
    11551163            'reg_number,%s\r\nA111111,234,Anna M. Tester,created,CERT1,NA,NA,0,'
    1156             '200,2012,ug_ft,2010,123,,,,,,14.14,waived,,,,\r\n'
     1164            '200,2012,ug_ft,2010,123,,,,,12.12,14.14,waived,,,,\r\n'
    11571165            % year_range_str in result
    11581166            )
Note: See TracChangeset for help on using the changeset viewer.