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,7 +160,8 @@ class User(db.Model, ModelMixin, UserMixin):
if 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
GenEmail.create_new(user.id, prefix="my-first-alias")

View File

@ -39,8 +39,9 @@ def test_construct_url():
def test_authorize_page_non_login_user(flask_client):
"""make sure to display login page for non-authenticated 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()
r = flask_client.get(