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