Exemplo n.º 1
0
def setup_test_db():
    """
    Set up the test databases.
    """
    # Upgrade the db to the latest version.
    # upgrading the db
    db.upgrade_database(db.DBConnection(), mainDB.InitialSchema)

    # fix up any db problems
    db.sanity_check_database(db.DBConnection(), mainDB.MainSanityCheck)

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

    # and for failed.db too
    db.upgrade_database(db.DBConnection('failed.db'), failed_db.InitialSchema)
Exemplo n.º 2
0
def setup_test_db():
    """
    Set up the test databases.
    """
    # Upgrade the db to the latest version.
    # upgrading the db
    db.upgrade_database(db.DBConnection(), mainDB.InitialSchema)

    # fix up any db problems
    db.sanity_check_database(db.DBConnection(), mainDB.MainSanityCheck)

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

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