--- a/server/test/unittest_repository.py Wed Mar 25 10:10:24 2015 +0100
+++ b/server/test/unittest_repository.py Wed Apr 22 10:08:14 2015 +0200
@@ -51,10 +51,10 @@
with self.assertRaises(ValidationError) as wraperr:
cnx.execute('INSERT Societe S: S nom "Logilab", S type "SSLL", S cp "75013"')
self.assertEqual(
- {'cp': u'cp is part of violated unicity constraint',
- 'nom': u'nom is part of violated unicity constraint',
- 'type': u'type is part of violated unicity constraint',
- 'unicity constraint': u'some relations violate a unicity constraint'},
+ {'cp': u'%(KEY-rtype)s is part of violated unicity constraint',
+ 'nom': u'%(KEY-rtype)s is part of violated unicity constraint',
+ 'type': u'%(KEY-rtype)s is part of violated unicity constraint',
+ '': u'some relations violate a unicity constraint'},
wraperr.exception.args[1])
def test_unique_together_schema(self):
@@ -393,6 +393,13 @@
cnx.commit()
self.assertEqual(len(c.reverse_fiche), 1)
+ def test_delete_computed_relation_nonregr(self):
+ with self.admin_access.repo_cnx() as cnx:
+ c = cnx.create_entity('Personne', nom=u'Adam', login_user=cnx.user.eid)
+ cnx.commit()
+ c.cw_delete()
+ cnx.commit()
+
def test_cw_set_in_before_update(self):
# local hook
class DummyBeforeHook(Hook):