Changeset 9507 for main/waeup.kofa/trunk


Ignore:
Timestamp:
2 Nov 2012, 10:46:22 (12 years ago)
Author:
Henrik Bettermann
Message:

Add webservices module.

Add more hostel block letters.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/vocabularies.py

    r9414 r9507  
    6767    (_('Block P'),'P'),
    6868    (_('Block Q'),'Q'),
     69    (_('Block R'),'R'),
     70    (_('Block S'),'S'),
     71    (_('Block T'),'T'),
     72    (_('Block U'),'U'),
     73    (_('Block V'),'V'),
     74    (_('Block W'),'W'),
    6975    )
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r9503 r9507  
    24802480        self.browser.open(self.student_path + '/studycourse/200/ctadd')
    24812481        self.assertTrue('The requested form is locked' in self.browser.contents)
     2482
     2483
     2484class PublicPagesTests(StudentsFullSetup):
     2485    # Tests for swebservices
     2486
     2487    layer = FunctionalLayer
     2488
     2489    def test_paymentrequest(self):
     2490        payment = createObject('waeup.StudentOnlinePayment')
     2491        payment.p_category = u'schoolfee'
     2492        payment.p_session = self.student.current_session
     2493        payment.p_item = u'My Certificate'
     2494        payment.p_id = u'anyid'
     2495        self.student['payments']['anykey'] = payment
     2496        # Request information about unpaid payment ticket
     2497        self.browser.open('http://localhost/app/paymentrequest?P_ID=anyid')
     2498        self.assertEqual(self.browser.contents, '-1')
     2499        # Request information about paid payment ticket
     2500        payment.p_state = u'paid'
     2501        notify(grok.ObjectModifiedEvent(payment))
     2502        self.browser.open('http://localhost/app/paymentrequest?P_ID=anyid')
     2503        self.assertEqual(self.browser.contents,
     2504            'FULL_NAME=Anna Tester&FACULTY=fac1&DEPARTMENT=dep1'
     2505            '&PAYMENT_ITEM=My Certificate&PAYMENT_CATEGORY=School Fee'
     2506            '&ACADEMIC_SESSION=2004/2005&MATRIC_NUMBER=234&FEE_AMOUNT=0.0')
     2507        self.browser.open('http://localhost/app/paymentrequest?NONSENSE=nonsense')
     2508        self.assertEqual(self.browser.contents, '-1')
     2509        self.browser.open('http://localhost/app/paymentrequest?P_ID=nonsense')
     2510        self.assertEqual(self.browser.contents, '-1')
Note: See TracChangeset for help on using the changeset viewer.