Changeset 5985 for main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests
- Timestamp:
- 26 Apr 2011, 11:21:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
r5912 r5985 150 150 151 151 def test_anonymous_valid_login(self): 152 # If we enter valid credentials, we get to the applicants form 152 153 self.browser.open(self.login_path) 153 154 # Enter some value we can look for after submit … … 159 160 # We should be redirected to applicants form. 160 161 self.assertTrue(self.browser.url != self.login_path) 162 return 163 164 def test_anonymous_invalid_login(self): 165 # If we enter wrong credentials we won't get far 166 self.browser.open(self.login_path) 167 # Enter some value we can look for after submit 168 ac_series = self.browser.getControl(name="form.ac_series") 169 ac_series.value = 'illegal series' 170 ac_number = self.browser.getControl(name="form.ac_number") 171 ac_number.value = 'invalid number' 172 self.browser.getControl(name="SUBMIT").click() 173 # We get a warning message 174 self.assertTrue( 175 'Entered credentials are invalid' in self.browser.contents) 176 # We stay at the login page (no redirect) 177 self.assertTrue(self.browser.url == self.login_path) 161 178 return 162 179
Note: See TracChangeset for help on using the changeset viewer.