Ignore:
Timestamp:
1 Dec 2012, 10:05:53 (12 years ago)
Author:
Henrik Bettermann
Message:

Define PAYMENT_CATEGORIES in CustomKofaUtils?.

Fix tests.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/payments.py

    r8753 r9755  
    2727from waeup.kofa.utils.helpers import attrs_to_fields
    2828from waeup.aaue.students.interfaces import ICustomStudentOnlinePayment
    29 from waeup.aaue.payments.interfaces import payment_categories
    3029
    3130class CustomStudentOnlinePayment(StudentOnlinePayment):
     
    4847        return self.__parent__.__parent__
    4948
    50     @property
    51     def category(self):
    52         return payment_categories.getTermByToken(self.p_category).title
    53 
    5449CustomStudentOnlinePayment = attrs_to_fields(CustomStudentOnlinePayment)
    5550
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r9527 r9755  
    9292        self.browser.open(self.payments_path)
    9393        self.browser.getLink("Add current session payment ticket").click()
     94        self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
    9495        self.browser.getControl("Create ticket").click()
    9596        self.assertMatches('...Wrong state...',
     
    101102                           self.browser.contents)
    102103        self.app['configuration']['2004'].school_fee_base = 6666.0
     104        self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
    103105        self.browser.getControl("Create ticket").click()
    104106        self.assertMatches('...ticket created...',
     
    117119        ticket.p_state = 'paid'
    118120        self.browser.open(self.payments_path + '/addop')
     121        self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
    119122        self.browser.getControl("Create ticket").click()
    120123        self.assertMatches('...This type of payment has already been made...',
Note: See TracChangeset for help on using the changeset viewer.