本文整理匯總了Python中model.db.drop_all方法的典型用法代碼示例。如果您正苦於以下問題:Python db.drop_all方法的具體用法?Python db.drop_all怎麽用?Python db.drop_all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類model.db
的用法示例。
在下文中一共展示了db.drop_all方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: tear_down
# 需要導入模塊: from model import db [as 別名]
# 或者: from model.db import drop_all [as 別名]
def tear_down(self):
"""Do this at the end of every test."""
db.session.close()
db.drop_all()
示例2: tearDown
# 需要導入模塊: from model import db [as 別名]
# 或者: from model.db import drop_all [as 別名]
def tearDown(self):
"""For after test."""
db.session.close()
db.drop_all()
示例3: tearDown
# 需要導入模塊: from model import db [as 別名]
# 或者: from model.db import drop_all [as 別名]
def tearDown(self):
"""Stuff to do after each test."""
db.session.close()
db.drop_all()
示例4: clean_db
# 需要導入模塊: from model import db [as 別名]
# 或者: from model.db import drop_all [as 別名]
def clean_db():
# In case tables haven't been created, create them
db.session.commit()
db.drop_all()
db.create_all()
示例5: tearDown
# 需要導入模塊: from model import db [as 別名]
# 或者: from model.db import drop_all [as 別名]
def tearDown(self):
"""To do at end of test"""
db.session.close()
db.drop_all()
示例6: tearDown
# 需要導入模塊: from model import db [as 別名]
# 或者: from model.db import drop_all [as 別名]
def tearDown(self):
""" Do at end of every test - drop the database """
# (uncomment when testing database)
db.session.close()
db.drop_all()
示例7: tearDown
# 需要導入模塊: from model import db [as 別名]
# 或者: from model.db import drop_all [as 別名]
def tearDown(self):
db.session.close()
db.drop_all()
示例8: tearDown
# 需要導入模塊: from model import db [as 別名]
# 或者: from model.db import drop_all [as 別名]
def tearDown(self):
db.session.close()
db.drop_all()
# Tests for app routes.