Changeset 5890 for main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests
- Timestamp:
- 29 Mar 2011, 10:19:18 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
r5889 r5890 36 36 37 37 class LoginTest(FunctionalTestCase): 38 # Here we check login functionality.38 # Here we check login view of applicants containers. 39 39 40 40 layer = FunctionalLayer … … 68 68 return 69 69 70 def test_anonymous_invalid_creds(self): 71 # Anonymous users giving invalid credentials stay at the page 72 path = 'http://localhost/app/applicants/testapplicants/login' 73 self.browser.open(path) 74 # We do not give credentials but send the form as-is 75 submit = self.browser.getControl(name='SUBMIT') 76 submit.click() 77 # We are still at the same page... 78 self.assertEqual( 79 self.browser.url, 80 'http://localhost/app/applicants/testapplicants/login' 81 ) 82 self.assertEqual(self.browser.headers['Status'], '200 Ok') 83 return 84 85 def test_anonymous_invalid_creds_warning(self): 86 # Entering wrong credentials will yield a warning 87 path = 'http://localhost/app/applicants/testapplicants/login' 88 self.browser.open(path) 89 # We do not give credentials but send the form as-is 90 submit = self.browser.getControl(name='SUBMIT') 91 submit.click() 92 self.assertTrue( 93 'Entered credentials are invalid' in self.browser.contents) 94 return 95 70 96 def suite(): 71 97 suite = unittest.TestSuite()
Note: See TracChangeset for help on using the changeset viewer.