Ignore:
Timestamp:
14 Nov 2011, 10:04:51 (13 years ago)
Author:
Henrik Bettermann
Message:

Fix test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r7108 r7109  
    372372        self.assertFalse(
    373373            '<a target="image" href="birth_certificate.jpg">' in self.browser.contents)
    374         # ... but the Upload submit button
    375         import pdb; pdb.set_trace()
     374        # ... but the Upload submit button does
     375        pseudo_image = StringIO('I pretend to be a graphics file')
    376376        ctrl = self.browser.getControl(name='birth_certificate')
    377377        file_ctrl = ctrl.mech_control
    378378        file_ctrl.add_file(pseudo_image, filename='myphoto.jpg')
    379         self.browser.getControl("Upload").click() # submit form
     379        self.browser.getControl("Upload").click()
    380380        # There is a correct <img> link included
    381381        self.assertTrue(
     
    394394        file_ctrl = ctrl.mech_control
    395395        file_ctrl.add_file(pseudo_image, filename='myphoto.jpg')
    396         self.browser.getControl("Save").click() # submit form
     396        self.browser.getControl("Upload").click()
    397397        self.assertTrue(
    398398            'Uploaded file is too big' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.