diff --git a/modules/bibedit/lib/bibedit_regression_tests.py b/modules/bibedit/lib/bibedit_regression_tests.py index a4d018c22..5b273d7bc 100644 --- a/modules/bibedit/lib/bibedit_regression_tests.py +++ b/modules/bibedit/lib/bibedit_regression_tests.py @@ -1,68 +1,69 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """BibEdit Regression Test Suite.""" __revision__ = "$Id$" import unittest from invenio.config import weburl from invenio.testutils import make_test_suite, warn_user_about_tests_and_run, \ test_web_page_content, merge_error_messages class BibEditWebPagesAvailabilityTest(unittest.TestCase): """Check BibEdit web pages whether they are up or not.""" def test_bibedit_admin_interface_availability(self): """bibedit - availability of BibEdit Admin interface pages""" baseurl = weburl + '/admin/bibedit/bibeditadmin.py/' _exports = ['', 'index', 'edit', 'submit'] error_messages = [] for url in [baseurl + page for page in _exports]: # first try as guest: error_messages.extend(test_web_page_content(url, username='guest', expected_text= 'Authorization failure')) # then try as admin: error_messages.extend(test_web_page_content(url, username='admin')) if error_messages: self.fail(merge_error_messages(error_messages)) return def test_bibedit_admin_guide_availability(self): """bibedit - availability of BibEdit Admin guide pages""" url = weburl + '/help/admin/bibedit-admin-guide' - error_messages = test_web_page_content(url) + error_messages = test_web_page_content(url, + expected_text="BibEdit Admin Guide") if error_messages: self.fail(merge_error_messages(error_messages)) return test_suite = make_test_suite(BibEditWebPagesAvailabilityTest) if __name__ == "__main__": warn_user_about_tests_and_run(test_suite) diff --git a/modules/bibformat/lib/bibformatadmin_regression_tests.py b/modules/bibformat/lib/bibformatadmin_regression_tests.py index 1e38f9f41..74c522bf0 100644 --- a/modules/bibformat/lib/bibformatadmin_regression_tests.py +++ b/modules/bibformat/lib/bibformatadmin_regression_tests.py @@ -1,71 +1,72 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """BibFormat Admin Regression Test Suite.""" __revision__ = "$Id$" import unittest from invenio.config import weburl from invenio.testutils import make_test_suite, warn_user_about_tests_and_run, \ test_web_page_content, merge_error_messages class BibFormatAdminWebPagesAvailabilityTest(unittest.TestCase): """Check BibFormat Admin web pages whether they are up or not.""" def test_bibformat_admin_interface_availability(self): """bibformatadmin - availability of BibFormat Admin interface pages""" baseurl = weburl + '/admin/bibformat/' _exports = ['bibformatadmin.py/format_templates_manage', 'bibformatadmin.py/output_formats_manage', 'bibformatadmin.py/format_elements_doc', 'bibformatadmin.py/kb_manage'] error_messages = [] for url in [baseurl + page for page in _exports]: # first try as guest: error_messages.extend(test_web_page_content(url, username='guest', expected_text= 'not authorized to perform')) # then try as admin: error_messages.extend(test_web_page_content(url, username='admin')) if error_messages: self.fail(merge_error_messages(error_messages)) return def test_bibformat_admin_guide_availability(self): """bibformatadmin - availability of BibFormat Admin guide pages""" url = weburl + '/help/admin/bibformat-admin-guide' - error_messages = test_web_page_content(url) + error_messages = test_web_page_content(url, + expected_text="BibFormat Admin Guide") if error_messages: self.fail(merge_error_messages(error_messages)) return test_suite = make_test_suite(BibFormatAdminWebPagesAvailabilityTest) if __name__ == "__main__": warn_user_about_tests_and_run(test_suite) diff --git a/modules/bibharvest/lib/bibharvestadmin_regression_tests.py b/modules/bibharvest/lib/bibharvestadmin_regression_tests.py index f992e9c30..c8edff637 100644 --- a/modules/bibharvest/lib/bibharvestadmin_regression_tests.py +++ b/modules/bibharvest/lib/bibharvestadmin_regression_tests.py @@ -1,68 +1,69 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """BibHarvest Admin Regression Test Suite.""" __revision__ = "$Id$" import unittest from invenio.config import weburl from invenio.testutils import make_test_suite, warn_user_about_tests_and_run, \ test_web_page_content, merge_error_messages class BibHarvestAdminWebPagesAvailabilityTest(unittest.TestCase): """Check BibHarvest Admin web pages whether they are up or not.""" def test_bibharvest_admin_interface_pages_availability(self): """bibharvestadmin - availability of BibHarvest Admin interface pages""" baseurl = weburl + '/admin/bibharvest/bibharvestadmin.py/' _exports = ['', 'editsource', 'addsource', 'delsource'] error_messages = [] for url in [baseurl + page for page in _exports]: # first try as guest: error_messages.extend(test_web_page_content(url, username='guest', expected_text= 'Authorization failure')) # then try as admin: error_messages.extend(test_web_page_content(url, username='admin')) if error_messages: self.fail(merge_error_messages(error_messages)) return def test_bibharvest_admin_guide_availability(self): """bibharvestadmin - availability of BibHarvest Admin guide pages""" url = weburl + '/help/admin/bibharvest-admin-guide' - error_messages = test_web_page_content(url) + error_messages = test_web_page_content(url, + expected_text="BibHarvest Admin Guide") if error_messages: self.fail(merge_error_messages(error_messages)) return test_suite = make_test_suite(BibHarvestAdminWebPagesAvailabilityTest) if __name__ == "__main__": warn_user_about_tests_and_run(test_suite) diff --git a/modules/bibindex/lib/bibindexadmin_regression_tests.py b/modules/bibindex/lib/bibindexadmin_regression_tests.py index 38596e55f..1fa48a753 100644 --- a/modules/bibindex/lib/bibindexadmin_regression_tests.py +++ b/modules/bibindex/lib/bibindexadmin_regression_tests.py @@ -1,77 +1,78 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """BibIndex Admin Regression Test Suite.""" __revision__ = "$Id$" import unittest from invenio.config import weburl from invenio.testutils import make_test_suite, warn_user_about_tests_and_run, \ test_web_page_content, merge_error_messages class BibIndexAdminWebPagesAvailabilityTest(unittest.TestCase): """Check BibIndex Admin web pages whether they are up or not.""" def test_bibindex_admin_interface_pages_availability(self): """bibindexadmin - availability of BibIndex Admin interface pages""" baseurl = weburl + '/admin/bibindex/bibindexadmin.py/' _exports = ['', 'index', 'index?mtype=perform_showindexoverview', 'index?mtype=perform_editindexes', 'index?mtype=perform_addindex', 'field', 'field?mtype=perform_showfieldoverview', 'field?mtype=perform_editfields', 'field?mtype=perform_addfield', ] error_messages = [] for url in [baseurl + page for page in _exports]: # first try as guest: error_messages.extend(test_web_page_content(url, username='guest', expected_text= 'Authorization failure')) # then try as admin: error_messages.extend(test_web_page_content(url, username='admin')) if error_messages: self.fail(merge_error_messages(error_messages)) return def test_bibindex_admin_guide_availability(self): """bibindexadmin - availability of BibIndex Admin guide pages""" url = weburl + '/help/admin/bibindex-admin-guide' - error_messages = test_web_page_content(url) + error_messages = test_web_page_content(url, + expected_text="BibIndex Admin Guide") if error_messages: self.fail(merge_error_messages(error_messages)) return test_suite = make_test_suite(BibIndexAdminWebPagesAvailabilityTest) if __name__ == "__main__": warn_user_about_tests_and_run(test_suite) diff --git a/modules/bibrank/lib/bibrankadmin_regression_tests.py b/modules/bibrank/lib/bibrankadmin_regression_tests.py index 6b9e1b751..67fcd8cdc 100644 --- a/modules/bibrank/lib/bibrankadmin_regression_tests.py +++ b/modules/bibrank/lib/bibrankadmin_regression_tests.py @@ -1,70 +1,71 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """BibRank Admin Regression Test Suite.""" __revision__ = "$Id$" import unittest from invenio.config import weburl from invenio.testutils import make_test_suite, warn_user_about_tests_and_run, \ test_web_page_content, merge_error_messages class BibRankAdminWebPagesAvailabilityTest(unittest.TestCase): """Check BibRank Admin web pages whether they are up or not.""" def test_bibrank_admin_interface_pages_availability(self): """bibrankadmin - availability of BibRank Admin interface pages""" baseurl = weburl + '/admin/bibrank/bibrankadmin.py/' _exports = ['', 'addrankarea', 'modifytranslations', 'modifycollection', 'showrankdetails', 'modifyrank', 'deleterank'] error_messages = [] for url in [baseurl + page for page in _exports]: # first try as guest: error_messages.extend(test_web_page_content(url, username='guest', expected_text= 'Authorization failure')) # then try as admin: error_messages.extend(test_web_page_content(url, username='admin')) if error_messages: self.fail(merge_error_messages(error_messages)) return def test_bibrank_admin_guide_availability(self): """bibrankadmin - availability of BibRank Admin guide pages""" url = weburl + '/help/admin/bibrank-admin-guide' - error_messages = test_web_page_content(url) + error_messages = test_web_page_content(url, + expected_text="BibRank Admin Guide") if error_messages: self.fail(merge_error_messages(error_messages)) return test_suite = make_test_suite(BibRankAdminWebPagesAvailabilityTest) if __name__ == "__main__": warn_user_about_tests_and_run(test_suite) diff --git a/modules/webaccess/lib/webaccess_regression_tests.py b/modules/webaccess/lib/webaccess_regression_tests.py index d5b5b53ad..08c770b99 100644 --- a/modules/webaccess/lib/webaccess_regression_tests.py +++ b/modules/webaccess/lib/webaccess_regression_tests.py @@ -1,68 +1,69 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """WebAccess Regression Test Suite.""" __revision__ = "$Id$" import unittest from invenio.config import weburl from invenio.testutils import make_test_suite, warn_user_about_tests_and_run, \ test_web_page_content, merge_error_messages class WebAccessWebPagesAvailabilityTest(unittest.TestCase): """Check WebAccess web pages whether they are up or not.""" def test_webaccess_admin_interface_availability(self): """webaccess - availability of WebAccess Admin interface pages""" baseurl = weburl + '/admin/webaccess/webaccessadmin.py/' _exports = ['', 'delegate_startarea', 'manageaccounts'] error_messages = [] for url in [baseurl + page for page in _exports]: # first try as guest: error_messages.extend(test_web_page_content(url, username='guest', expected_text= 'Authorization failure')) # then try as admin: error_messages.extend(test_web_page_content(url, username='admin')) if error_messages: self.fail(merge_error_messages(error_messages)) return def test_webaccess_admin_guide_availability(self): """webaccess - availability of WebAccess Admin guide pages""" url = weburl + '/help/admin/webaccess-admin-guide' - error_messages = test_web_page_content(url) + error_messages = test_web_page_content(url, + expected_text="WebAccess Admin Guide") if error_messages: self.fail(merge_error_messages(error_messages)) return test_suite = make_test_suite(WebAccessWebPagesAvailabilityTest) if __name__ == "__main__": warn_user_about_tests_and_run(test_suite) diff --git a/modules/websearch/lib/websearchadmin_regression_tests.py b/modules/websearch/lib/websearchadmin_regression_tests.py index 5c09f96d6..4ef42c5db 100644 --- a/modules/websearch/lib/websearchadmin_regression_tests.py +++ b/modules/websearch/lib/websearchadmin_regression_tests.py @@ -1,74 +1,75 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """WebSearch Admin Regression Test Suite.""" __revision__ = "$Id$" import unittest from invenio.config import weburl from invenio.testutils import make_test_suite, warn_user_about_tests_and_run, \ test_web_page_content, merge_error_messages class WebSearchAdminWebPagesAvailabilityTest(unittest.TestCase): """Check WebSearch Admin web pages whether they are up or not.""" def test_websearch_admin_interface_pages_availability(self): """websearchadmin - availability of WebSearch Admin interface pages""" baseurl = weburl + '/admin/websearch/websearchadmin.py' _exports = ['', '?mtype=perform_showall', '?mtype=perform_addcollection', '?mtype=perform_addcollectiontotree', '?mtype=perform_modifycollectiontree', '?mtype=perform_checkwebcollstatus', '?mtype=perform_checkcollectionstatus',] error_messages = [] for url in [baseurl + page for page in _exports]: # first try as guest: error_messages.extend(test_web_page_content(url, username='guest', expected_text= 'Authorization failure')) # then try as admin: error_messages.extend(test_web_page_content(url, username='admin')) if error_messages: self.fail(merge_error_messages(error_messages)) return def test_websearch_admin_guide_availability(self): """websearchadmin - availability of WebSearch Admin guide pages""" url = weburl + '/help/admin/websearch-admin-guide' - error_messages = test_web_page_content(url) + error_messages = test_web_page_content(url, + expected_text="WebSearch Admin Guide") if error_messages: self.fail(merge_error_messages(error_messages)) return test_suite = make_test_suite(WebSearchAdminWebPagesAvailabilityTest) if __name__ == "__main__": warn_user_about_tests_and_run(test_suite) diff --git a/modules/websubmit/lib/websubmitadmin_regression_tests.py b/modules/websubmit/lib/websubmitadmin_regression_tests.py index 0ac0ca610..9664a3cae 100644 --- a/modules/websubmit/lib/websubmitadmin_regression_tests.py +++ b/modules/websubmit/lib/websubmitadmin_regression_tests.py @@ -1,70 +1,71 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """WebSubmit Admin Regression Test Suite.""" __revision__ = "$Id$" import unittest from invenio.config import weburl from invenio.testutils import make_test_suite, warn_user_about_tests_and_run, \ test_web_page_content, merge_error_messages class WebSubmitAdminWebPagesAvailabilityTest(unittest.TestCase): """Check WebSubmit Admin web pages whether they are up or not.""" def test_websubmit_admin_interface_pages_availability(self): """websubmitadmin - availability of WebSubmit Admin interface pages""" baseurl = weburl + '/admin/websubmit/websubmitadmin.py/' _exports = ['', 'showall', 'doctypelist', 'doctypeadd', 'doctyperemove', 'actionlist', 'jschecklist', 'elementlist', 'functionlist'] error_messages = [] for url in [baseurl + page for page in _exports]: # first try as guest: error_messages.extend(test_web_page_content(url, username='guest', expected_text= 'Authorization failure')) # then try as admin: error_messages.extend(test_web_page_content(url, username='admin')) if error_messages: self.fail(merge_error_messages(error_messages)) return def test_websubmit_admin_guide_availability(self): """websubmitadmin - availability of WebSubmit Admin guide pages""" url = weburl + '/help/admin/websubmit-admin-guide' - error_messages = test_web_page_content(url) + error_messages = test_web_page_content(url, + expected_text="WebSubmit Admin Guide") if error_messages: self.fail(merge_error_messages(error_messages)) return test_suite = make_test_suite(WebSubmitAdminWebPagesAvailabilityTest) if __name__ == "__main__": warn_user_about_tests_and_run(test_suite)