Ignore:
Timestamp:
26 Oct 2012, 21:49:15 (12 years ago)
Author:
Henrik Bettermann
Message:

Log payment category.

Adjust to previous revisions.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py

    r9408 r9436  
    120120    payment.payment_date = datetime.utcnow()
    121121    msg = _('Successful callback received')
    122     log = 'valid callback for payment %s: %s' % (payment.p_id, sr)
     122    log = 'valid callback for %s payment %s: %s' % (
     123        payment.p_category, payment.p_id, sr)
    123124    return True, msg, log
    124125
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py

    r9392 r9436  
    7979        self.browser.open(self.payments_path + '/addop')
    8080        self.browser.getControl("Create ticket").click()
     81        self.assertMatches('...ticket created...',
     82                           self.browser.contents)
     83        ctrl = self.browser.getControl(name='val_id')
     84        value = ctrl.options[0]
     85        self.browser.getLink(value).click()
     86        self.assertMatches('...Amount Authorized...',
     87                           self.browser.contents)
     88        self.assertMatches(
     89            '...<span>37100.0</span>...',
     90            self.browser.contents)
     91        self.payment_url = self.browser.url
    8192
    8293
     
    93104
    94105    def test_interswitch_form(self):
    95 
    96         # In the setup method we created the ticket
    97         self.assertMatches('...ticket created...',
    98                            self.browser.contents)
    99         ctrl = self.browser.getControl(name='val_id')
    100         value = ctrl.options[0]
    101         self.browser.getLink(value).click()
    102         self.assertMatches('...Amount Authorized...',
    103                            self.browser.contents)
    104         self.assertMatches(
    105             '...<span>37100.0</span>...',
    106             self.browser.contents)
    107         self.payment_url = self.browser.url
    108 
    109106        # Manager can access InterswitchForm
    110107        self.browser.getLink("CollegePAY", index=0).click()
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py

    r9393 r9436  
    2727from waeup.kofa.students.tests.test_browser import (
    2828    StudentsFullSetup, SAMPLE_IMAGE)
     29from waeup.kofa.students.accommodation import BedTicket
    2930from waeup.kofa.testing import FunctionalTestCase
    3031from waeup.kofa.interfaces import (
     
    7273
    7374    layer = FunctionalLayer
     75
     76    def setUp(self):
     77        super(StudentUITests, self).setUp()
     78
     79        bedticket = BedTicket()
     80        bedticket.booking_session = 2004
     81        bedticket.bed_type = u'any bed type'
     82        bedticket.bed = self.app['hostels']['hall-1']['hall-1_A_101_A']
     83        bedticket.bed_coordinates = u'My bed coordinates'
     84        self.student['accommodation'].addBedTicket(bedticket)
    7485
    7586    def test_manage_payments(self):
     
    277288
    278289    def test_student_accommodation(self):
     290        del self.student['accommodation']['2004']
    279291        # Login
    280292        self.browser.open(self.login_path)
Note: See TracChangeset for help on using the changeset viewer.