Exemple #1
0
def setup_test_db():
    """Set up the test databases."""
    # Upgrade the db to the latest version.
    # upgrading the db
    db.upgradeDatabase(db.DBConnection(), main_db.InitialSchema)

    # fix up any db problems
    db.sanityCheckDatabase(db.DBConnection(), main_db.MainSanityCheck)

    # and for cache.db too
    db.upgradeDatabase(db.DBConnection('cache.db'), cache_db.InitialSchema)

    # and for failed.db too
    db.upgradeDatabase(db.DBConnection('failed.db'), failed_db.InitialSchema)
Exemple #2
0
def setup_test_db():
    """Set up the test databases."""
    # Upgrade the db to the latest version.
    # upgrading the db
    db.upgradeDatabase(db.DBConnection(), main_db.InitialSchema)

    # fix up any db problems
    db.sanityCheckDatabase(db.DBConnection(), main_db.MainSanityCheck)

    # and for cache.db too
    db.upgradeDatabase(db.DBConnection('cache.db'), cache_db.InitialSchema)

    # and for failed.db too
    db.upgradeDatabase(db.DBConnection('failed.db'), failed_db.InitialSchema)