def _init_db(debug=False, dry_run=False): """Initialize the database.""" from hello import init_db print 'init_db()' if dry_run: return # Configure the application if debug: make_debug() else: make_app() # Create the tables init_db()
def setUp(self): self.db_fd, hello.app.config['DATABASE'] = tempfile.mkstemp() hello.app.config['TESTING'] = True self.app = hello.app.test_client() hello.init_db()
def setUp(self): """Before each test, set up a blank database""" self.app = hello.app.test_client() hello.init_db()
#!/usr/bin/env python3 from hello import init_db init_db()