[test] Use store.prepare_insert_relation instead of deprecated relate method
authorDenis Laxalde <denis.laxalde@logilab.fr>
Fri, 26 Jun 2015 17:01:03 +0200
changeset 10459 5ccc3bd8927e
parent 10458 9071db303c0c
child 10460 d260722f2453
[test] Use store.prepare_insert_relation instead of deprecated relate method Follow-up for 1f5026e7d848. Related to #5040344.
dataimport/test/unittest_dataimport.py
--- a/dataimport/test/unittest_dataimport.py	Wed Jun 24 23:30:47 2015 +0200
+++ b/dataimport/test/unittest_dataimport.py	Fri Jun 26 17:01:03 2015 +0200
@@ -18,7 +18,7 @@
             group_eid = store.prepare_insert_entity('CWGroup', name=u'grp')
             user_eid = store.prepare_insert_entity('CWUser', login=u'lgn',
                                                    upassword=u'pwd')
-            store.relate(user_eid, 'in_group', group_eid)
+            store.prepare_insert_relation(user_eid, 'in_group', group_eid)
             cnx.commit()
             users = cnx.execute('CWUser X WHERE X login "lgn"')
             self.assertEqual(1, len(users))