def remove_collect(self, post_id): ''' Add or update the category. ''' logger.info('Collect info: user-{0}, uid-{1}'.format( self.userinfo.uid, post_id)) MCollect.remove_collect(self.userinfo.uid, post_id) out_dic = {'success': True} return json.dump(out_dic, self)
def test_remove_collect(self): MCollect.remove_collect(self.user_id, self.post_id) rec = MCollect.get_by_signature(self.user_id, self.post_id) assert rec == None self.tearDown()