def db(request, app):
"""Create test database tables"""
_db.drop_all()
# Create the tables based on the current model
_db.create_all()
user = User.create_test_user()
TestClient.test_user = user
app.test_client_class = TestClient
app.response_class = TestResponse
_db.session.commit()
评论列表
文章目录