コード例 #1
0
ファイル: suite.py プロジェクト: suixindct/xichuangzhu
    def setup(self):
        os.environ['MODE'] = 'TESTING'

        app = create_app()
        self.app = app

        self.client = app.test_client()

        with app.app_context():
            db.drop_all()
            db.create_all()
コード例 #2
0
ファイル: suite.py プロジェクト: suixindct/xichuangzhu
 def teardown(self):
     with self.app.app_context():
         db.drop_all()