21 class URLPublisherTC(CubicWebTC): |
21 class URLPublisherTC(CubicWebTC): |
22 """test suite for QSPreProcessor""" |
22 """test suite for QSPreProcessor""" |
23 |
23 |
24 def setup_database(self): |
24 def setup_database(self): |
25 self.create_user(u'ÿsaÿe') |
25 self.create_user(u'ÿsaÿe') |
26 b = self.add_entity('BlogEntry', title=u'hell\'o', content=u'blabla') |
26 req = self.request() |
27 c = self.add_entity('Tag', name=u'yo') # take care: Tag's name normalized to lower case |
27 b = req.create_entity('BlogEntry', title=u'hell\'o', content=u'blabla') |
|
28 c = req.create_entity('Tag', name=u'yo') # take care: Tag's name normalized to lower case |
28 self.execute('SET C tags B WHERE C eid %(c)s, B eid %(b)s', {'c':c.eid, 'b':b.eid}, 'b') |
29 self.execute('SET C tags B WHERE C eid %(c)s, B eid %(b)s', {'c':c.eid, 'b':b.eid}, 'b') |
29 |
30 |
30 def process(self, url): |
31 def process(self, url): |
31 req = self.req = self.request() |
32 req = self.req = self.request() |
32 return self.app.url_resolver.process(req, url) |
33 return self.app.url_resolver.process(req, url) |