hooks/test/unittest_synccomputed.py
changeset 10192 365e5a0287d6
parent 9967 e65873ad0371
child 10662 10942ed172de
--- a/hooks/test/unittest_synccomputed.py	Mon Feb 02 22:05:00 2015 +0100
+++ b/hooks/test/unittest_synccomputed.py	Mon Feb 02 23:17:15 2015 +0100
@@ -134,6 +134,13 @@
             self.assertEqual(rset[0][0], 2014 - 1990)
 
 
+    def test_recompute_on_ambiguous_relation(self):
+        # check we don't end up with TypeResolverException as in #4901163
+        with self.admin_access.client_cnx() as cnx:
+            societe = cnx.create_entity('Societe', nom=u'Foo')
+            cnx.create_entity('MirrorEntity', mirror_of=societe, extid=u'1')
+            cnx.commit()
+
 if __name__ == '__main__':
     from logilab.common.testlib import unittest_main
     unittest_main()