Working outside of application context; FlaskClient object has no attribute 'app_context'
Try to add this in your TestBase class:
...from flask import current_app...@classmethoddef setUpClass(cls): cls.app = generate_app()def setUp(self): """Set up application for testing.""" with self.app.app_context(): self.test_app = current_app.test_client()# Here goes the rest of your code