Maxime schrieb am Montag der 07. Februar 2022 um 10:50 +01: > Xinglu Chen schreef op ma 07-02-2022 om 10:07 [+0100]: >> +(define (latest-release package) >> +  (mock ((guix import json) json-fetch >> +         (lambda* (url #:key cached?) >> +           (json-string->scm %test-json))) >> +        (repology-latest-release package))) > > It would be nice to verify the URL. What do you mean with “verify”? > FWIW, there's a 'with-http-server' macro. > although it might need to be extended a little, see e.g. > . > > Also, you are using 'memoize' in repology-fetch-info, > so the memoisation cache needs to be invalidated > (see e.g. tests/minetest.scm), or not, depending > on how 'repology-fetch-info' is used and tests are written. Good catch! Invalidating the cache would be a good idea.