changeset 5180:ab01e0a5d240

tests: update password reset form test to employ only a simple @ check
author Andrew Shadura <andrew@shadura.me>
date Sun, 07 Jun 2015 13:13:12 +0200
parents 6e1bd83552d8
children e3840a1ec58c
files kallithea/tests/functional/test_login.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/functional/test_login.py	Wed Apr 22 09:55:46 2015 +1000
+++ b/kallithea/tests/functional/test_login.py	Sun Jun 07 13:13:12 2015 +0200
@@ -293,15 +293,13 @@
         self.assertEqual(ret.admin, False)
 
     def test_forgot_password_wrong_mail(self):
-        bad_email = 'username@wrongmail.org'
+        bad_email = 'username%wrongmail.org'
         response = self.app.post(
                         url(controller='login', action='password_reset'),
                             {'email': bad_email, }
         )
 
-        msg = validators.ValidSystemEmail()._messages['non_existing_email']
-        msg = h.html_escape(msg % {'email': bad_email})
-        response.mustcontain()
+        response.mustcontain('An email address must contain a single @')
 
     def test_forgot_password(self):
         response = self.app.get(url(controller='login',