def setUp(self): """ this method will execute before every test method """ # make sure config = TestConfig app.config.from_object("config.TestConfig") # create all tables db.create_all() self.create_user("admin", "*****@*****.**", "adminpassword", confirmed=True ) admin = User.query.get(1) # user follow himself to show his posts in the main page admin.follow(admin) db.session.commit()
from minitweet_app import db, models # create all tables db.create_all()