Ignore:
Timestamp:
12 Aug 2011, 15:47:22 (13 years ago)
Author:
uli
Message:

Reenable test for image in erraneous applicant forms.

File:
1 edited

Legend:

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

    r6595 r6599  
    652652        self.assertEqual(file_len, PH_LEN)
    653653
    654     # XXX: Make this test work again
    655     def DISABLEDtest_uploaded_image_browsable_w_errors(self):
     654    def test_uploaded_image_browsable_w_errors(self):
    656655        # We can upload a different image and browse it after submit,
    657656        # even if there are still errors in the form
    658657        self.login()
    659658        # Create a pseudo image file and select it to be uploaded in form
    660         pseudo_image = StringIO('I pretend to be a graphics file')
     659        photo_content = 'I pretend to be a graphics file'
     660        pseudo_image = StringIO(photo_content)
    661661        ctrl = self.browser.getControl(name='form.passport')
    662662        file_ctrl = ctrl.mech_control
     
    670670        self.assertEqual(
    671671            self.browser.headers['content-type'], 'image/jpeg')
    672         self.assertEqual(len(self.browser.contents), PH_LEN)
     672        self.assertEqual(self.browser.contents, photo_content)
    673673
    674674    def test_uploaded_image_stored_in_imagestorage_w_errors(self):
Note: See TracChangeset for help on using the changeset viewer.