test/unittest_rset.py
changeset 2635 c94df21f7ab2
parent 2286 5dd33f9b7b84
child 2773 b2530e3e0afb
child 3016 5787d1cc8106
equal deleted inserted replaced
2634:273eec072cf8 2635:c94df21f7ab2
   344                           set(['CWUser',]))
   344                           set(['CWUser',]))
   345         self.assertEquals(set(e.e_schema.type for e in rset.entities(1)),
   345         self.assertEquals(set(e.e_schema.type for e in rset.entities(1)),
   346                           set(['CWGroup',]))
   346                           set(['CWGroup',]))
   347 
   347 
   348     def test_printable_rql(self):
   348     def test_printable_rql(self):
   349         rset = self.execute(u'CWEType X WHERE X final FALSE, X meta FALSE')
   349         rset = self.execute(u'CWEType X WHERE X final FALSE')
   350         self.assertEquals(rset.printable_rql(),
   350         self.assertEquals(rset.printable_rql(),
   351                           'Any X WHERE X final FALSE, X meta FALSE, X is CWEType')
   351                           'Any X WHERE X final FALSE, X is CWEType')
   352 
       
   353 
   352 
   354     def test_searched_text(self):
   353     def test_searched_text(self):
   355         rset = self.execute(u'Any X WHERE X has_text "foobar"')
   354         rset = self.execute(u'Any X WHERE X has_text "foobar"')
   356         self.assertEquals(rset.searched_text(), 'foobar')
   355         self.assertEquals(rset.searched_text(), 'foobar')
   357         rset = self.execute(u'Any X WHERE X has_text %(text)s', {'text' : 'foo'})
   356         rset = self.execute(u'Any X WHERE X has_text %(text)s', {'text' : 'foo'})