本文整理汇总了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.