Exemple #1
0
def client():
    '''
    A Werkzeug client in testing mode with a newly created database.
    '''
    app.config['TESTING'] = True
    with app.app_context():
        drop_db()
        create_db()
    yield app.test_client()
    drop_db()
Exemple #2
0
 def teardown_method(self, method):
     drop_db()
Exemple #3
0
 def setup_method(self, method):
     self.app = app.test_client()
     with app.app_context():
         drop_db()
         create_db()