Example #1
0
def test_sql_storage_sqlite_delete_resource_not_existent_error(sqlite_url):
    storage = SqlStorage(sqlite_url)
    with pytest.raises(FrictionlessException) as excinfo:
        storage.delete_resource("bad")
    error = excinfo.value.error
    assert error.code == "storage-error"
    assert error.note.count("does not exist")
Example #2
0
def test_storage_delete_resource_not_existent_error(database_url):
    engine = sa.create_engine(database_url)
    storage = SqlStorage(engine=engine)
    with pytest.raises(exceptions.FrictionlessException) as excinfo:
        storage.delete_resource("bad")
    error = excinfo.value.error
    assert error.code == "storage-error"
    assert error.note.count("does not exist")