Commit 1d749ac3 authored by Jérome Perrin's avatar Jérome Perrin

use the opportunity that this test installs all business template to check that

all proxy fields have valid references.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16320 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1de78afa
...@@ -111,7 +111,7 @@ class TestXHTML(ERP5TypeTestCase): ...@@ -111,7 +111,7 @@ class TestXHTML(ERP5TypeTestCase):
self.login() self.login()
self.enableDefaultSitePreference() self.enableDefaultSitePreference()
def login(self, quiet=0, run=run_all_test): def login(self):
uf = self.getPortal().acl_users uf = self.getPortal().acl_users
uf._doAddUser('seb', '', ['Manager'], []) uf._doAddUser('seb', '', ['Manager'], [])
uf._doAddUser('ERP5TypeTestCase', '', ['Manager'], []) uf._doAddUser('ERP5TypeTestCase', '', ['Manager'], [])
...@@ -124,6 +124,18 @@ class TestXHTML(ERP5TypeTestCase): ...@@ -124,6 +124,18 @@ class TestXHTML(ERP5TypeTestCase):
default_site_preference = portal_preferences.default_site_preference default_site_preference = portal_preferences.default_site_preference
portal_workflow.doActionFor(default_site_preference, 'enable_action') portal_workflow.doActionFor(default_site_preference, 'enable_action')
def test_deadProxyFields(self):
# check that all proxy fields defined in business templates have a valid
# target
skins_tool = self.portal.portal_skins
for field_path, field in skins_tool.ZopeFind(
skins_tool, obj_metatypes=['ProxyField'], search_sub=1):
self.assertNotEqual(None, field.getRecursiveTemplateField(),
'%s\nform_id:%s\nfield_id:%s\n' % (field_path,
field.get_value('form_id'),
field.get_value('field_id')))
def validate_xhtml(source): def validate_xhtml(source):
import popen2 import popen2
......
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