[server] add test demonstrating cache update pb since cw > 3.21
Fixed by the previous changeset.
--- 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):