def setUp(self): """This optional method is called before every test method """ db.drop_all() users = [] users.append( user.User(username="******", name="name", email="*****@*****.**", password_hash="password_hash", salt="salt", profile_picture=b"profile_picture")) users.append( user.User(username="******", password_hash="iiojfeaioieof", salt="saltySalt")) events = [] events.append( event.Event(name="Tie my shoe", owner_id=1, event_type=event.EventType.NOTE)) events.append( event.Event(name="Raid Area 51", owner_id=1, parent_id=1, event_type=event.EventType.NOTE)) db.create_all() for value in users: db.session.add(value) for value in events: db.session.add(value) db.session.commit()
def setUp(self): """This optional method is called before every test method """ db.drop_all() users = [] users.append( user.User(username="******", name="name", email="*****@*****.**", password_hash="password_hash", salt="salt", profile_picture=b"profile_picture")) users.append( user.User(username="******", password_hash="iiojfeaioieof", salt="saltySalt")) users.append( user.User(username="******", name="jeff bob", password_hash="eeeeeeeeeeeeeee", salt="fffffffffffffff")) users.append( user.User(username="******", email="*****@*****.**", password_hash="asdfafeadf", salt="graefgafae")) db.create_all() for value in users: db.session.add(value) db.session.commit()
def generateDB(): db.drop_all() db.create_all()