def setUp(self): self.ctx = app.app_context() self.ctx.push() db.drop_all() # just in case db.create_all() self.client = app.test_client()