Commit 68630914 authored by Georgios Dagkakis's avatar Georgios Dagkakis

testBase: Add a test with document id that has non-ascii characters

parent 906794ba
......@@ -1406,6 +1406,25 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
newSecurityManager(None, test_user)
assertActorHistoryEqual([user_1_title, user_2_title, user_3_user_id, existing_non_erp5_user_id])
def test_idWithSpecialCharacter(self, quiet=quiet, run=run_all_test):
"""
Test that an id with non-ascii characters
can well be used an indexed
"""
portal = self.getPortal()
portal_type = "Organisation"
module = portal.getDefaultModule(portal_type=portal_type)
obj = module.newContent(
id='tést',
portal_type=portal_type
)
self.tic() # no error in indexation
# Check that the new object is retreivable by its id
self.assertEqual(obj.getId(), 'tést')
self.assertIsInstance(obj.getId(), str)
self.assertEqual(module._getOb(obj.getId()).getId(), obj.getId())
self.assertIsInstance(module._getOb(obj.getId()).getId(), str)
class TestERP5PropertyManager(unittest.TestCase):
"""Tests for ERP5PropertyManager.
......
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