Commit 355b0232 authored by Ivan Tyagov's avatar Ivan Tyagov

Fix tests' user/password handling.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24969 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 90374baf
...@@ -29,13 +29,15 @@ Options: ...@@ -29,13 +29,15 @@ Options:
http://${host}:${port}/${portal_name}/ http://${host}:${port}/${portal_name}/
Notes: Notes:
* You need to prepepare first test environment by using following command: * You need to prepepare first test environment by using following command:
./runUnitTest.py --save prepareFunctionalTes ./runUnitTest.py --save prepareFunctionalTest.py
""" """
host = 'localhost' host = 'localhost'
port = 8080 port = 8080
portal_name = 'erp5_portal' portal_name = 'erp5_portal'
user = 'ERP5TypeTestCase'
password = ''
send_mail = 0 send_mail = 0
stdout = 0 stdout = 0
email_to_address = 'erp5-report@erp5.org' email_to_address = 'erp5-report@erp5.org'
...@@ -182,8 +184,8 @@ def runFirefox(): ...@@ -182,8 +184,8 @@ def runFirefox():
os.environ['HOME'] = profile_dir os.environ['HOME'] = profile_dir
prepareFirefox() prepareFirefox()
pid = os.spawnlp(os.P_NOWAIT, "firefox", "firefox", "-profile", profile_dir, pid = os.spawnlp(os.P_NOWAIT, "firefox", "firefox", "-profile", profile_dir,
"http://%s:%d/%s/portal_tests/?auto=true&__ac_name=ERP5TypeTestCase" "http://%s:%d/%s/portal_tests/?auto=true&__ac_name=%s"
"&__ac_password=" % (host, port, portal_name)) "&__ac_password=%s" % (host, port, portal_name, user, password))
os.environ['MOZ_NO_REMOTE'] = '0' os.environ['MOZ_NO_REMOTE'] = '0'
print 'firefox : %d' % pid print 'firefox : %d' % pid
return pid return pid
...@@ -201,18 +203,18 @@ def getStatus(): ...@@ -201,18 +203,18 @@ def getStatus():
def setPreference(): def setPreference():
urllib2.urlopen('http://%s:%d/%s/BTZuite_setPreference?__ac_name=' urllib2.urlopen('http://%s:%d/%s/BTZuite_setPreference?__ac_name='
'ERP5TypeTestCase&__ac_password=&working_copy_list=%s' % '%s&__ac_password=%s&working_copy_list=%s' %
(host, port, portal_name, bt5_dir_list)) (host, port, portal_name, user, password, bt5_dir_list))
def setBaseUrl(): def setBaseUrl():
urllib2.urlopen('http://%s:%d/%s/Zuite_setBaseUrl?__ac_name=' urllib2.urlopen('http://%s:%d/%s/Zuite_setBaseUrl?__ac_name='
'ERP5TypeTestCase&__ac_password=&base_url=%s' % '%s&__ac_password=%s&base_url=%s' %
(host, port, portal_name, portal_name)) (host, port, portal_name, user, password, portal_name))
def unsubscribeFromTimerService(): def unsubscribeFromTimerService():
urllib2.urlopen('http://%s:%d/%s/portal_activities/?unsubscribe:method=' urllib2.urlopen('http://%s:%d/%s/portal_activities/?unsubscribe:method='
'&__ac_name=ERP5TypeTestCase&__ac_password=' % '&__ac_name=%s&__ac_password=%s' %
(host, port, portal_name)) (host, port, portal_name, user, password))
def sendResult(): def sendResult():
result_uri = urllib2.urlopen('http://%s:%d/%s/TestTool_getResults' % result_uri = urllib2.urlopen('http://%s:%d/%s/TestTool_getResults' %
......
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