def main():
#init_db()
addArticles('/home/ubuntu/article-metadata/us-newswires-to-sheriff-2017-09-15.csv', 'black_newswires')
#loadVariableOptions("dropdowns.csv", reset = True)
#loadVariableOptions("dropdowns-bp.csv")
# addUsersExample()
# addQueueExample()
python类init_db()的实例源码
def setUp(self):
"""Set up for the tests."""
self.db_fd, self.db_name = tempfile.mkstemp()
database.set_engine('sqlite:///' + self.db_name)
database.init_db()
self.app = main.app.test_client()