From a2999617b7c010e8c48bdee83128c09a69a64bf3 Mon Sep 17 00:00:00 2001 From: Fabien Morin <fabien@nexedi.com> Date: Tue, 24 Aug 2010 08:22:48 +0000 Subject: [PATCH] fix tests. Now the request is found, so instead of just returning a simple message, user is redirected to a page. So check the portal_status_message value in the url instead of the returned message git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37967 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testPasswordTool.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/product/ERP5/tests/testPasswordTool.py b/product/ERP5/tests/testPasswordTool.py index 7835017807..96ff8b257c 100644 --- a/product/ERP5/tests/testPasswordTool.py +++ b/product/ERP5/tests/testPasswordTool.py @@ -448,8 +448,8 @@ class TestPasswordTool(ERP5TypeTestCase): self.tic() self.logout() ret = self.portal.portal_password.mailPasswordResetRequest(user_login='user') - self.assertEquals("User user does not have an email address, please contact" - " site administrator directly", str(ret)) + self.assertTrue("portal_status_message=User+user+does+not+have+an+email+"\ + "address%2C+please+contact+site+administrator+directly" in str(ret)) def test_acquired_email_on_person(self): organisation = self.portal.organisation_module.newContent( @@ -467,8 +467,8 @@ class TestPasswordTool(ERP5TypeTestCase): self._assertUserExists('user', 'password') self.logout() ret = self.portal.portal_password.mailPasswordResetRequest(user_login='user') - self.assertEquals("User user does not have an email address, please contact" - " site administrator directly", str(ret)) + self.assertTrue("portal_status_message=User+user+does+not+have+an+email+"\ + "address%2C+please+contact+site+administrator+directly" in str(ret)) class TestPasswordToolWithCRM(TestPasswordTool): -- 2.30.9