diff -r cd760c411242 -r 6350e0a482d5 cubicweb/server/test/unittest_querier.py --- a/cubicweb/server/test/unittest_querier.py Tue Dec 12 11:17:25 2017 +0100 +++ b/cubicweb/server/test/unittest_querier.py Fri Jan 12 11:02:52 2018 +0100 @@ -1404,6 +1404,16 @@ self.assertEqual(len(rset.rows), 1) self.assertEqual(rset.description, [('CWUser',)]) + # computed relation tests ################################################## + + def test_computed_relation_write_queries(self): + """Ensure we can use computed relation in WHERE clause of write queries""" + with self.admin_access.cnx() as cnx: + cnx.execute('INSERT Personne P: P nom "user", P login_user U WHERE NOT U user_login P') + cnx.execute('DELETE P login_user U WHERE U user_login P') + cnx.execute('DELETE Personne P WHERE U user_login P') + cnx.execute('SET U login "people" WHERE U user_login P') + # ZT datetime tests ######################################################## def test_tz_datetime(self):