Ignore:
Timestamp:
2 Nov 2020, 18:08:34 (4 years ago)
Author:
Henrik Bettermann
Message:

Add page with current session payments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py

    r16292 r16296  
    1919import shutil
    2020import tempfile
     21from time import time
     22from datetime import datetime, timedelta
    2123from StringIO import StringIO
    2224from hurry.workflow.interfaces import IWorkflowState, IWorkflowInfo
     
    151153
    152154    def test_student_personal_slip(self):
     155        payment1 = createObject(u'waeup.StudentOnlinePayment')
     156        timestamp = ("%d" % int(time()*10000))[1:]
     157        payment1.p_id = "LSCNEW-2-4153206270" # the longest possible p_id
     158        payment1.p_category = 'schoolfee'
     159        payment1.p_item = u'My School Fee'
     160        payment1.p_session = 2015
     161        payment1.p_level = 100
     162        payment1.p_current = True
     163        payment1.amount_auth = 23456.9
     164        payment1.approve()
     165        payment2 = createObject(u'waeup.StudentOnlinePayment')
     166        timestamp = ("%d" % int(time()*10000))[1:]
     167        payment2.p_id = "p%s" % timestamp
     168        payment2.p_category = 'clearance'
     169        payment2.p_item = u'My Clearance Fee'
     170        payment2.p_session = 2015
     171        payment2.p_level = 100
     172        payment2.p_current = True
     173        payment2.amount_auth = 5678.6
     174        payment2.approve()
     175        self.student['payments'][payment1.p_id] = payment1
     176        self.student['payments'][payment2.p_id] = payment2
    153177        IWorkflowState(self.student).setState('school fee paid')
    154178        self.browser.open(self.login_path)
Note: See TracChangeset for help on using the changeset viewer.