Exemple #1
0
    def setUp(self):
        app.config['TESTING'] = True
        app.testing = True

        db.create_all()
        self.test_user_name = u'testuser'
        test_user = self.get_test_user(name=self.test_user_name)
        self.client = app.test_client()
        with self.client.session_transaction() as session:
            session['lastuser_userid'] = test_user.userid
            Profile.update_from_user(test_user, db.session)
            db.session.commit()
Exemple #2
0
def lastusernotify(user):
    Profile.update_from_user(user, db.session)
    db.session.commit()
Exemple #3
0
def lastuserauth():
    Profile.update_from_user(g.user, db.session)
    db.session.commit()
    return redirect(get_next_url())