Ignore:
Timestamp:
15 May 2014, 11:00:47 (10 years ago)
Author:
Henrik Bettermann
Message:

Add webservice regression test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/tests.py

    r11652 r11655  
    190190        super(EtranzactTestsApplicants, self).fill_correct_values()
    191191        self.browser.getControl(name="transition").value = ['start']
     192        self.browser.getControl(name="form.nationality").value = ['NG']
     193        self.browser.getControl(name="form.programme_type").value = ['direct']
    192194        self.browser.getControl("Save").click()
    193195        self.browser.getControl("Add online").click()
     
    196198            in self.browser.contents)
    197199        configuration = SessionConfiguration()
    198         configuration.academic_session = 2009
     200        configuration.academic_session = 2012
    199201        configuration.application_fee = 1000.0
    200202        self.app['configuration'].addSessionConfiguration(configuration)
     
    209211            self.browser.contents)
    210212        self.payment_url = self.browser.url
     213        self.browser.open(self.manage_path)
     214        ctrl = self.browser.getControl(name='val_id')
     215        value = ctrl.options[0]
     216        self.p_id = value
     217
     218    def test_webservice(self):
     219        self.browser.open(
     220            'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=APPLICATION-FEE'
     221            % self.p_id)
     222        self.assertEqual(self.browser.contents,
     223            'PayeeName=John Anthony Tester~'
     224            'Faculty=N/A~'
     225            'Department=N/A~'
     226            'Level=N/A~'
     227            'ProgrammeType=This is the app2012 container~'
     228            'StudyType=N/A~'
     229            'Session=2012/2013~'
     230            'PayeeID=%s~'
     231            'Amount=1000.0~'
     232            'FeeStatus=unpaid~'
     233            'Semester=N/A~'
     234            'PaymentType=Application Fee~'
     235            'MatricNumber=%s~'
     236            'Email=xx@yy.zz~'
     237            'PhoneNumber=None' % (self.p_id,self.applicant.applicant_id))
    211238
    212239    @external_test
Note: See TracChangeset for help on using the changeset viewer.