Commit 3296e70c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use absolute_url(relative=1) instead of getRelativeUrl() in...

use absolute_url(relative=1) instead of getRelativeUrl() in ERP5Site_checkDataWithScript's test, because 'portal_categories/' is eliminated in Category's getRelativeUrl() value.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26384 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8d24e092
......@@ -1315,7 +1315,7 @@ class TestERP5Base(ERP5TypeTestCase):
def test_ERP5Site_checkDataWithScript(self):
test = 'test_ERP5Site_checkDataWithScript'
createZODBPythonScript(self.getSkinsTool().custom, test, '',
'return context.getRelativeUrl(),')
'return context.absolute_url(relative=1),')
organisation = self.getOrganisationModule() \
.newContent(portal_type='Organisation')
......@@ -1335,7 +1335,7 @@ class TestERP5Base(ERP5TypeTestCase):
self.assertEquals(len(relative_url_list), len(set(relative_url_list)))
for obj in organisation, person, person.getDefaultEmailValue():
self.assertTrue(obj.getRelativeUrl() in relative_url_list)
self.assertTrue(obj.absolute_url(relative=1) in relative_url_list)
for relative_url in relative_url_list:
self.assertTrue('/' in relative_url)
self.assertNotEquals(None, self.portal.unrestrictedTraverse(relative_url))
......
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