From e19b99d3b04878c145d0f2c11b8732502fd10da7 Mon Sep 17 00:00:00 2001 From: mauritsvanrees Date: Mon, 19 Sep 2022 11:15:48 +0200 Subject: [PATCH] [fc] Repository: plone.app.relationfield Branch: refs/heads/master Date: 2022-09-18T19:54:16-07:00 Author: David Glick (davisagli) Commit: https://github.com/plone/plone.app.relationfield/commit/c963da78ce2fb3a3c867b7d6f342c79811e33ed1 Use longer password in tests Files changed: M plone/app/relationfield/schemaeditor.txt M plone/app/relationfield/schemaeditor_contenttree.txt Repository: plone.app.relationfield Branch: refs/heads/master Date: 2022-09-18T19:54:49-07:00 Author: David Glick (davisagli) Commit: https://github.com/plone/plone.app.relationfield/commit/b8b52fe6febb9651c426c09da71d16e46510bf9f changelog Files changed: A news/34.bugfix Repository: plone.app.relationfield Branch: refs/heads/master Date: 2022-09-19T11:15:48+02:00 Author: Maurits van Rees (mauritsvanrees) Commit: https://github.com/plone/plone.app.relationfield/commit/c07a3732c732364e3f1f54d1f717a0c41e24c73b Merge pull request #34 from plone/pw-length Use longer password in tests Files changed: A news/34.bugfix M plone/app/relationfield/schemaeditor.txt M plone/app/relationfield/schemaeditor_contenttree.txt --- last_commit.txt | 60 ++++++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 38 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index 1ceeff67e0..e5e68ee40d 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,66 +1,50 @@ -Repository: plone.app.users +Repository: plone.app.relationfield Branch: refs/heads/master -Date: 2022-09-18T19:50:41-07:00 +Date: 2022-09-18T19:54:16-07:00 Author: David Glick (davisagli) -Commit: https://github.com/plone/plone.app.users/commit/c36592c5baf3725171fcf164aff6938b2b00413c +Commit: https://github.com/plone/plone.app.relationfield/commit/c963da78ce2fb3a3c867b7d6f342c79811e33ed1 -Use longer passwords in tests +Use longer password in tests Files changed: -M plone/app/users/tests/base.py -M plone/app/users/tests/duplicate_email.rst -M plone/app/users/tests/email_login.rst -M plone/app/users/tests/flexible_user_registration.rst -M plone/app/users/tests/member_search.rst -M plone/app/users/tests/password.rst -M plone/app/users/tests/personal_preferences_prefs_user_details.rst -M plone/app/users/tests/registration_forms.rst -M plone/app/users/tests/test_new_user.py -M plone/app/users/tests/userdata_prefs_user_details.rst +M plone/app/relationfield/schemaeditor.txt +M plone/app/relationfield/schemaeditor_contenttree.txt -b'diff --git a/plone/app/users/tests/base.py b/plone/app/users/tests/base.py\nindex 072c322..c86e34d 100644\n--- a/plone/app/users/tests/base.py\n+++ b/plone/app/users/tests/base.py\n@@ -10,6 +10,7 @@\n from OFS.Cache import Cacheable\n from plone.app.testing import setRoles\n from plone.app.testing import login\n+from plone.app.testing import TEST_USER_PASSWORD\n from plone.app.users.testing import PLONE_APP_USERS_FUNCTIONAL_TESTING\n from plone.registry.interfaces import IRegistry\n from plone.testing.z2 import Browser\n@@ -36,7 +37,7 @@ class BaseTestCase(unittest.TestCase):\n def setUp(self):\n self.portal = self.layer[\'portal\']\n self.request = self.layer[\'request\']\n- self.portal.acl_users._doAddUser(\'admin\', \'secret\', [\'Manager\'], [])\n+ self.portal.acl_users._doAddUser(\'admin\', TEST_USER_PASSWORD, [\'Manager\'], [])\n set_mock_mailhost(self.portal)\n self.membership = self.portal.portal_membership\n self.security_settings = get_security_settings()\ndiff --git a/plone/app/users/tests/duplicate_email.rst b/plone/app/users/tests/duplicate_email.rst\nindex 8278c36..2f29718 100644\n--- a/plone/app/users/tests/duplicate_email.rst\n+++ b/plone/app/users/tests/duplicate_email.rst\n@@ -5,6 +5,7 @@ When email address is used as login name, duplicates are not allowed.\n \n Use email addresses as login name:\n \n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> from plone.app.users.tests.base import get_security_settings\n >>> security_settings = get_security_settings()\n >>> security_settings.use_email_as_login = True\n@@ -13,13 +14,13 @@ Create a new user one:\n \n >>> portal = layer[\'portal\']\n >>> mtool = portal.portal_membership\n- >>> mtool.addMember(\'userone@example.com\', \'secret\', [], [])\n+ >>> mtool.addMember(\'userone@example.com\', TEST_USER_PASSWORD, [], [])\n >>> userone = mtool.getMemberById(\'userone@example.com\')\n >>> userone.setMemberProperties({\'email\':\'userone@example.com\'})\n \n Create a new user two:\n \n- >>> mtool.addMember(\'usertwo@example.com\', \'secret\', [], [])\n+ >>> mtool.addMember(\'usertwo@example.com\', TEST_USER_PASSWORD, [], [])\n >>> usertwo = mtool.getMemberById(\'usertwo@example.com\')\n >>> usertwo.setMemberProperties({\'email\':\'usertwo@example.com\'})\n >>> from transaction import commit\n@@ -33,7 +34,7 @@ Login as user two:\n >>> browser.getLink(\'Log in\').click()\n \n >>> browser.getControl(name=\'__ac_name\').value = \'usertwo@example.com\'\n- >>> browser.getControl(name=\'__ac_password\').value = \'secret\'\n+ >>> browser.getControl(name=\'__ac_password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> \'Login failed\' in browser.contents\n False\ndiff --git a/plone/app/users/tests/email_login.rst b/plone/app/users/tests/email_login.rst\nindex 907fd7a..70d314d 100644\n--- a/plone/app/users/tests/email_login.rst\n+++ b/plone/app/users/tests/email_login.rst\n@@ -7,6 +7,7 @@ Set up\n \n >>> from plone.app.testing import SITE_OWNER_NAME\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> from plone.testing.z2 import Browser\n \n >>> app = layer[\'app\']\n@@ -61,8 +62,8 @@ Fill out the form, using an odd email address that should not give problems.\n \n >>> browser.getControl(\'Full Name\').value = \'Bob Jones\'\n >>> browser.getControl(\'Email\').value = \'bob-jones+test@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> \'Failed to create your account\' in browser.contents\n False\n@@ -118,8 +119,8 @@ Use the same full name as before, to test that we get a different user id.\n \n >>> browser.getControl(\'Full Name\').value = \'Bob Jones\'\n >>> browser.getControl(\'Email\').value = \'bob-jones+test2@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> \'@@usergroup-userprefs\' in browser.url\n True\ndiff --git a/plone/app/users/tests/flexible_user_registration.rst b/plone/app/users/tests/flexible_user_registration.rst\nindex e019cdd..f7797ec 100644\n--- a/plone/app/users/tests/flexible_user_registration.rst\n+++ b/plone/app/users/tests/flexible_user_registration.rst\n@@ -3,6 +3,7 @@ Testing the flexible user registration\n ======================================\n \n >>> from plone.testing.z2 import Browser\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> import transaction\n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\n@@ -27,7 +28,7 @@ First things first... turn on self-registration so that we can see the\n depend on a mail server properly set-up:\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@security-controlpanel\')\n >>> browser.getControl(\'Enable self-registration\').selected = True\n@@ -145,7 +146,7 @@ Log in again\n \n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n \n Add portrait to registration form\ndiff --git a/plone/app/users/tests/member_search.rst b/plone/app/users/tests/member_search.rst\nindex 8c86630..eeb4743 100644\n--- a/plone/app/users/tests/member_search.rst\n+++ b/plone/app/users/tests/member_search.rst\n@@ -42,8 +42,8 @@ Fill out the form.\n >>> browser.getControl(\'Full Name\').value = \'Bob Jones\'\n >>> browser.getControl(\'User Name\').value = \'bob-jones\'\n >>> browser.getControl(\'Email\').value = \'bob-jones+test2@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n \'...User added...bob-jones...\'\ndiff --git a/plone/app/users/tests/password.rst b/plone/app/users/tests/password.rst\nindex 4b59f17..510983e 100644\n--- a/plone/app/users/tests/password.rst\n+++ b/plone/app/users/tests/password.rst\n@@ -54,7 +54,7 @@ Let\'s try to change the password with a new one containing non-ascii chars:\n \n >>> browser.getControl(name=\'_authenticator\', index=0)\n \n- >>> browser.getControl(\'Current password\').value = \'secret\'\n+ >>> browser.getControl(\'Current password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'New password\').value = \'super-secr\xc3\xa9t\'\n >>> browser.getControl(\'Confirm password\').value = \'super-secr\xc3\xa9t\'\n >>> browser.getControl(\'Change Password\').click()\ndiff --git a/plone/app/users/tests/personal_preferences_prefs_user_details.rst b/plone/app/users/tests/personal_preferences_prefs_user_details.rst\nindex 6514165..4f3ef3f 100644\n--- a/plone/app/users/tests/personal_preferences_prefs_user_details.rst\n+++ b/plone/app/users/tests/personal_preferences_prefs_user_details.rst\n@@ -5,6 +5,7 @@ Set up\n ======\n \n >>> from plone.app.testing import TEST_USER_NAME\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> from plone.testing.z2 import Browser\n \n >>> app = layer[\'app\']\n@@ -27,7 +28,7 @@ So let\'s login as Plone admin:\n >>> browser.open(\'http://nohost/plone/\')\n >>> browser.getLink(\'Log in\').click()\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n \n Let\'s see if we can navigate to the user information form in Users\ndiff --git a/plone/app/users/tests/registration_forms.rst b/plone/app/users/tests/registration_forms.rst\nindex 5b0eae5..151c28d 100644\n--- a/plone/app/users/tests/registration_forms.rst\n+++ b/plone/app/users/tests/registration_forms.rst\n@@ -4,6 +4,7 @@ Testing the flexible user registration\n >>> portal = layer[\'portal\']\n >>> from plone.app.testing import setRoles\n >>> from plone.app.testing import TEST_USER_ID\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> setRoles(portal, TEST_USER_ID, [\'Manager\'])\n >>> portal.invokeFactory(\'Folder\', \'news\')\n \'news\'\n@@ -22,7 +23,7 @@ Testing the flexible user registration\n Enable self-registration\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@security-controlpanel\')\n >>> browser.getControl(\'Enable self-registration\').selected = True\n@@ -98,7 +99,7 @@ Testing the flexible user registration\n Ensure that the user has, in fact, been added.\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@usergroup-userprefs\')\n >>> \'user1\' in browser.contents\n@@ -108,7 +109,7 @@ Testing the flexible user registration\n >>> unsetMailHost()\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@security-controlpanel\')\n >>> browser.getControl(\'Let users select their own passwords\').selected = True\n@@ -132,8 +133,8 @@ Testing the flexible user registration\n Fill out the form.\n >>> browser.getControl(\'User Name\').value = \'user2\'\n >>> browser.getControl(\'Email\').value = \'user2@example.com\'\n- >>> browser.getControl(\'Password\').value = \'bigf\xc3\xafsh\'\n- >>> browser.getControl(\'Confirm password\').value = \'bigf\xc3\xafsh\'\n+ >>> browser.getControl(\'Password\').value = \'biggerf\xc3\xafsh\'\n+ >>> browser.getControl(\'Confirm password\').value = \'biggerf\xc3\xafsh\'\n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n \'...Welcome!...You have been registered...\'\n@@ -141,7 +142,7 @@ Testing the flexible user registration\n Ensure that the user has, in fact, been added.\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@usergroup-userprefs\')\n >>> \'user2\' in browser.contents\n@@ -155,8 +156,8 @@ Testing the flexible user registration\n >>> browser.open(\'http://nohost/plone/@@register?came_from=http://nohost/plone/news\')\n >>> browser.getControl(\'User Name\').value = \'user5\'\n >>> browser.getControl(\'Email\').value = \'user5@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> browser.url\n \'http://nohost/plone/news\'\n@@ -206,8 +207,8 @@ Testing the flexible user registration\n >>> browser.open(\'http://nohost/plone/@@new-user\')\n >>> browser.getControl(\'User Name\').value = \'user2a\'\n >>> browser.getControl(\'Email\').value = \'user2a-AT-example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n \'...There were errors...Invalid email address...\'\n@@ -216,8 +217,8 @@ Testing the flexible user registration\n >>> browser.open(\'http://nohost/plone/@@new-user\')\n >>> browser.getControl(\'User Name\').value = \'user3\'\n >>> browser.getControl(\'Email\').value = \'user3@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> \'@@usergroup-userprefs\' in browser.url\n True\n@@ -300,7 +301,7 @@ Testing the flexible user registration\n >>> unsetMailHost()\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@security-controlpanel\')\n >>> browser.getControl(\'Let users select their own passwords\').selected = True\n@@ -327,7 +328,7 @@ Testing the flexible user registration\n ...Enter your new password. Must not be dead...\n \n And we no longer see the default message\n- >>> \'Minimum 5 characters.\' not in browser.contents\n+ >>> \'Minimum 8 characters.\' not in browser.contents\n True\n \n \n@@ -346,8 +347,8 @@ Testing the flexible user registration\n \n Now try a valid password\n \n- >>> browser.getControl(\'Password\').value = \'fish\'\n- >>> browser.getControl(\'Confirm password\').value = \'fish\'\n+ >>> browser.getControl(\'Password\').value = \'tuna fish\'\n+ >>> browser.getControl(\'Confirm password\').value = \'tuna fish\'\n \n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n@@ -356,7 +357,7 @@ Testing the flexible user registration\n Ensure that the user has, in fact, been added.\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@usergroup-userprefs\')\n >>> \'user5pas\' in browser.contents\n@@ -392,13 +393,13 @@ Testing the flexible user registration\n >>> browser.getControl(\'Register\').click()\n \n >>> print(browser.contents)\n- <...
...Must not be dead. Your password must contain at least 5 characters....
...\n+ <...
...Must not be dead. Your password must contain at least 8 characters....
...\n \n Now try a valid password -- and we\'ll make sure non-ASCII characters are\n handled too.\n \n- >>> browser.getControl(\'Password\').value = \'bigf\xc3\xafsh\'\n- >>> browser.getControl(\'Confirm password\').value = \'bigf\xc3\xafsh\'\n+ >>> browser.getControl(\'Password\').value = \'biggerf\xc3\xafsh\'\n+ >>> browser.getControl(\'Confirm password\').value = \'biggerf\xc3\xafsh\'\n \n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n@@ -407,7 +408,7 @@ Testing the flexible user registration\n Ensure that the user has, in fact, been added.\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@usergroup-userprefs\')\n >>> \'user6pas\' in browser.contents\ndiff --git a/plone/app/users/tests/test_new_user.py b/plone/app/users/tests/test_new_user.py\nindex 743befe..15a6ef6 100644\n--- a/plone/app/users/tests/test_new_user.py\n+++ b/plone/app/users/tests/test_new_user.py\n@@ -1,4 +1,5 @@\n # -*- coding: utf-8 -*-\n+from plone.app.testing import TEST_USER_PASSWORD\n from plone.app.users.tests.base import BaseTestCase\n from plone.app.users.utils import uuid_userid_generator\n from Products.CMFCore.utils import getToolByName\n@@ -10,17 +11,17 @@ class TestNewUser(BaseTestCase):\n \n def test_new_user_as_site_administrator(self):\n self.portal.acl_users._doAddUser(\n- \'siteadmin\', \'secret\', [\'Site Administrator\'], []\n+ \'siteadmin\', TEST_USER_PASSWORD, [\'Site Administrator\'], []\n )\n # make the user available\n transaction.commit()\n \n- self.browser.addHeader(\'Authorization\', \'Basic siteadmin:secret\')\n+ self.browser.addHeader(\'Authorization\', f\'Basic siteadmin:{TEST_USER_PASSWORD}\')\n self.browser.open(\'http://nohost/plone/new-user\')\n self.browser.getControl(\'User Name\').value = \'newuser\'\n self.browser.getControl(\'Email\').value = \'newuser@example.com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Site Administrators\').selected = True\n self.browser.getControl(\'Register\').click()\n \n@@ -40,10 +41,10 @@ def setUp(self):\n super(TestGenerateUserIdLoginName, self).setUp()\n self.portal_url = self.portal.absolute_url()\n self.portal.acl_users._doAddUser(\n- \'siteadmin\', \'secret\', [\'Site Administrator\'], []\n+ \'siteadmin\', TEST_USER_PASSWORD, [\'Site Administrator\'], []\n )\n transaction.commit()\n- self.browser.addHeader(\'Authorization\', \'Basic siteadmin:secret\')\n+ self.browser.addHeader(\'Authorization\', f\'Basic siteadmin:{TEST_USER_PASSWORD}\')\n \n def test_uuid_disabled_email_as_login_disabled(self):\n self.security_settings.use_uuid_as_userid = False\n@@ -55,8 +56,8 @@ def test_uuid_disabled_email_as_login_disabled(self):\n self.browser.getControl(\'Full Name\').value = \'New User\'\n self.browser.getControl(\'User Name\').value = \'newie\'\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # user id should be set the same as user name\n@@ -74,8 +75,8 @@ def test_uuid_disabled_email_as_login_enabled_no_full_name(self):\n # create a user\n self.browser.open(\'http://nohost/plone/@@new-user\')\n self.browser.getControl(\'Email\').value = \'newuser@example.com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # Since full name is not provided, the user id is set based on the\n@@ -95,8 +96,8 @@ def test_uuid_disabled_email_as_login_enabled_no_full_name_uppercase(self):\n # create a user\n self.browser.open(\'http://nohost/plone/@@new-user\')\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # the user id is set based on the e-mail, which should be lowercased\n@@ -116,8 +117,8 @@ def test_uuid_disabled_email_as_login_enabled_has_full_name(self):\n self.browser.open(\'http://nohost/plone/@@new-user\')\n self.browser.getControl(\'Full Name\').value = \'New User\'\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # User id should be set based on the full name, user name should be\n@@ -139,8 +140,8 @@ def test_uuid_enabled_email_as_login_disabled(self):\n self.browser.getControl(\'Full Name\').value = \'New User\'\n self.browser.getControl(\'User Name\').value = \'newie\'\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # uuid should be used for the user id\n@@ -162,8 +163,8 @@ def test_uuid_enabled_email_as_login_enabled(self):\n self.browser.open(\'http://nohost/plone/@@new-user\')\n self.browser.getControl(\'Full Name\').value = \'New User\'\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # uuid should be used for the user id, user name should be based on\ndiff --git a/plone/app/users/tests/userdata_prefs_user_details.rst b/plone/app/users/tests/userdata_prefs_user_details.rst\nindex 3c3dd2c..2696b92 100644\n--- a/plone/app/users/tests/userdata_prefs_user_details.rst\n+++ b/plone/app/users/tests/userdata_prefs_user_details.rst\n@@ -6,6 +6,7 @@ Set Up\n \n >>> from plone.app.testing import TEST_USER_ID\n >>> from plone.app.testing import TEST_USER_NAME\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> from plone.testing.z2 import Browser\n \n >>> import transaction\n@@ -25,7 +26,7 @@ So let\'s login as Plone admin:\n >>> browser.open(\'http://nohost/plone/\')\n >>> browser.getLink(\'Log in\').click()\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n \n Let\'s see if we can navigate to the user information form in Users\n' +b"diff --git a/plone/app/relationfield/schemaeditor.txt b/plone/app/relationfield/schemaeditor.txt\nindex 5345656..aa623f5 100644\n--- a/plone/app/relationfield/schemaeditor.txt\n+++ b/plone/app/relationfield/schemaeditor.txt\n@@ -6,9 +6,10 @@ Test setup::\n \n >>> app = layer['app']\n >>> from plone.testing.zope import Browser\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> browser = Browser(app)\n >>> browser.handleErrors = False\n- >>> browser.addHeader('Authorization', 'Basic admin:secret')\n+ >>> browser.addHeader('Authorization', f'Basic admin:{TEST_USER_PASSWORD}')\n >>> portal = layer['portal']\n >>> portal_url = portal.portal_url()\n >>> dexterity_types = portal_url + '/dexterity-types'\ndiff --git a/plone/app/relationfield/schemaeditor_contenttree.txt b/plone/app/relationfield/schemaeditor_contenttree.txt\nindex cb8ec00..1c312b3 100644\n--- a/plone/app/relationfield/schemaeditor_contenttree.txt\n+++ b/plone/app/relationfield/schemaeditor_contenttree.txt\n@@ -6,9 +6,10 @@ Test setup::\n \n >>> app = layer['app']\n >>> from plone.testing.z2 import Browser\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> browser = Browser(app)\n >>> browser.handleErrors = False\n- >>> browser.addHeader('Authorization', 'Basic admin:secret')\n+ >>> browser.addHeader('Authorization', f'Basic admin:{TEST_USER_PASSWORD}')\n >>> portal = layer['portal']\n >>> portal_url = portal.portal_url()\n >>> dexterity_types = portal_url + '/dexterity-types'\n" -Repository: plone.app.users +Repository: plone.app.relationfield Branch: refs/heads/master -Date: 2022-09-18T19:51:22-07:00 +Date: 2022-09-18T19:54:49-07:00 Author: David Glick (davisagli) -Commit: https://github.com/plone/plone.app.users/commit/cc8cac8e23491db6ba9b5f186b78def151637bab +Commit: https://github.com/plone/plone.app.relationfield/commit/b8b52fe6febb9651c426c09da71d16e46510bf9f changelog Files changed: -A news/112.bugfix +A news/34.bugfix -b'diff --git a/news/112.bugfix b/news/112.bugfix\nnew file mode 100644\nindex 00000000..d1b185c6\n--- /dev/null\n+++ b/news/112.bugfix\n@@ -0,0 +1 @@\n+- Use longer passwords in tests. [davisagli]\n' +b'diff --git a/news/34.bugfix b/news/34.bugfix\nnew file mode 100644\nindex 0000000..2d76794\n--- /dev/null\n+++ b/news/34.bugfix\n@@ -0,0 +1 @@\n+- Use longer password in tests. [davisagli]\n' -Repository: plone.app.users +Repository: plone.app.relationfield Branch: refs/heads/master -Date: 2022-09-19T11:15:42+02:00 +Date: 2022-09-19T11:15:48+02:00 Author: Maurits van Rees (mauritsvanrees) -Commit: https://github.com/plone/plone.app.users/commit/49c42ce1bb5c4cb409449c6115a8cdeaae3d0312 +Commit: https://github.com/plone/plone.app.relationfield/commit/c07a3732c732364e3f1f54d1f717a0c41e24c73b -Merge pull request #112 from plone/pw-length +Merge pull request #34 from plone/pw-length -Use longer passwords in tests +Use longer password in tests Files changed: -A news/112.bugfix -M plone/app/users/tests/base.py -M plone/app/users/tests/duplicate_email.rst -M plone/app/users/tests/email_login.rst -M plone/app/users/tests/flexible_user_registration.rst -M plone/app/users/tests/member_search.rst -M plone/app/users/tests/password.rst -M plone/app/users/tests/personal_preferences_prefs_user_details.rst -M plone/app/users/tests/registration_forms.rst -M plone/app/users/tests/test_new_user.py -M plone/app/users/tests/userdata_prefs_user_details.rst - -b'diff --git a/news/112.bugfix b/news/112.bugfix\nnew file mode 100644\nindex 00000000..d1b185c6\n--- /dev/null\n+++ b/news/112.bugfix\n@@ -0,0 +1 @@\n+- Use longer passwords in tests. [davisagli]\ndiff --git a/plone/app/users/tests/base.py b/plone/app/users/tests/base.py\nindex 072c3225..c86e34d1 100644\n--- a/plone/app/users/tests/base.py\n+++ b/plone/app/users/tests/base.py\n@@ -10,6 +10,7 @@\n from OFS.Cache import Cacheable\n from plone.app.testing import setRoles\n from plone.app.testing import login\n+from plone.app.testing import TEST_USER_PASSWORD\n from plone.app.users.testing import PLONE_APP_USERS_FUNCTIONAL_TESTING\n from plone.registry.interfaces import IRegistry\n from plone.testing.z2 import Browser\n@@ -36,7 +37,7 @@ class BaseTestCase(unittest.TestCase):\n def setUp(self):\n self.portal = self.layer[\'portal\']\n self.request = self.layer[\'request\']\n- self.portal.acl_users._doAddUser(\'admin\', \'secret\', [\'Manager\'], [])\n+ self.portal.acl_users._doAddUser(\'admin\', TEST_USER_PASSWORD, [\'Manager\'], [])\n set_mock_mailhost(self.portal)\n self.membership = self.portal.portal_membership\n self.security_settings = get_security_settings()\ndiff --git a/plone/app/users/tests/duplicate_email.rst b/plone/app/users/tests/duplicate_email.rst\nindex 8278c367..2f297184 100644\n--- a/plone/app/users/tests/duplicate_email.rst\n+++ b/plone/app/users/tests/duplicate_email.rst\n@@ -5,6 +5,7 @@ When email address is used as login name, duplicates are not allowed.\n \n Use email addresses as login name:\n \n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> from plone.app.users.tests.base import get_security_settings\n >>> security_settings = get_security_settings()\n >>> security_settings.use_email_as_login = True\n@@ -13,13 +14,13 @@ Create a new user one:\n \n >>> portal = layer[\'portal\']\n >>> mtool = portal.portal_membership\n- >>> mtool.addMember(\'userone@example.com\', \'secret\', [], [])\n+ >>> mtool.addMember(\'userone@example.com\', TEST_USER_PASSWORD, [], [])\n >>> userone = mtool.getMemberById(\'userone@example.com\')\n >>> userone.setMemberProperties({\'email\':\'userone@example.com\'})\n \n Create a new user two:\n \n- >>> mtool.addMember(\'usertwo@example.com\', \'secret\', [], [])\n+ >>> mtool.addMember(\'usertwo@example.com\', TEST_USER_PASSWORD, [], [])\n >>> usertwo = mtool.getMemberById(\'usertwo@example.com\')\n >>> usertwo.setMemberProperties({\'email\':\'usertwo@example.com\'})\n >>> from transaction import commit\n@@ -33,7 +34,7 @@ Login as user two:\n >>> browser.getLink(\'Log in\').click()\n \n >>> browser.getControl(name=\'__ac_name\').value = \'usertwo@example.com\'\n- >>> browser.getControl(name=\'__ac_password\').value = \'secret\'\n+ >>> browser.getControl(name=\'__ac_password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> \'Login failed\' in browser.contents\n False\ndiff --git a/plone/app/users/tests/email_login.rst b/plone/app/users/tests/email_login.rst\nindex 907fd7a5..70d314d4 100644\n--- a/plone/app/users/tests/email_login.rst\n+++ b/plone/app/users/tests/email_login.rst\n@@ -7,6 +7,7 @@ Set up\n \n >>> from plone.app.testing import SITE_OWNER_NAME\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> from plone.testing.z2 import Browser\n \n >>> app = layer[\'app\']\n@@ -61,8 +62,8 @@ Fill out the form, using an odd email address that should not give problems.\n \n >>> browser.getControl(\'Full Name\').value = \'Bob Jones\'\n >>> browser.getControl(\'Email\').value = \'bob-jones+test@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> \'Failed to create your account\' in browser.contents\n False\n@@ -118,8 +119,8 @@ Use the same full name as before, to test that we get a different user id.\n \n >>> browser.getControl(\'Full Name\').value = \'Bob Jones\'\n >>> browser.getControl(\'Email\').value = \'bob-jones+test2@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> \'@@usergroup-userprefs\' in browser.url\n True\ndiff --git a/plone/app/users/tests/flexible_user_registration.rst b/plone/app/users/tests/flexible_user_registration.rst\nindex e019cdd9..f7797ecf 100644\n--- a/plone/app/users/tests/flexible_user_registration.rst\n+++ b/plone/app/users/tests/flexible_user_registration.rst\n@@ -3,6 +3,7 @@ Testing the flexible user registration\n ======================================\n \n >>> from plone.testing.z2 import Browser\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> import transaction\n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\n@@ -27,7 +28,7 @@ First things first... turn on self-registration so that we can see the\n depend on a mail server properly set-up:\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@security-controlpanel\')\n >>> browser.getControl(\'Enable self-registration\').selected = True\n@@ -145,7 +146,7 @@ Log in again\n \n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n \n Add portrait to registration form\ndiff --git a/plone/app/users/tests/member_search.rst b/plone/app/users/tests/member_search.rst\nindex 8c86630a..eeb47435 100644\n--- a/plone/app/users/tests/member_search.rst\n+++ b/plone/app/users/tests/member_search.rst\n@@ -42,8 +42,8 @@ Fill out the form.\n >>> browser.getControl(\'Full Name\').value = \'Bob Jones\'\n >>> browser.getControl(\'User Name\').value = \'bob-jones\'\n >>> browser.getControl(\'Email\').value = \'bob-jones+test2@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n \'...User added...bob-jones...\'\ndiff --git a/plone/app/users/tests/password.rst b/plone/app/users/tests/password.rst\nindex 4b59f170..510983ed 100644\n--- a/plone/app/users/tests/password.rst\n+++ b/plone/app/users/tests/password.rst\n@@ -54,7 +54,7 @@ Let\'s try to change the password with a new one containing non-ascii chars:\n \n >>> browser.getControl(name=\'_authenticator\', index=0)\n \n- >>> browser.getControl(\'Current password\').value = \'secret\'\n+ >>> browser.getControl(\'Current password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'New password\').value = \'super-secr\xc3\xa9t\'\n >>> browser.getControl(\'Confirm password\').value = \'super-secr\xc3\xa9t\'\n >>> browser.getControl(\'Change Password\').click()\ndiff --git a/plone/app/users/tests/personal_preferences_prefs_user_details.rst b/plone/app/users/tests/personal_preferences_prefs_user_details.rst\nindex 6514165b..4f3ef3fc 100644\n--- a/plone/app/users/tests/personal_preferences_prefs_user_details.rst\n+++ b/plone/app/users/tests/personal_preferences_prefs_user_details.rst\n@@ -5,6 +5,7 @@ Set up\n ======\n \n >>> from plone.app.testing import TEST_USER_NAME\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> from plone.testing.z2 import Browser\n \n >>> app = layer[\'app\']\n@@ -27,7 +28,7 @@ So let\'s login as Plone admin:\n >>> browser.open(\'http://nohost/plone/\')\n >>> browser.getLink(\'Log in\').click()\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n \n Let\'s see if we can navigate to the user information form in Users\ndiff --git a/plone/app/users/tests/registration_forms.rst b/plone/app/users/tests/registration_forms.rst\nindex 5b0eae58..151c28da 100644\n--- a/plone/app/users/tests/registration_forms.rst\n+++ b/plone/app/users/tests/registration_forms.rst\n@@ -4,6 +4,7 @@ Testing the flexible user registration\n >>> portal = layer[\'portal\']\n >>> from plone.app.testing import setRoles\n >>> from plone.app.testing import TEST_USER_ID\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> setRoles(portal, TEST_USER_ID, [\'Manager\'])\n >>> portal.invokeFactory(\'Folder\', \'news\')\n \'news\'\n@@ -22,7 +23,7 @@ Testing the flexible user registration\n Enable self-registration\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@security-controlpanel\')\n >>> browser.getControl(\'Enable self-registration\').selected = True\n@@ -98,7 +99,7 @@ Testing the flexible user registration\n Ensure that the user has, in fact, been added.\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@usergroup-userprefs\')\n >>> \'user1\' in browser.contents\n@@ -108,7 +109,7 @@ Testing the flexible user registration\n >>> unsetMailHost()\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@security-controlpanel\')\n >>> browser.getControl(\'Let users select their own passwords\').selected = True\n@@ -132,8 +133,8 @@ Testing the flexible user registration\n Fill out the form.\n >>> browser.getControl(\'User Name\').value = \'user2\'\n >>> browser.getControl(\'Email\').value = \'user2@example.com\'\n- >>> browser.getControl(\'Password\').value = \'bigf\xc3\xafsh\'\n- >>> browser.getControl(\'Confirm password\').value = \'bigf\xc3\xafsh\'\n+ >>> browser.getControl(\'Password\').value = \'biggerf\xc3\xafsh\'\n+ >>> browser.getControl(\'Confirm password\').value = \'biggerf\xc3\xafsh\'\n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n \'...Welcome!...You have been registered...\'\n@@ -141,7 +142,7 @@ Testing the flexible user registration\n Ensure that the user has, in fact, been added.\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@usergroup-userprefs\')\n >>> \'user2\' in browser.contents\n@@ -155,8 +156,8 @@ Testing the flexible user registration\n >>> browser.open(\'http://nohost/plone/@@register?came_from=http://nohost/plone/news\')\n >>> browser.getControl(\'User Name\').value = \'user5\'\n >>> browser.getControl(\'Email\').value = \'user5@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> browser.url\n \'http://nohost/plone/news\'\n@@ -206,8 +207,8 @@ Testing the flexible user registration\n >>> browser.open(\'http://nohost/plone/@@new-user\')\n >>> browser.getControl(\'User Name\').value = \'user2a\'\n >>> browser.getControl(\'Email\').value = \'user2a-AT-example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n \'...There were errors...Invalid email address...\'\n@@ -216,8 +217,8 @@ Testing the flexible user registration\n >>> browser.open(\'http://nohost/plone/@@new-user\')\n >>> browser.getControl(\'User Name\').value = \'user3\'\n >>> browser.getControl(\'Email\').value = \'user3@example.com\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n- >>> browser.getControl(\'Confirm password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ >>> browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Register\').click()\n >>> \'@@usergroup-userprefs\' in browser.url\n True\n@@ -300,7 +301,7 @@ Testing the flexible user registration\n >>> unsetMailHost()\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@security-controlpanel\')\n >>> browser.getControl(\'Let users select their own passwords\').selected = True\n@@ -327,7 +328,7 @@ Testing the flexible user registration\n ...Enter your new password. Must not be dead...\n \n And we no longer see the default message\n- >>> \'Minimum 5 characters.\' not in browser.contents\n+ >>> \'Minimum 8 characters.\' not in browser.contents\n True\n \n \n@@ -346,8 +347,8 @@ Testing the flexible user registration\n \n Now try a valid password\n \n- >>> browser.getControl(\'Password\').value = \'fish\'\n- >>> browser.getControl(\'Confirm password\').value = \'fish\'\n+ >>> browser.getControl(\'Password\').value = \'tuna fish\'\n+ >>> browser.getControl(\'Confirm password\').value = \'tuna fish\'\n \n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n@@ -356,7 +357,7 @@ Testing the flexible user registration\n Ensure that the user has, in fact, been added.\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@usergroup-userprefs\')\n >>> \'user5pas\' in browser.contents\n@@ -392,13 +393,13 @@ Testing the flexible user registration\n >>> browser.getControl(\'Register\').click()\n \n >>> print(browser.contents)\n- <...
...Must not be dead. Your password must contain at least 5 characters....
...\n+ <...
...Must not be dead. Your password must contain at least 8 characters....
...\n \n Now try a valid password -- and we\'ll make sure non-ASCII characters are\n handled too.\n \n- >>> browser.getControl(\'Password\').value = \'bigf\xc3\xafsh\'\n- >>> browser.getControl(\'Confirm password\').value = \'bigf\xc3\xafsh\'\n+ >>> browser.getControl(\'Password\').value = \'biggerf\xc3\xafsh\'\n+ >>> browser.getControl(\'Confirm password\').value = \'biggerf\xc3\xafsh\'\n \n >>> browser.getControl(\'Register\').click()\n >>> browser.contents\n@@ -407,7 +408,7 @@ Testing the flexible user registration\n Ensure that the user has, in fact, been added.\n >>> browser.open(\'http://nohost/plone/login_form\')\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n >>> browser.open(\'http://nohost/plone/@@usergroup-userprefs\')\n >>> \'user6pas\' in browser.contents\ndiff --git a/plone/app/users/tests/test_new_user.py b/plone/app/users/tests/test_new_user.py\nindex 743befec..15a6ef6e 100644\n--- a/plone/app/users/tests/test_new_user.py\n+++ b/plone/app/users/tests/test_new_user.py\n@@ -1,4 +1,5 @@\n # -*- coding: utf-8 -*-\n+from plone.app.testing import TEST_USER_PASSWORD\n from plone.app.users.tests.base import BaseTestCase\n from plone.app.users.utils import uuid_userid_generator\n from Products.CMFCore.utils import getToolByName\n@@ -10,17 +11,17 @@ class TestNewUser(BaseTestCase):\n \n def test_new_user_as_site_administrator(self):\n self.portal.acl_users._doAddUser(\n- \'siteadmin\', \'secret\', [\'Site Administrator\'], []\n+ \'siteadmin\', TEST_USER_PASSWORD, [\'Site Administrator\'], []\n )\n # make the user available\n transaction.commit()\n \n- self.browser.addHeader(\'Authorization\', \'Basic siteadmin:secret\')\n+ self.browser.addHeader(\'Authorization\', f\'Basic siteadmin:{TEST_USER_PASSWORD}\')\n self.browser.open(\'http://nohost/plone/new-user\')\n self.browser.getControl(\'User Name\').value = \'newuser\'\n self.browser.getControl(\'Email\').value = \'newuser@example.com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Site Administrators\').selected = True\n self.browser.getControl(\'Register\').click()\n \n@@ -40,10 +41,10 @@ def setUp(self):\n super(TestGenerateUserIdLoginName, self).setUp()\n self.portal_url = self.portal.absolute_url()\n self.portal.acl_users._doAddUser(\n- \'siteadmin\', \'secret\', [\'Site Administrator\'], []\n+ \'siteadmin\', TEST_USER_PASSWORD, [\'Site Administrator\'], []\n )\n transaction.commit()\n- self.browser.addHeader(\'Authorization\', \'Basic siteadmin:secret\')\n+ self.browser.addHeader(\'Authorization\', f\'Basic siteadmin:{TEST_USER_PASSWORD}\')\n \n def test_uuid_disabled_email_as_login_disabled(self):\n self.security_settings.use_uuid_as_userid = False\n@@ -55,8 +56,8 @@ def test_uuid_disabled_email_as_login_disabled(self):\n self.browser.getControl(\'Full Name\').value = \'New User\'\n self.browser.getControl(\'User Name\').value = \'newie\'\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # user id should be set the same as user name\n@@ -74,8 +75,8 @@ def test_uuid_disabled_email_as_login_enabled_no_full_name(self):\n # create a user\n self.browser.open(\'http://nohost/plone/@@new-user\')\n self.browser.getControl(\'Email\').value = \'newuser@example.com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # Since full name is not provided, the user id is set based on the\n@@ -95,8 +96,8 @@ def test_uuid_disabled_email_as_login_enabled_no_full_name_uppercase(self):\n # create a user\n self.browser.open(\'http://nohost/plone/@@new-user\')\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # the user id is set based on the e-mail, which should be lowercased\n@@ -116,8 +117,8 @@ def test_uuid_disabled_email_as_login_enabled_has_full_name(self):\n self.browser.open(\'http://nohost/plone/@@new-user\')\n self.browser.getControl(\'Full Name\').value = \'New User\'\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # User id should be set based on the full name, user name should be\n@@ -139,8 +140,8 @@ def test_uuid_enabled_email_as_login_disabled(self):\n self.browser.getControl(\'Full Name\').value = \'New User\'\n self.browser.getControl(\'User Name\').value = \'newie\'\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # uuid should be used for the user id\n@@ -162,8 +163,8 @@ def test_uuid_enabled_email_as_login_enabled(self):\n self.browser.open(\'http://nohost/plone/@@new-user\')\n self.browser.getControl(\'Full Name\').value = \'New User\'\n self.browser.getControl(\'Email\').value = \'NewUser@Example.Com\'\n- self.browser.getControl(\'Password\').value = \'foobar\'\n- self.browser.getControl(\'Confirm password\').value = \'foobar\'\n+ self.browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n+ self.browser.getControl(\'Confirm password\').value = TEST_USER_PASSWORD\n self.browser.getControl(\'Register\').click()\n \n # uuid should be used for the user id, user name should be based on\ndiff --git a/plone/app/users/tests/userdata_prefs_user_details.rst b/plone/app/users/tests/userdata_prefs_user_details.rst\nindex 3c3dd2c4..2696b925 100644\n--- a/plone/app/users/tests/userdata_prefs_user_details.rst\n+++ b/plone/app/users/tests/userdata_prefs_user_details.rst\n@@ -6,6 +6,7 @@ Set Up\n \n >>> from plone.app.testing import TEST_USER_ID\n >>> from plone.app.testing import TEST_USER_NAME\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> from plone.testing.z2 import Browser\n \n >>> import transaction\n@@ -25,7 +26,7 @@ So let\'s login as Plone admin:\n >>> browser.open(\'http://nohost/plone/\')\n >>> browser.getLink(\'Log in\').click()\n >>> browser.getControl(\'Login Name\').value = \'admin\'\n- >>> browser.getControl(\'Password\').value = \'secret\'\n+ >>> browser.getControl(\'Password\').value = TEST_USER_PASSWORD\n >>> browser.getControl(\'Log in\').click()\n \n Let\'s see if we can navigate to the user information form in Users\n' +A news/34.bugfix +M plone/app/relationfield/schemaeditor.txt +M plone/app/relationfield/schemaeditor_contenttree.txt + +b"diff --git a/news/34.bugfix b/news/34.bugfix\nnew file mode 100644\nindex 0000000..2d76794\n--- /dev/null\n+++ b/news/34.bugfix\n@@ -0,0 +1 @@\n+- Use longer password in tests. [davisagli]\ndiff --git a/plone/app/relationfield/schemaeditor.txt b/plone/app/relationfield/schemaeditor.txt\nindex 5345656..aa623f5 100644\n--- a/plone/app/relationfield/schemaeditor.txt\n+++ b/plone/app/relationfield/schemaeditor.txt\n@@ -6,9 +6,10 @@ Test setup::\n \n >>> app = layer['app']\n >>> from plone.testing.zope import Browser\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> browser = Browser(app)\n >>> browser.handleErrors = False\n- >>> browser.addHeader('Authorization', 'Basic admin:secret')\n+ >>> browser.addHeader('Authorization', f'Basic admin:{TEST_USER_PASSWORD}')\n >>> portal = layer['portal']\n >>> portal_url = portal.portal_url()\n >>> dexterity_types = portal_url + '/dexterity-types'\ndiff --git a/plone/app/relationfield/schemaeditor_contenttree.txt b/plone/app/relationfield/schemaeditor_contenttree.txt\nindex cb8ec00..1c312b3 100644\n--- a/plone/app/relationfield/schemaeditor_contenttree.txt\n+++ b/plone/app/relationfield/schemaeditor_contenttree.txt\n@@ -6,9 +6,10 @@ Test setup::\n \n >>> app = layer['app']\n >>> from plone.testing.z2 import Browser\n+ >>> from plone.app.testing import TEST_USER_PASSWORD\n >>> browser = Browser(app)\n >>> browser.handleErrors = False\n- >>> browser.addHeader('Authorization', 'Basic admin:secret')\n+ >>> browser.addHeader('Authorization', f'Basic admin:{TEST_USER_PASSWORD}')\n >>> portal = layer['portal']\n >>> portal_url = portal.portal_url()\n >>> dexterity_types = portal_url + '/dexterity-types'\n"