Example #1
0
 def setUp(self):
     bigh.app.config["TESTING"] = True
     bigh.app.config["DBNAME"] = "bigh_test"  # must be created first
     self.app = bigh.app.test_client()
     with bigh.app.app_context():
         bigh.init_db()
     self.db_fd, self.data_path = tempfile.mkstemp()
Example #2
0
 def setUp(self):
     bigh.app.config['TESTING'] = True
     bigh.app.config['DBNAME'] = 'bigh_test'  # must be created first
     self.app = bigh.app.test_client()
     with bigh.app.app_context():
         bigh.init_db()
     self.db_fd, self.data_path = tempfile.mkstemp()
Example #3
0
def main():
    if len(sys.argv) > 1:
        if sys.argv[1] == 'initdb':
            init_db()   # initialize database
Example #4
0
 def tearDown(self):
     os.unlink(self.data_path)
     with bigh.app.app_context():
         bigh.init_db()
Example #5
0
 def tearDown(self):
     os.unlink(self.data_path)
     with bigh.app.app_context():
         bigh.init_db()
Example #6
0
def main():
    if len(sys.argv) > 1:
        if sys.argv[1] == 'initdb':
            init_db()  # initialize database