示例#1
0
 def setUp(self):
     #db.create_all(app=create_app())
     self.app = create_app()
     self.app.debug = True
     #self.client = self.app.test_client()
     with self.app.test_request_context():
         db.drop_all()
         db.create_all()
     self.client = self.app.test_client()
示例#2
0
 def tearDown(self):
     with self.app.test_request_context():
         db.drop_all()