Ignore:
Timestamp:
23 Mar 2012, 08:49:56 (13 years ago)
Author:
Henrik Bettermann
Message:

Add EtranzactEnterPinPage?.

Location:
main/waeup.custom/trunk/src/waeup/custom/etranzact
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.custom/trunk/src/waeup/custom/etranzact/browser.py

    r7929 r7976  
    3535    icon = 'actionicon_call.png'
    3636    text = _('Query eTranzact History')
    37     target = 'enter_pin'
     37    target = 'enterpin'
    3838
    3939class EtranzactEnterPinPage(KofaPage):
     40    """
     41    """
    4042    grok.context(IStudentOnlinePayment)
    41     grok.name('enter_pin')
    42     grok.template('enter_pin')
     43    grok.name('enterpin')
     44    grok.template('enterpin')
    4345    grok.require('waeup.payStudent')
    4446
     47    buttonname = _('Submit to eTranzact')
     48    label = _('Requery eTranzact History')
     49    action = 'query_history'
    4550
    4651class EtranzactQueryHistoryPage(UtilityView, grok.View):
  • main/waeup.custom/trunk/src/waeup/custom/etranzact/tests.py

    r7970 r7976  
    3737
    3838class EtranzactTests(StudentsFullSetup):
    39     """Tests foreTranzact payment gateway.
     39    """Tests for the eTranzact payment gateway.
    4040    """
    4141
     
    4444    CONFIRMATION_NO = '500856521315472785095'
    4545
    46     def test_dummy(self):
    47         return
    48 
    49     @external_test
    50     def test_etranzact_query_history(self):
    51 
     46    def setUp(self):
     47        super(EtranzactTests, self).setUp()
    5248        # Managers can add online payment tickets
    5349        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     
    6359        self.assertMatches('...Amount Authorized...',
    6460                           self.browser.contents)
    65         payment_url = self.browser.url
    66        
    67         self.browser.open(payment_url + '/query_history?confirmation_number=%s'
     61        self.payment_url = self.browser.url
     62
     63    def test_enterpin(self):
     64        self.browser.getLink("Query eTranzact History").click()
     65        self.assertMatches(
     66            '...Confirmation Number (PIN):...',
     67            self.browser.contents)
     68
     69    @external_test
     70    def test_etranzact_query_history(self):
     71
     72        self.browser.open(self.payment_url + '/query_history?confirmation_number=%s'
    6873            % self.CONFIRMATION_NO)
    6974        self.assertMatches('...Wrong amount...',
     
    7277        self.student['payments'][value].amount_auth = self.student[
    7378            'payments'][value].r_amount_approved
    74         self.browser.open(payment_url + '/query_history?confirmation_number=%s'
     79        self.browser.open(self.payment_url + '/query_history?confirmation_number=%s'
    7580            % self.CONFIRMATION_NO)
    7681        self.assertMatches('...Wrong transaction id...',
Note: See TracChangeset for help on using the changeset viewer.