def setUp(self): app.config['TESTING'] = True self.app = app.test_client() self.app_context = app.app_context() self.app_context.push()