test/unittest_entity.py
branchstable
changeset 4672 0288f8e5460c
parent 4630 528dee042927
child 4681 5f72584ab1d7
equal deleted inserted replaced
4671:00d139c5f386 4672:0288f8e5460c
   186                           'Any X,AA,AB ORDERBY AA ASC WHERE E eid %(x)s, E evaluee X, '
   186                           'Any X,AA,AB ORDERBY AA ASC WHERE E eid %(x)s, E evaluee X, '
   187                           'X type AA, X modification_date AB')
   187                           'X type AA, X modification_date AB')
   188         Personne.fetch_attrs, Personne.fetch_order = fetch_config(('nom', ))
   188         Personne.fetch_attrs, Personne.fetch_order = fetch_config(('nom', ))
   189         # XXX
   189         # XXX
   190         self.assertEquals(p.related_rql('evaluee'),
   190         self.assertEquals(p.related_rql('evaluee'),
   191                           'Any X,AA ORDERBY Z DESC '
   191                           'Any X,AA ORDERBY AA DESC '
   192                           'WHERE X modification_date Z, E eid %(x)s, E evaluee X, '
   192                           'WHERE E eid %(x)s, E evaluee X, '
   193                           'X modification_date AA')
   193                           'X modification_date AA')
   194 
   194 
   195         tag = self.vreg['etypes'].etype_class('Tag')(self.request())
   195         tag = self.vreg['etypes'].etype_class('Tag')(self.request())
   196         self.assertEquals(tag.related_rql('tags', 'subject'),
   196         self.assertEquals(tag.related_rql('tags', 'subject'),
   197                           'Any X,AA ORDERBY Z DESC '
   197                           'Any X,AA ORDERBY AA DESC '
   198                           'WHERE X modification_date Z, E eid %(x)s, E tags X, '
   198                           'WHERE E eid %(x)s, E tags X, '
   199                           'X modification_date AA')
   199                           'X modification_date AA')
   200         self.assertEquals(tag.related_rql('tags', 'subject', ('Personne',)),
   200         self.assertEquals(tag.related_rql('tags', 'subject', ('Personne',)),
   201                           'Any X,AA,AB ORDERBY AA ASC '
   201                           'Any X,AA,AB ORDERBY AA ASC '
   202                           'WHERE E eid %(x)s, E tags X, X is IN (Personne), X nom AA, '
   202                           'WHERE E eid %(x)s, E tags X, X is IN (Personne), X nom AA, '
   203                           'X modification_date AB')
   203                           'X modification_date AB')