Exemplo n.º 1
0
def test_apply_migrations(initial_db):
    DatabaseWorker.run_migrations('dexbot/migrations',
                                  'sqlite:///{}'.format(initial_db))
Exemplo n.º 2
0
def test_apply_migrations_historic(historic_db):
    """ Test transition of old installation before alembic
    """
    DatabaseWorker.run_migrations('dexbot/migrations',
                                  'sqlite:///{}'.format(historic_db))
Exemplo n.º 3
0
def test_apply_migrations_fresh(fresh_db):
    """ Test fresh installation
    """
    DatabaseWorker.run_migrations('dexbot/migrations',
                                  'sqlite:///{}'.format(fresh_db))
Exemplo n.º 4
0
def fresh_db():

    _, db_file = tempfile.mkstemp()  # noqa: F811
    _ = DatabaseWorker(sqlite_file=db_file)
    yield db_file
    os.unlink(db_file)