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
def test_update(syncdb): syncdb.update(False) assert not syncdb.search('pacman') is None
def test_db_grpcache_not_empty(syncdb): syncdb.update(False) assert syncdb.grpcache != []