Changeset 11577


Ignore:
Timestamp:
4 Apr 2014, 06:52:27 (11 years ago)
Author:
Henrik Bettermann
Message:

Webservice test extended to ensure that special payment applicants can pay twice.

Location:
main/waeup.kwarapoly/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/trunk/CHANGES.txt

    r11565 r11577  
    441.2dev (unreleased)
    55===================
     6
     7* Webservice test extended to ensure that special payment applicants
     8  can pay twice.
    69
    710* File input fields brought into shape with Bootstrap 3.
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py

    r11574 r11577  
    3636#   If you enable this, please make sure the external services
    3737#   do exist really and are not bothered by being spammed by a test programme.
    38 EXTERNAL_TESTS = True
     38EXTERNAL_TESTS = False
    3939
    4040def external_test(func):
     
    612612    @external_test
    613613    def test_webservice(self):
    614 
    615         self.browser.open(self.payment_url + '/request_webservice')
     614        self.prepare_special_container()
     615        self.browser.open(self.special_manage_path)
     616        self.browser.getControl("Add online").click()
     617        payment_url = self.browser.url
     618        self.browser.open(payment_url + '/request_webservice')
    616619        self.assertMatches('...Unsuccessful callback...',
    617620                          self.browser.contents)
     
    624627        # Interswitch doesn't provide any interface
    625628        # for testing.
    626         p_id = self.applicant.keys()[0]
    627         payment = self.applicant[p_id]
     629        p_id = self.special_applicant.keys()[0]
     630        payment = self.special_applicant[p_id]
    628631        payment.p_id = 'p3543612043224'
    629         self.browser.open(self.payment_url + '/request_webservice')
     632        self.browser.open(payment_url + '/request_webservice')
    630633        self.assertMatches('...Callback amount does not match...',
    631634                          self.browser.contents)
    632635        payment.amount_auth = payment.r_amount_approved
    633636
    634         self.browser.open(self.payment_url + '/request_webservice')
     637        self.browser.open(payment_url + '/request_webservice')
    635638        self.assertMatches('...Successful payment...',
    636639                          self.browser.contents)
     
    650653        self.assertTrue(
    651654            'zope.mgr - waeup.kwarapoly.interswitch.browser.InterswitchPaymentRequestWebservicePageApplicant'
    652             ' - nd_anything - successful payment: p3543612043224\n'
     655            ' - special_anything - successful payment: p3543612043224\n'
    653656            in logcontent)
    654657        # ... and in payments.log
     
    657660        logcontent = open(logfile).read()
    658661        self.assertTrue(
    659             '"zope.mgr",nd_anything,p3543612043224,application,52100.0,'
     662            '"zope.mgr",special_anything,p3543612043224,transcript_local,52100.0,'
    660663            '00,0.0,0.0,0.0,,,\n'
    661664            in logcontent)
     665        self.assertEqual(self.applicant.state, 'started')
     666        # Special Payment applicant can add new payment
     667        self.browser.open(self.edit_path)
     668        self.assertTrue('Add online payment ticket' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.