Ejemplo n.º 1
0
 def test_query_pager_by_userid(self):
     user_id = self.user_id
     self.add_mess()
     a = MCollect.query_pager_by_userid(user_id, '1')
     tf = False
     for i in a:
         if i.post_id == self.post_id:
             tf = True
     assert tf
     self.tearDown()
Ejemplo n.º 2
0
    def render(self, *args, **kwargs):
        user_id = kwargs.get('user_id', args[0])
        kind = kwargs.get('kind', args[1])
        num = kwargs.get('num', args[2] if len(args) > 2 else 6)
        with_tag = kwargs.get('with_tag', False)
        glyph = kwargs.get('glyph', '')

        all_cats = MCollect.query_pager_by_userid(user_id, kind, num).objects()
        kwd = {'with_tag': with_tag, 'glyph': glyph}
        return self.render_string('modules/widget/user_collect.html',
                                  recs=all_cats,
                                  kwd=kwd)
Ejemplo n.º 3
0
 def test_query_pager_by_userid(self):
     user_id = self.user_id
     kind = '1'
     MCollect.query_pager_by_userid(user_id, kind)
     assert True