Example #1
0
    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))
Example #2
0
    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))
Example #3
0
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)