def setUp(self): print('setup invoked') self.db_fd, demo.app.config['DATABASE'] = tempfile.mkstemp() demo.app.config['TESTING'] = True self.app = demo.app.test_client() with demo.app.app_context(): demo.init_db()
from demo import init_db init_db()