Ignore:
Timestamp:
27 Jul 2017, 05:22:28 (8 years ago)
Author:
Henrik Bettermann
Message:

Require uploading of picture before payment.

Location:
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py

    r14716 r14732  
    3030#   do exist really and are not bothered by being spammed by a test programme.
    3131EXTERNAL_TESTS = False
     32
     33SAMPLE_IMAGE = os.path.join(os.path.dirname(__file__), 'test_image.jpg')
    3234
    3335def external_test(func):
     
    217219        self.browser.getControl("Save").click()
    218220        self.browser.getControl("Add online").click()
     221        self.assertMatches('...passport photo before making payment...',
     222                           self.browser.contents)
     223        self.browser.open(self.manage_path)
     224        super(InterswitchTestsApplicants, self).fill_correct_values()
     225        self.browser.getControl(name="form.nationality").value = ['NG']
     226        #self.browser.getControl(name="transition").value = ['start']
     227        image = open(SAMPLE_IMAGE, 'rb')
     228        ctrl = self.browser.getControl(name='form.passport')
     229        file_ctrl = ctrl.mech_control
     230        file_ctrl.add_file(image, filename='myphoto.jpg')
     231        self.browser.getControl("Save").click()
     232        self.browser.getControl("Add online").click()
    219233        self.assertMatches('...ticket created...',
    220234                           self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.