Commit d3f54f9a authored by Sebastien Robin's avatar Sebastien Robin

added title


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1979 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9cba124b
...@@ -59,6 +59,9 @@ class TestCMFActivity(ERP5TypeTestCase): ...@@ -59,6 +59,9 @@ class TestCMFActivity(ERP5TypeTestCase):
title2 = 'title2' title2 = 'title2'
company_id2 = 'Coramy' company_id2 = 'Coramy'
def getTitle(self):
return "CMFActivity"
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
""" """
Return the list of business templates. Return the list of business templates.
......
...@@ -58,6 +58,9 @@ class TestCMFCategory(ERP5TypeTestCase): ...@@ -58,6 +58,9 @@ class TestCMFCategory(ERP5TypeTestCase):
region2 = 'europe/west/germany' region2 = 'europe/west/germany'
region_list = [region1, region2] region_list = [region1, region2]
def getTitle(self):
return "CMFCategory"
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
""" """
Return the list of business templates. Return the list of business templates.
......
...@@ -77,6 +77,9 @@ class TestAlarm(ERP5TypeTestCase): ...@@ -77,6 +77,9 @@ class TestAlarm(ERP5TypeTestCase):
quantity = 10 quantity = 10
base_price = 0.7832 base_price = 0.7832
def getTitle(self):
return "Alarm"
def test_01_HasEverything(self, quiet=0, run=run_all_test): def test_01_HasEverything(self, quiet=0, run=run_all_test):
# Test if portal_synchronizations was created # Test if portal_synchronizations was created
if not run: return if not run: return
......
...@@ -15,13 +15,14 @@ class TestERP5Type(ERP5TypeTestCase): ...@@ -15,13 +15,14 @@ class TestERP5Type(ERP5TypeTestCase):
# Some helper methods # Some helper methods
#def afterSetUp(self): def getTitle(self):
return "ERP5Type"
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
""" """
Return the list of business templates. Return the list of business templates.
""" """
return ('erp5_common', ) return ()
def getRandomString(self): def getRandomString(self):
return str(randint(-10000000,100000000)) return str(randint(-10000000,100000000))
...@@ -48,7 +49,7 @@ class TestERP5Type(ERP5TypeTestCase): ...@@ -48,7 +49,7 @@ class TestERP5Type(ERP5TypeTestCase):
# Test if portal_templates has getId method (RAD) # Test if portal_templates has getId method (RAD)
self.failUnless(self.getTemplateTool().getId() == 'portal_templates') self.failUnless(self.getTemplateTool().getId() == 'portal_templates')
def testTemplateToolHasGetId(self): def testCategoryToolHasGetId(self):
# Test if portal_categories has getId method (RAD) # Test if portal_categories has getId method (RAD)
self.failUnless(self.getCategoryTool().getId() == 'portal_categories') self.failUnless(self.getCategoryTool().getId() == 'portal_categories')
...@@ -65,16 +66,12 @@ class TestERP5Type(ERP5TypeTestCase): ...@@ -65,16 +66,12 @@ class TestERP5Type(ERP5TypeTestCase):
def testBusinessTemplate(self): def testBusinessTemplate(self):
# Create a business template and test if portal_type matches # Create a business template and test if portal_type matches
# Make a extension tests on basic accessors # Make a extension tests on basic accessors
from Products.ERP5.Document import addBusinessTemplate
portal_templates = self.getTemplateTool() portal_templates = self.getTemplateTool()
new_id = portal_templates.generateNewId() business_template = self.getTemplateTool().newContent(portal_type="Business Template") # Fails Why ?
#bt = self.getTemplateTool().newContent(portal_type="Business Template") # Fails Why ?
# may be because there is # may be because there is
# no "Business Template" # no "Business Template"
# in portal_types, it may # in portal_types, it may
# be added to erp5_common # be added to erp5_common
addBusinessTemplate(portal_templates, new_id)
business_template = getattr(portal_templates, new_id)
self.failUnless(business_template.getPortalType() == 'Business Template') self.failUnless(business_template.getPortalType() == 'Business Template')
# Test simple string accessor # Test simple string accessor
test_string = self.getRandomString() test_string = self.getRandomString()
......
...@@ -55,6 +55,9 @@ class TestXMLMatrix(ERP5TypeTestCase): ...@@ -55,6 +55,9 @@ class TestXMLMatrix(ERP5TypeTestCase):
""" """
return ('erp5_trade',) return ('erp5_trade',)
def getTitle(self):
return "XMLMatrix"
def afterSetUp(self, quiet=1, run=1): def afterSetUp(self, quiet=1, run=1):
uf = self.getPortal().acl_users uf = self.getPortal().acl_users
uf._doAddUser('manager', '', ['Manager'], []) uf._doAddUser('manager', '', ['Manager'], [])
......
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