hooks/test/unittest_syncschema.py
changeset 4845 dc351b96f596
parent 4829 3b79a0fc91db
parent 4840 c02a340cd1da
child 4930 9fcc9ae2aebe
equal deleted inserted replaced
4844:ad78b118b124 4845:dc351b96f596
   264         self.assertIn(target.eid, [item[0] for item in rset])
   264         self.assertIn(target.eid, [item[0] for item in rset])
   265         assert req.execute('SET A fulltextindexed FALSE '
   265         assert req.execute('SET A fulltextindexed FALSE '
   266                             'WHERE E is CWEType, E name "Email", A is CWAttribute,'
   266                             'WHERE E is CWEType, E name "Email", A is CWAttribute,'
   267                             'A from_entity E, A relation_type R, R name "subject"')
   267                             'A from_entity E, A relation_type R, R name "subject"')
   268         self.commit()
   268         self.commit()
   269         rset = req.execute('Any X Where X has_text "rick.roll"')
   269         rset = req.execute('Any X WHERE X has_text "rick.roll"')
   270         self.failIf(rset)
   270         self.failIf(rset)
   271         assert req.execute('SET A fulltextindexed TRUE '
   271         assert req.execute('SET A fulltextindexed TRUE '
   272                            'WHERE A from_entity E, A relation_type R, '
   272                            'WHERE A from_entity E, A relation_type R, '
   273                            'E name "Email", R name "subject"')
   273                            'E name "Email", R name "subject"')
   274         self.commit()
   274         self.commit()
   283         rset = req.execute('Any X WHERE X has_text "rick.roll"')
   283         rset = req.execute('Any X WHERE X has_text "rick.roll"')
   284         self.assertIn(req.user.eid, [item[0] for item in rset])
   284         self.assertIn(req.user.eid, [item[0] for item in rset])
   285         assert self.execute('SET R fulltext_container NULL '
   285         assert self.execute('SET R fulltext_container NULL '
   286                             'WHERE R name "use_email"')
   286                             'WHERE R name "use_email"')
   287         self.commit()
   287         self.commit()
   288         rset = self.execute('Any X Where X has_text "rick.roll"')
   288         rset = self.execute('Any X WHERE X has_text "rick.roll"')
   289         self.assertIn(target.eid, [item[0] for item in rset])
   289         self.assertIn(target.eid, [item[0] for item in rset])
   290         assert self.execute('SET R fulltext_container "subject" '
   290         assert self.execute('SET R fulltext_container "subject" '
   291                             'WHERE R name "use_email"')
   291                             'WHERE R name "use_email"')
   292         self.commit()
   292         self.commit()
   293         rset = req.execute('Any X WHERE X has_text "rick.roll"')
   293         rset = req.execute('Any X WHERE X has_text "rick.roll"')