def test_get_all_pager(self): a = MEntity.get_all_pager() tf = True for i in a: if i.uid == self.uid: tf = False assert tf self.add_message() a = MEntity.get_all_pager() tf = False for i in a: if i.uid == self.uid: tf = True assert tf self.tearDown()
def list(self, cur_p=''): ''' Lists of the entities. ''' current_page_number = int(cur_p) if cur_p else 1 current_page_number = 1 if current_page_number < 1 else current_page_number kwd = {'current_page': current_page_number} recs = MEntity.get_all_pager(current_page_num=current_page_number) self.render('misc/entity/entity_list.html', imgs=recs, cfg=config.CMS_CFG, kwd=kwd, userinfo=self.userinfo)
def test_get_all_pager(self): MEntity.get_all_pager() assert True