Commit a99856b0 authored by Jérome Perrin's avatar Jérome Perrin

only erp5_core is installed. don't use person etc.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11263 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 31e4e76a
...@@ -157,29 +157,38 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -157,29 +157,38 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertEquals('%s/login_form' % self.portal.absolute_url(), self.assertEquals('%s/login_form' % self.portal.absolute_url(),
response.getHeader('Location')) response.getHeader('Location'))
def test_view_module(self): def test_view_tools(self):
"""Test we can view a module.""" """Test we can view tools."""
for module in ('person_module', 'organisation_module', 'currency_module'): for tool in ('portal_categories',
response = self.publish('%s/%s/view' % (self.portal_id, module), self.auth) 'portal_templates',
self.assertEquals(HTTP_OK, response.getStatus()) 'portal_orders',
'portal_deliveries',
'portal_rules',
'portal_alarms',):
response = self.publish('%s/%s/view' % (self.portal_id, tool), self.auth)
self.assertEquals(HTTP_OK, response.getStatus(),
"%s: %s" % (tool, response.getStatus()))
def test_allowed_content_types_translated(self): def test_allowed_content_types_translated(self):
"""Tests allowed content types from the action menu are translated""" """Tests allowed content types from the action menu are translated"""
translation_service = DummyTranslationService() translation_service = DummyTranslationService()
setGlobalTranslationService(translation_service) setGlobalTranslationService(translation_service)
# assumes that we can add Person in person_module # assumes that we can add Business Template in template tool
response = self.publish('%s/person_module/view' % self.portal_id, self.auth) response = self.publish('%s/portal_templates/view' %
self.portal_id, self.auth)
self.assertEquals(HTTP_OK, response.getStatus()) self.assertEquals(HTTP_OK, response.getStatus())
self.failUnless(('Person', {}) in translation_service._translated['ui']) self.failUnless(('Business Template', {})
self.failUnless(('Add ${portal_type}', {'portal_type': 'Person'}) in in translation_service._translated['ui'])
self.failUnless(
('Add ${portal_type}', {'portal_type': 'Business Template'}) in
translation_service._translated['ui']) translation_service._translated['ui'])
def test_jump_action_translated(self): def test_jump_action_translated(self):
"""Tests jump actions are translated""" """Tests jump actions are translated"""
translation_service = DummyTranslationService() translation_service = DummyTranslationService()
setGlobalTranslationService(translation_service) setGlobalTranslationService(translation_service)
# adds a new jump action to Person Module portal type # adds a new jump action to Template Tool portal type
self.getTypesTool().getTypeInfo('Person Module').addAction( self.getTypesTool().getTypeInfo('Template Tool').addAction(
id='dummy_jump_action', id='dummy_jump_action',
name='Dummy Jump Action', name='Dummy Jump Action',
action='', action='',
...@@ -187,7 +196,8 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -187,7 +196,8 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
permission='View', permission='View',
category='object_jump', category='object_jump',
visible=1) visible=1)
response = self.publish('%s/person_module/view' % self.portal_id, self.auth) response = self.publish('%s/portal_templates/view' %
self.portal_id, self.auth)
self.assertEquals(HTTP_OK, response.getStatus()) self.assertEquals(HTTP_OK, response.getStatus())
self.failUnless(('Dummy Jump Action', {}) in self.failUnless(('Dummy Jump Action', {}) in
translation_service._translated['ui']) translation_service._translated['ui'])
......
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