コード例 #1
0
ファイル: testERP5Core.py プロジェクト: fedoraisahat/erp5
 def test_allowed_content_types_translated(self):
     """Tests allowed content types from the action menu are translated"""
     translation_service = DummyTranslationService()
     setGlobalTranslationService(translation_service)
     # assumes that we can add Business Template in template tool
     response = self.publish('%s/portal_templates' % self.portal_id,
                             self.auth)
     self.assertEqual(HTTP_OK, response.getStatus())
     self.assertTrue(('Business Template',
                      {}) in translation_service._translated['ui'])
     self.assertTrue(('Add ${portal_type}', {
         'portal_type': 'Business Template'
     }) in translation_service._translated['ui'])
コード例 #2
0
ファイル: testERP5Core.py プロジェクト: fedoraisahat/erp5
 def test_jump_action_translated(self):
     """Tests jump actions are translated"""
     translation_service = DummyTranslationService()
     setGlobalTranslationService(translation_service)
     # adds a new jump action to Template Tool portal type
     self.getTypesTool().getTypeInfo('Template Tool').newContent(
         portal_type='Action Information',
         reference='dummy_jump_action',
         title='Dummy Jump Action',
         action_permission='View',
         action_type='object_jump')
     response = self.publish('%s/portal_templates' % self.portal_id,
                             self.auth)
     self.assertEqual(HTTP_OK, response.getStatus())
     self.assertTrue(('Dummy Jump Action',
                      {}) in translation_service._translated['ui'])