Ignore:
Timestamp:
13 May 2012, 03:49:37 (13 years ago)
Author:
Henrik Bettermann
Message:

Catch error when sending the contact form but no email address is provided.

File:
1 edited

Legend:

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

    r8434 r8436  
    472472        # Managers can contact student
    473473        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     474        self.student.email = None
    474475        self.browser.open(self.student_path)
    475476        self.browser.getLink("Send email").click()
    476477        self.browser.getControl(name="form.subject").value = 'Important subject'
    477478        self.browser.getControl(name="form.body").value = 'Hello!'
     479        self.browser.getControl("Send message now").click()
     480        self.assertTrue('An smtp server error occurred' in self.browser.contents)
     481        self.student.email = 'xx@yy.zz'
    478482        self.browser.getControl("Send message now").click()
    479483        self.assertTrue('Your message has been sent' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.