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()
def teardown_method(self, method): drop_db()
def setup_method(self, method): self.app = app.test_client() with app.app_context(): drop_db() create_db()