Commit e66d7a6f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

cleanup (i.e. fix typos, remove needless white spaces, needless imports etc.).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28939 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent efb199b8
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
# Romain Courteaud <romain@nexedi.com> # Romain Courteaud <romain@nexedi.com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential # programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs # consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial # End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software # guarantees and support are strongly adviced to contract a Free Software
# Service Company # Service Company
# #
# This program is Free Software; you can redistribute it and/or # This program is Free Software; you can redistribute it and/or
...@@ -28,10 +28,8 @@ ...@@ -28,10 +28,8 @@
# #
############################################################################## ##############################################################################
import os
import re import re
import unittest import unittest
import random
import transaction import transaction
from AccessControl import Unauthorized from AccessControl import Unauthorized
...@@ -53,7 +51,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -53,7 +51,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional):
manager_password = 'zope' manager_password = 'zope'
website_id = 'test' website_id = 'test'
def getTitle(self): def getTitle(self):
return "ERP5Web" return "ERP5Web"
...@@ -132,7 +129,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -132,7 +129,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional):
self.tic() self.tic()
return websection return websection
def setupWebSitePages(self, prefix, suffix=None, version='0.1', def setupWebSitePages(self, prefix, suffix=None, version='0.1',
language_list=LANGUAGE_LIST, **kw): language_list=LANGUAGE_LIST, **kw):
""" """
...@@ -188,7 +184,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -188,7 +184,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional):
except: except:
self.fail('Cataloging of the Web Site failed.') self.fail('Cataloging of the Web Site failed.')
def test_02_EditSimpleWebPage(self, quiet=quiet, run=run_all_test): def test_02_EditSimpleWebPage(self, quiet=quiet, run=run_all_test):
""" """
Simple Case of creating a web page. Simple Case of creating a web page.
...@@ -592,7 +587,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -592,7 +587,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional):
[ w.getReference() for w in \ [ w.getReference() for w in \
websection.getDocumentValueList(sort_on=[('reference', 'DESC')])]) websection.getDocumentValueList(sort_on=[('reference', 'DESC')])])
self.assertEqual(['13' , '03', '02', '01'], self.assertEqual(['13' , '03', '02', '01'],
[ w.getTitle() for w in \ [ w.getTitle() for w in \
websection.getDocumentValueList(sort_on=[('reference', 'DESC')])]) websection.getDocumentValueList(sort_on=[('reference', 'DESC')])])
...@@ -607,7 +601,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -607,7 +601,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional):
websection.WebSection_getDocumentValueListBase(all_languages=1, websection.WebSection_getDocumentValueListBase(all_languages=1,
sort_on=[('title', 'ASC')])]) sort_on=[('title', 'ASC')])])
self.assertEqual(['F' , 'E', 'D', 'C' , 'B' , 'A'], self.assertEqual(['F' , 'E', 'D', 'C' , 'B' , 'A'],
[ w.getReference() for w in \ [ w.getReference() for w in \
websection.WebSection_getDocumentValueListBase(all_languages=1, websection.WebSection_getDocumentValueListBase(all_languages=1,
...@@ -1039,7 +1032,6 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1039,7 +1032,6 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
self.assertSameSet((), self.assertSameSet((),
section.get_local_roles_for_userid(person_reference)) section.get_local_roles_for_userid(person_reference))
def test_03_WebSection_getDocumentValueListSecurity(self, quiet=quiet, run=run_all_test): def test_03_WebSection_getDocumentValueListSecurity(self, quiet=quiet, run=run_all_test):
""" Test WebSection_getDocumentValueList behaviour and security""" """ Test WebSection_getDocumentValueList behaviour and security"""
if not run: return if not run: return
...@@ -1093,8 +1085,6 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1093,8 +1085,6 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
text_format='text/plain', text_format='text/plain',
text_content='Hello, World!') text_content='Hello, World!')
transaction.commit() transaction.commit()
self.changeUser('erp5user') self.changeUser('erp5user')
self.tic() self.tic()
...@@ -1182,7 +1172,6 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1182,7 +1172,6 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
self.assertEquals(page_jp_0.getUid(), self.assertEquals(page_jp_0.getUid(),
section.WebSection_getDocumentValueList()[0].getUid()) section.WebSection_getDocumentValueList()[0].getUid())
def test_04_ExpireUserAction(self, quiet=quiet, run=run_all_test): def test_04_ExpireUserAction(self, quiet=quiet, run=run_all_test):
""" Test the expire user action""" """ Test the expire user action"""
if not run: return if not run: return
...@@ -1340,7 +1329,6 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1340,7 +1329,6 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
category_4_copy)[0]['new_id']] category_4_copy)[0]['new_id']]
self.assertEquals(category_4_clone.getPortalType(), 'Category') self.assertEquals(category_4_clone.getPortalType(), 'Category')
def test_08_createAndrenameCategory(self, quiet=quiet, run=run_all_test): def test_08_createAndrenameCategory(self, quiet=quiet, run=run_all_test):
""" Test to create or rename categories with many users """ """ Test to create or rename categories with many users """
if not run: return if not run: return
......
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