Commit 02a4eff5 authored by Sebastien Robin's avatar Sebastien Robin

fixed usages of ERP5TypeTestCase because this class

is only a proxy now

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42531 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 58a31895
......@@ -252,7 +252,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
self.logout()
transaction.commit()
self.tic()
ERP5TypeTestCase.login(self, 'usual_member')
super(TestERP5Core, self).login('usual_member')
expected = {'folder': [],
'global': [],
'object': [],
......
......@@ -725,7 +725,7 @@ return True
self.assertTrue(len(large_image) > len(small_image))
def _test_document_publication_workflow(self, portal_type, transition):
ERP5TypeTestCase.login(self)
super(TestERP5WebWithDms, self).login()
document = self.portal.web_page_module.newContent(portal_type=portal_type)
self.portal.portal_workflow.doActionFor(document, transition)
......
......@@ -389,7 +389,7 @@ class TestTranslation(ERP5TypeTestCase):
self.portal.ERP5Site_updateTranslationTable()
def afterSetUp(self):
ERP5TypeTestCase.afterSetUp(self)
super(TestTranslation, self).afterSetUp()
self._setUpTranslations()
# replace Localizer.utils.lang_negotiator in MessageCatalog to return
......@@ -429,7 +429,7 @@ class TestTranslation(ERP5TypeTestCase):
self.portal.manage_delObjects(['myzpt'])
self.stepTic()
ERP5TypeTestCase.beforeTearDown(self)
super(TestTranslation, self).beforeTearDown()
def test_Localizer_translation(self):
# basically, test afterSetUp worked...
......
......@@ -1788,8 +1788,7 @@ class TestSolvingPackingList(TestPackingListMixin, ERP5TypeTestCase):
self.portal.portal_solvers.manage_delObjects(self.added_target_solver_list)
transaction.commit()
self.tic()
beforeTearDown = getattr(TestPackingListMixin, 'beforeTearDown',
ERP5TypeTestCase.beforeTearDown)
super(TestSolvingPackingList, self).beforeTearDown()
beforeTearDown(self)
@UnrestrictedMethod
......
......@@ -1079,7 +1079,7 @@ class TestDocument(TestDocumentMixin):
self.stepTic()
# login as another user
ERP5TypeTestCase.login(self, 'user1')
super(TestDocument, self).login('user1')
document_4 = portal.document_module.newContent(
portal_type = 'Presentation',
description = 'owner different user contributing document',
......@@ -1160,7 +1160,7 @@ class TestDocument(TestDocumentMixin):
self.assertSameSet([], getAdvancedSearchStringResultList(**kw))
# only my docs
ERP5TypeTestCase.login(self, 'user1')
super(TestDocument, self).login('user1')
kw = {'searchabletext_any': 'owner'}
# should return all documents matching a word no matter if we're owner or not
self.assertSameSet([web_page_1, document_4], getAdvancedSearchStringResultList(**kw))
......@@ -1471,7 +1471,7 @@ class TestDocument(TestDocumentMixin):
self.stepTic()
# login as first one
ERP5TypeTestCase.login(self, 'contributor1')
super(TestDocument, self).login('contributor1')
doc = document_module.newContent(portal_type='File',
title='Test1')
self.stepTic()
......@@ -1480,7 +1480,7 @@ class TestDocument(TestDocumentMixin):
doc.getContributorValueList())
# login as second one
ERP5TypeTestCase.login(self, 'contributor2')
super(TestDocument, self).login('contributor2')
doc.edit(title='Test2')
self.stepTic()
self.login()
......@@ -2396,7 +2396,7 @@ class TestDocumentWithSecurity(TestDocumentMixin):
those properties are taken into account when the user
views an image
"""
ERP5TypeTestCase.login(self, 'yusei')
super(TestDocument, self).login('yusei')
preference_tool = self.portal.portal_preferences
#get the thumbnail sizes defined by default on default site preference
default_thumbnail_image_height = \
......
......@@ -97,7 +97,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
def publish(self, *args, **kw):
kw['handle_errors'] = not debug
return ERP5TypeTestCase.publish(self, *args, **kw)
return super(TestOOoStyle, self).publish(*args, **kw)
def _validate(self, odf_file_data):
error_list = self.validator.validate(odf_file_data)
......
......@@ -115,7 +115,7 @@ class SecurityTestCase(ERP5TypeTestCase):
"""
def _setup(self):
"""set up and login as default user"""
ERP5TypeTestCase._setup(self)
super(SecurityTestCase, self)._setup()
self.login()
self.portal = self.getPortal()
self.workflow_tool = self.portal.portal_workflow
......@@ -125,7 +125,7 @@ class SecurityTestCase(ERP5TypeTestCase):
"""
transaction.abort()
self.portal.portal_caches.clearAllCache()
ERP5TypeTestCase.tearDown(self)
super(SecurityTestCase, self).tearDown()
def _loginAsUser(self, username):
"""Login as a given username. The user must exist.
......
......@@ -62,7 +62,7 @@ class PropertySheetTestCase(ERP5TypeTestCase):
"""
def setUp(self):
"""Set up the fixture. """
ERP5TypeTestCase.setUp(self)
super(PropertySheetTestCase,self).setUp()
installRealClassTool(self.getPortal())
def tearDown(self):
......@@ -82,7 +82,7 @@ class PropertySheetTestCase(ERP5TypeTestCase):
ti._setTypePropertySheetList(list(property_sheet_set))
transaction.commit()
ttool.resetDynamicDocuments()
ERP5TypeTestCase.tearDown(self)
super(PropertySheetTestCase, self).tearDown()
def _addProperty(self, portal_type_name, property_definition_code):
"""quickly add a property to a type information."""
......
......@@ -53,7 +53,7 @@ class TestMemcachedTool(ERP5TypeTestCase):
return "MemcachedTool"
def setUp(self):
ERP5TypeTestCase.setUp(self)
super(TestMemcachedTool, self).setUp()
installRealMemcachedTool(self.getPortal())
memcached_tool = self.getPortal().portal_memcached
#create Memcache Plugin
......
......@@ -81,7 +81,7 @@ class TestXMLMatrix(ERP5TypeTestCase, LogInterceptor):
self.portal_activities_backup)
get_transaction().commit()
del self.portal_activities_backup
return ERP5TypeTestCase.beforeTearDown(self)
return super(TestXMLMatrix, self).beforeTearDown()
def test_01_RenameCellRange(self):
......
......@@ -17,7 +17,7 @@ os.environ['LC_ALL'] = 'C'
class ImageMagickTransformsTest(ERP5TypeTestCase, ZopeTestCase.Functional):
def afterSetUp(self):
ERP5TypeTestCase.afterSetUp(self)
super(ImageMagickTransformsTest, self).afterSetUp()
self.pt = self.portal.portal_transforms
def test_image_to_bmp(self):
......
......@@ -72,9 +72,6 @@ class TestDeferredConnection(ERP5TypeTestCase):
def getTitle(self):
return "Deferred Connection"
def setUp(self):
ERP5TypeTestCase.setUp(self)
def afterSetUp(self):
self.login()
......
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