Fix password used in tests
This commit is contained in:
parent
7a23fd9ad0
commit
3f8f647e03
@ -18,10 +18,11 @@ First we have to set up some things and login.
|
|||||||
|
|
||||||
>>> app = layer['app']
|
>>> app = layer['app']
|
||||||
>>> from plone.testing.z2 import Browser
|
>>> from plone.testing.z2 import Browser
|
||||||
|
>>> from plone.app.testing import SITE_OWNER_PASSWORD
|
||||||
>>> from plone.app.testing import TEST_USER_PASSWORD
|
>>> from plone.app.testing import TEST_USER_PASSWORD
|
||||||
>>> browser = Browser(app)
|
>>> browser = Browser(app)
|
||||||
>>> browser.handleErrors = False
|
>>> 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 = layer['portal']
|
||||||
>>> portal_url = 'http://nohost/plone'
|
>>> portal_url = 'http://nohost/plone'
|
||||||
|
|
||||||
@ -241,7 +242,7 @@ Enable anonymous comment with email.
|
|||||||
>>> browser.open(portal_url + '/logout')
|
>>> browser.open(portal_url + '/logout')
|
||||||
>>> browser.open(portal_url + '/login_form')
|
>>> browser.open(portal_url + '/login_form')
|
||||||
>>> browser.getControl(name='__ac_name').value = 'admin'
|
>>> 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.getControl('Log in').click()
|
||||||
>>> browser.open(portal_url+'/@@discussion-controlpanel')
|
>>> browser.open(portal_url+'/@@discussion-controlpanel')
|
||||||
>>> browser.getControl(name='form.widgets.anonymous_comments:list').value = 'selected'
|
>>> browser.getControl(name='form.widgets.anonymous_comments:list').value = 'selected'
|
||||||
|
@ -15,10 +15,11 @@ First we have to set up some things and login.
|
|||||||
|
|
||||||
>>> app = layer['app']
|
>>> app = layer['app']
|
||||||
>>> from plone.testing.z2 import Browser
|
>>> from plone.testing.z2 import Browser
|
||||||
|
>>> from plone.app.testing import SITE_OWNER_PASSWORD
|
||||||
>>> from plone.app.testing import TEST_USER_PASSWORD
|
>>> from plone.app.testing import TEST_USER_PASSWORD
|
||||||
>>> browser = Browser(app)
|
>>> browser = Browser(app)
|
||||||
>>> browser.handleErrors = False
|
>>> 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 = layer['portal']
|
||||||
>>> portal_url = 'http://nohost/plone'
|
>>> portal_url = 'http://nohost/plone'
|
||||||
|
|
||||||
@ -177,7 +178,7 @@ Enable anonymous comment
|
|||||||
>>> browser.open(portal_url + '/logout')
|
>>> browser.open(portal_url + '/logout')
|
||||||
>>> browser.open(portal_url + '/login_form')
|
>>> browser.open(portal_url + '/login_form')
|
||||||
>>> browser.getControl(name='__ac_name').value = 'admin'
|
>>> 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.getControl('Log in').click()
|
||||||
>>> browser.open(portal_url+'/@@discussion-controlpanel')
|
>>> browser.open(portal_url+'/@@discussion-controlpanel')
|
||||||
>>> browser.getControl(name='form.widgets.anonymous_comments:list').value = 'selected'
|
>>> browser.getControl(name='form.widgets.anonymous_comments:list').value = 'selected'
|
||||||
@ -249,7 +250,7 @@ Log in as admin
|
|||||||
>>> browser.getLink('Log out').click()
|
>>> browser.getLink('Log out').click()
|
||||||
>>> browser.open(portal_url + '/login_form')
|
>>> browser.open(portal_url + '/login_form')
|
||||||
>>> browser.getControl('Login Name').value = 'admin'
|
>>> 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()
|
>>> browser.getControl('Log in').click()
|
||||||
|
|
||||||
Use the Plone control panel to enable comment editing.
|
Use the Plone control panel to enable comment editing.
|
||||||
@ -451,7 +452,7 @@ Login as admin.
|
|||||||
|
|
||||||
>>> browser.open(portal_url + '/login_form')
|
>>> browser.open(portal_url + '/login_form')
|
||||||
>>> browser.getControl(name='__ac_name').value = 'admin'
|
>>> 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.getControl('Log in').click()
|
||||||
|
|
||||||
Edit the content object.
|
Edit the content object.
|
||||||
@ -480,7 +481,7 @@ Edit the control panel.
|
|||||||
>>> browser.open(portal_url + '/logout')
|
>>> browser.open(portal_url + '/logout')
|
||||||
>>> browser.open(portal_url + '/login_form')
|
>>> browser.open(portal_url + '/login_form')
|
||||||
>>> browser.getControl(name='__ac_name').value = 'admin'
|
>>> 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.getControl('Log in').click()
|
||||||
>>> browser.open(portal_url+'/@@discussion-controlpanel')
|
>>> browser.open(portal_url+'/@@discussion-controlpanel')
|
||||||
>>> browser.getControl(name='form.widgets.anonymous_email_enabled:list').value = 'selected'
|
>>> browser.getControl(name='form.widgets.anonymous_email_enabled:list').value = 'selected'
|
||||||
|
Loading…
Reference in New Issue
Block a user