Changeset 14685 for main


Ignore:
Timestamp:
15 May 2017, 11:28:32 (7 years ago)
Author:
Henrik Bettermann
Message:

Log ticket creation of previous session payments too.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r14684 r14685  
    18431843        self.context[payment.p_id] = payment
    18441844        self.flash(_('Payment ticket created.'))
     1845        self.context.writeLogMessage(self,'added: %s' % payment.p_id)
    18451846        self.redirect(self.url(self.context))
    18461847        return
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r14684 r14685  
    11981198        self.browser.open(self.payments_path)
    11991199
    1200         # Managers can add previous school fee payment tickets in any state.
     1200        # Managers can add balance school fee payment tickets in any state.
    12011201        IWorkflowState(self.student).setState('courses registered')
    12021202        self.browser.open(self.payments_path)
    12031203        self.browser.getLink("Add balance payment ticket").click()
    12041204
    1205         # Previous session payment form is provided
     1205        # Palance payment form is provided
    12061206        self.assertEqual(self.student.current_session, 2004)
    12071207        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     
    29232923        self.assertMatches('...This is not a previous session...',
    29242924                           self.browser.contents)
     2925
    29252926        # Students can pay current session school fee.
    29262927        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     
    29362937                           self.browser.contents)
    29372938        self.assertEqual(self.student['payments'][value].amount_auth, 20000.0)
     2939
     2940        # Ticket creation is logged.
     2941        logfile = os.path.join(
     2942            self.app['datacenter'].storage, 'logs', 'students.log')
     2943        logcontent = open(logfile).read()
     2944        self.assertTrue(
     2945            'K1000000 - students.browser.PreviousPaymentAddFormPage - '
     2946            'K1000000 - added: %s' % value
     2947            in logcontent)
    29382948
    29392949        # Payment session is properly set
Note: See TracChangeset for help on using the changeset viewer.