This commit is contained in:
Son NK 2020-02-27 22:31:38 +07:00
parent ed11363b0c
commit 91d5d1c9ac
2 changed files with 4 additions and 2 deletions

View File

@ -160,6 +160,7 @@ class User(db.Model, ModelMixin, UserMixin):
if password: if password:
user.set_password(password) user.set_password(password)
db.session.flush() db.session.flush()
# create a first alias mail to show user how to use when they login # create a first alias mail to show user how to use when they login

View File

@ -39,8 +39,9 @@ def test_construct_url():
def test_authorize_page_non_login_user(flask_client): def test_authorize_page_non_login_user(flask_client):
"""make sure to display login page for non-authenticated user""" """make sure to display login page for non-authenticated user"""
user = User.create("test@test.com", "test user") user = User.create("test@test.com", "test user")
client = Client.create_new("test client", user.id) db.session.commit()
client = Client.create_new("test client", user.id)
db.session.commit() db.session.commit()
r = flask_client.get( r = flask_client.get(