예제 #1
0
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()
예제 #2
0
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()
예제 #3
0
 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()
예제 #4
0
 def setUp(self):
     """Before each test, set up a blank database"""
     self.app = hello.app.test_client()
     hello.init_db()
예제 #5
0
#!/usr/bin/env python3
from hello import init_db
init_db()
예제 #6
0
 def setUp(self):
     """Before each test, set up a blank database"""
     self.app = hello.app.test_client()
     hello.init_db()
예제 #7
0
 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()