# HG changeset patch # User Sylvain Thénault # Date 1396626960 -7200 # Node ID 4693bf7ffb683aaed8b2ef5878299670d00d653e # Parent 2bd234de9ff31b3a3826e0feea23e55c5ade51f6 [test] simplify setup of sobjects/test/unittest_supervising.py diff -r 2bd234de9ff3 -r 4693bf7ffb68 sobjects/test/unittest_supervising.py --- a/sobjects/test/unittest_supervising.py Fri Apr 04 17:54:29 2014 +0200 +++ b/sobjects/test/unittest_supervising.py Fri Apr 04 17:56:00 2014 +0200 @@ -29,10 +29,9 @@ def setup_database(self): with self.admin_access.client_cnx() as cnx: cnx.create_entity('Card', title=u"une news !", content=u"cubicweb c'est beau") - cnx.create_entity('Card', title=u"une autre news !", content=u"cubicweb c'est beau") + card = cnx.create_entity('Card', title=u"une autre news !", content=u"cubicweb c'est beau") cnx.create_entity('Bookmark', title=u"un signet !", path=u"view?vid=index") - cnx.create_entity('Comment', content=u"Yo !") - cnx.execute('SET C comments B WHERE B title "une autre news !", C content "Yo !"') + cnx.create_entity('Comment', content=u"Yo !", comments=card) cnx.commit() self.vreg.config.global_set_option('supervising-addrs', 'test@logilab.fr')