Пример #1
0
def test_update_error(handle, syncdb):
    servers = syncdb.servers
    syncdb.servers = ['nonexistant']
    with pytest.raises(error) as excinfo:
        syncdb.update(False)
    assert 'unable to update database' in str(excinfo.value)
    # TODO(jelle): remove when handle is no longer scope="module"
    syncdb.servers = servers
Пример #2
0
def test_update(syncdb):
    syncdb.update(False)
    assert not syncdb.search('pacman') is None
Пример #3
0
def test_db_grpcache_not_empty(syncdb):
    syncdb.update(False)
    assert syncdb.grpcache != []