Commit c8f25445 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Avoid the blank space. If exists one blank in the end of url, this step will...

Avoid the blank space. If exists one blank in the end of url, this step will break because the key in self.portal.portal_password._password_request_dict does not have blank spaces
parent 31f4d27c
...@@ -581,6 +581,7 @@ class TestERP5Credential(ERP5TypeTestCase): ...@@ -581,6 +581,7 @@ class TestERP5Credential(ERP5TypeTestCase):
match_obj = re.search(rawstr, line) match_obj = re.search(rawstr, line)
if match_obj is not None: if match_obj is not None:
url = line[line.find('http:'):] url = line[line.find('http:'):]
url = url.strip()
self.assertNotEquals(url, None) self.assertNotEquals(url, None)
response = self.publish(url) response = self.publish(url)
parameters = cgi.parse_qs(urlparse(url)[4]) parameters = cgi.parse_qs(urlparse(url)[4])
...@@ -589,17 +590,14 @@ class TestERP5Credential(ERP5TypeTestCase): ...@@ -589,17 +590,14 @@ class TestERP5Credential(ERP5TypeTestCase):
self.logout() self.logout()
# before changing, check that the user exists with 'secret' password # before changing, check that the user exists with 'secret' password
self._assertUserExists('barney', 'secret') self._assertUserExists('barney', 'secret')
self.portal.portal_password.changeUserPassword(user_login="barney", self.portal.portal_password.changeUserPassword(user_login="barney",
password="new_password", password="new_password",
password_confirmation="new_password", password_confirmation="new_password",
password_key=key) password_key=key)
transaction.commit() transaction.commit()
self.tic() self.tic()
# reset the cache # reset the cache
self.portal.portal_caches.clearAllCache() self.portal.portal_caches.clearAllCache()
# check we cannot login anymore with the previous password 'secret' # check we cannot login anymore with the previous password 'secret'
self._assertUserDoesNotExists('barney', 'secret') self._assertUserDoesNotExists('barney', 'secret')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment