def test_delete(self): firstname = 'Gadou' lastname = 'Pipo' user = self.add_user(firstname=firstname, lastname=lastname) user = user_dao.get(user.id) user_dao.delete(user) row = (self.session.query(UserSchema).filter( UserSchema.id == user.id).first()) assert_that(row, equal_to(None))
def test_delete(self): firstname = 'Gadou' lastname = 'Pipo' user = self.add_user(firstname=firstname, lastname=lastname) user = user_dao.get(user.id) user_dao.delete(user) row = (self.session.query(UserSchema) .filter(UserSchema.id == user.id) .first()) assert_that(row, equal_to(None))
def delete(user): validator.validate_delete(user) func_key_destination.delete_user_destination(user) user_dao.delete(user) template_dao.delete_private_template(user.private_template_id) notifier.deleted(user)