From 3f8f647e034aa9f1c9f4eacd8e32d6b823b83f64 Mon Sep 17 00:00:00 2001 From: David Glick Date: Wed, 5 Oct 2022 20:49:42 +0200 Subject: [PATCH] Fix password used in tests --- .../tests/functional_test_comment_review_workflow.txt | 5 +++-- .../app/discussion/tests/functional_test_comments.txt | 11 ++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/plone/app/discussion/tests/functional_test_comment_review_workflow.txt b/plone/app/discussion/tests/functional_test_comment_review_workflow.txt index 1bcae9b..be91bdb 100644 --- a/plone/app/discussion/tests/functional_test_comment_review_workflow.txt +++ b/plone/app/discussion/tests/functional_test_comment_review_workflow.txt @@ -18,10 +18,11 @@ First we have to set up some things and login. >>> app = layer['app'] >>> from plone.testing.z2 import Browser + >>> from plone.app.testing import SITE_OWNER_PASSWORD >>> from plone.app.testing import TEST_USER_PASSWORD >>> browser = Browser(app) >>> browser.handleErrors = False - >>> browser.addHeader('Authorization', f'Basic admin:{TEST_USER_PASSWORD}') + >>> browser.addHeader('Authorization', f'Basic admin:{SITE_OWNER_PASSWORD}') >>> portal = layer['portal'] >>> portal_url = 'http://nohost/plone' @@ -241,7 +242,7 @@ Enable anonymous comment with email. >>> browser.open(portal_url + '/logout') >>> browser.open(portal_url + '/login_form') >>> browser.getControl(name='__ac_name').value = 'admin' - >>> browser.getControl(name='__ac_password').value = TEST_USER_PASSWORD + >>> browser.getControl(name='__ac_password').value = SITE_OWNER_PASSWORD >>> browser.getControl('Log in').click() >>> browser.open(portal_url+'/@@discussion-controlpanel') >>> browser.getControl(name='form.widgets.anonymous_comments:list').value = 'selected' diff --git a/plone/app/discussion/tests/functional_test_comments.txt b/plone/app/discussion/tests/functional_test_comments.txt index d6e6036..a727738 100644 --- a/plone/app/discussion/tests/functional_test_comments.txt +++ b/plone/app/discussion/tests/functional_test_comments.txt @@ -15,10 +15,11 @@ First we have to set up some things and login. >>> app = layer['app'] >>> from plone.testing.z2 import Browser + >>> from plone.app.testing import SITE_OWNER_PASSWORD >>> from plone.app.testing import TEST_USER_PASSWORD >>> browser = Browser(app) >>> browser.handleErrors = False - >>> browser.addHeader('Authorization', f'Basic admin:{TEST_USER_PASSWORD}') + >>> browser.addHeader('Authorization', f'Basic admin:{SITE_OWNER_PASSWORD}') >>> portal = layer['portal'] >>> portal_url = 'http://nohost/plone' @@ -177,7 +178,7 @@ Enable anonymous comment >>> browser.open(portal_url + '/logout') >>> browser.open(portal_url + '/login_form') >>> browser.getControl(name='__ac_name').value = 'admin' - >>> browser.getControl(name='__ac_password').value = TEST_USER_PASSWORD + >>> browser.getControl(name='__ac_password').value = SITE_OWNER_PASSWORD >>> browser.getControl('Log in').click() >>> browser.open(portal_url+'/@@discussion-controlpanel') >>> browser.getControl(name='form.widgets.anonymous_comments:list').value = 'selected' @@ -249,7 +250,7 @@ Log in as admin >>> browser.getLink('Log out').click() >>> browser.open(portal_url + '/login_form') >>> browser.getControl('Login Name').value = 'admin' - >>> browser.getControl('Password').value = TEST_USER_PASSWORD + >>> browser.getControl('Password').value = SITE_OWNER_PASSWORD >>> browser.getControl('Log in').click() Use the Plone control panel to enable comment editing. @@ -451,7 +452,7 @@ Login as admin. >>> browser.open(portal_url + '/login_form') >>> browser.getControl(name='__ac_name').value = 'admin' - >>> browser.getControl(name='__ac_password').value = TEST_USER_PASSWORD + >>> browser.getControl(name='__ac_password').value = SITE_OWNER_PASSWORD >>> browser.getControl('Log in').click() Edit the content object. @@ -480,7 +481,7 @@ Edit the control panel. >>> browser.open(portal_url + '/logout') >>> browser.open(portal_url + '/login_form') >>> browser.getControl(name='__ac_name').value = 'admin' - >>> browser.getControl(name='__ac_password').value = TEST_USER_PASSWORD + >>> browser.getControl(name='__ac_password').value = SITE_OWNER_PASSWORD >>> browser.getControl('Log in').click() >>> browser.open(portal_url+'/@@discussion-controlpanel') >>> browser.getControl(name='form.widgets.anonymous_email_enabled:list').value = 'selected'