working db and tests Nr2
This commit is contained in:
13
database/db_populate.py
Normal file
13
database/db_populate.py
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from backend import db
|
||||
from backend.models import example_model, user_model, post_model
|
||||
|
||||
user = user_model.User(nickname="tobi", email="privat@t-kurze.de")
|
||||
user.set_password("abcxyz")
|
||||
db.session.add(user)
|
||||
|
||||
example_data = example_model.ExampleDataItem(name="tolles data item", mac="12:34:56:78:90:AB")
|
||||
db.session.add(example_data)
|
||||
|
||||
db.session.commit()
|
||||
Reference in New Issue
Block a user