From eca83f83ac740f3126f06eaaf3e4cf7e7fafb75a Mon Sep 17 00:00:00 2001 From: Matt Wright Date: Fri, 1 Feb 2013 17:37:03 -0500 Subject: [PATCH] Test configured login form messages better --- tests/functional_tests.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/functional_tests.py b/tests/functional_tests.py index c68625a..f1e070d 100644 --- a/tests/functional_tests.py +++ b/tests/functional_tests.py @@ -35,23 +35,23 @@ class DefaultSecurityTests(SecurityTest): def test_unprovided_username(self): r = self.authenticate("") - self.assertIn("Email not provided", r.data) + self.assertIn(self.get_message('EMAIL_NOT_PROVIDED'), r.data) def test_unprovided_password(self): r = self.authenticate(password="") - self.assertIn("Password not provided", r.data) + self.assertIn(self.get_message('PASSWORD_NOT_PROVIDED'), r.data) def test_invalid_user(self): r = self.authenticate(email="bogus@bogus.com") - self.assertIn("Specified user does not exist", r.data) + self.assertIn(self.get_message('USER_DOES_NOT_EXIST'), r.data) def test_bad_password(self): r = self.authenticate(password="bogus") - self.assertIn("Invalid password", r.data) + self.assertIn(self.get_message('INVALID_PASSWORD'), r.data) def test_inactive_user(self): r = self.authenticate("tiya@lp.com", "password") - self.assertIn("Account is disabled", r.data) + self.assertIn(self.get_message('DISABLED_ACCOUNT'), r.data) def test_logout(self): self.authenticate()