def test_isAuthor(self): db.isAuthor(1, 'riz') assert True
def unShareNote(id): if db.isAuthor(id, getUser()): db.updateShare(id, 0) return {'ack': 1} else: return {'ack': 0, 'msg': 'You do not have permission update this note'}
def deleteNote(id): if db.isAuthor(id, getUser()): db.deleteNote(id) return {'ack': 1} else: return {'ack': 0, 'msg': 'You do not have permission delete this note'}
def updateNote(id): if db.isAuthor(id, getUser()): db.updateNote(id, request.forms.get('time'), request.forms.get('text')) return {'ack': 1} else: return {'ack': 0, 'msg': 'You do not have permission update this note'}
def test_isAuthor(self): db.isAuthor(1, "riz") assert True