# HG changeset patch # User Sylvain Thénault # Date 1442393796 -7200 # Node ID 5b646ab6821bcd21730d95f4f413947520a4dd8f # Parent da712d3f0601e4294d895ea51dfb65f908f7d71b [server] add test demonstrating cache update pb since cw > 3.21 Fixed by the previous changeset. diff -r da712d3f0601 -r 5b646ab6821b server/test/unittest_repository.py --- a/server/test/unittest_repository.py Thu Dec 10 16:58:45 2015 +0100 +++ b/server/test/unittest_repository.py Wed Sep 16 10:56:36 2015 +0200 @@ -339,6 +339,15 @@ self.assertEqual(cm.exception.errors, {'hip': 'hop'}) cnx.rollback() + def test_attribute_cache(self): + with self.admin_access.repo_cnx() as cnx: + bk = cnx.create_entity('Bookmark', title=u'index', path=u'/') + cnx.commit() + self.assertEqual(bk.title, 'index') + bk.cw_set(title=u'root') + self.assertEqual(bk.title, 'root') + cnx.commit() + self.assertEqual(bk.title, 'root') class SchemaDeserialTC(CubicWebTC):