use John Wick email

This commit is contained in:
Son NK 2019-07-22 19:14:13 +02:00 committed by Son NK
parent 08b394ea0f
commit ac8fa33a83
2 changed files with 2 additions and 24 deletions

View File

@ -84,8 +84,8 @@ def fake_data():
# Create a user
user = User.create(
email="nguyenkims+local@gmail.com",
name="Son Local",
email="john@wick.com",
name="John Wick",
password="password",
activated=True,
is_admin=True,

View File

@ -17,27 +17,6 @@ def create_db():
flask_migrate.upgrade()
def add_real_data():
"""after the db is reset, add some accounts
TODO: remove this after adding alembic"""
user = User.create(email="nguyenkims@gmail.com", name="Son GM", activated=True)
user.set_password("password")
db.session.commit()
# Create a client
client1 = Client.create_new(name="Demo", user_id=user.id)
client1.oauth_client_id = "client-id"
client1.oauth_client_secret = "client-secret"
db.session.commit()
RedirectUri.create(client_id=client1.id, uri="http://demo.sl.meo.ovh/callback")
db.session.commit()
user2 = User.create(email="nguyenkims@hotmail.com", name="Son HM", activated=True)
user2.set_password("password")
db.session.commit()
def change_password(user_id, new_password):
user = User.get(user_id)
user.set_password(new_password)
@ -48,7 +27,6 @@ def reset_db():
if database_exists(DB_URI):
drop_database(DB_URI)
create_db()
add_real_data()
app = create_app()