hooks/test/unittest_syncschema.py
branchstable
changeset 4840 c02a340cd1da
parent 4826 7eba168407c3
child 4845 dc351b96f596
child 4927 19fd1952ad63
equal deleted inserted replaced
4839:f482dbdf2f8c 4840:c02a340cd1da
   279         self.assertIn(target.eid, [item[0] for item in rset])
   279         self.assertIn(target.eid, [item[0] for item in rset])
   280         assert req.execute('SET A fulltextindexed FALSE '
   280         assert req.execute('SET A fulltextindexed FALSE '
   281                             'WHERE E is CWEType, E name "Email", A is CWAttribute,'
   281                             'WHERE E is CWEType, E name "Email", A is CWAttribute,'
   282                             'A from_entity E, A relation_type R, R name "subject"')
   282                             'A from_entity E, A relation_type R, R name "subject"')
   283         self.commit()
   283         self.commit()
   284         rset = req.execute('Any X Where X has_text "rick.roll"')
   284         rset = req.execute('Any X WHERE X has_text "rick.roll"')
   285         self.failIf(rset)
   285         self.failIf(rset)
   286         assert req.execute('SET A fulltextindexed TRUE '
   286         assert req.execute('SET A fulltextindexed TRUE '
   287                            'WHERE A from_entity E, A relation_type R, '
   287                            'WHERE A from_entity E, A relation_type R, '
   288                            'E name "Email", R name "subject"')
   288                            'E name "Email", R name "subject"')
   289         self.commit()
   289         self.commit()
   298         rset = req.execute('Any X WHERE X has_text "rick.roll"')
   298         rset = req.execute('Any X WHERE X has_text "rick.roll"')
   299         self.assertIn(req.user.eid, [item[0] for item in rset])
   299         self.assertIn(req.user.eid, [item[0] for item in rset])
   300         assert self.execute('SET R fulltext_container NULL '
   300         assert self.execute('SET R fulltext_container NULL '
   301                             'WHERE R name "use_email"')
   301                             'WHERE R name "use_email"')
   302         self.commit()
   302         self.commit()
   303         rset = self.execute('Any X Where X has_text "rick.roll"')
   303         rset = self.execute('Any X WHERE X has_text "rick.roll"')
   304         self.assertIn(target.eid, [item[0] for item in rset])
   304         self.assertIn(target.eid, [item[0] for item in rset])
   305         assert self.execute('SET R fulltext_container "subject" '
   305         assert self.execute('SET R fulltext_container "subject" '
   306                             'WHERE R name "use_email"')
   306                             'WHERE R name "use_email"')
   307         self.commit()
   307         self.commit()
   308         rset = req.execute('Any X WHERE X has_text "rick.roll"')
   308         rset = req.execute('Any X WHERE X has_text "rick.roll"')