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