tests: Adjust for 'http-fetch' change in (guix import json).
This is a followup to commit 81e0bc1834
.
* tests/cpan.scm ("cpan->guix-package"): Add a 'rest' argument to the
lambda that mocks 'http-fetch'.
* tests/crate.scm ("crate->guix-package"): Likewise.
* tests/gem.scm ("gem->guix-package"): Likewise.
* tests/pypi.scm ("pypi->guix-package"): Likewise.
("pypi->guix-package, wheels"): Likewise.
This commit is contained in:
parent
824e5fe640
commit
ce8963c5b7
|
@ -72,7 +72,7 @@
|
||||||
test-source)
|
test-source)
|
||||||
(_ (error "Unexpected URL: " url))))))))
|
(_ (error "Unexpected URL: " url))))))))
|
||||||
(mock ((guix http-client) http-fetch
|
(mock ((guix http-client) http-fetch
|
||||||
(lambda (url)
|
(lambda (url . rest)
|
||||||
(match url
|
(match url
|
||||||
("https://api.metacpan.org/release/Foo-Bar"
|
("https://api.metacpan.org/release/Foo-Bar"
|
||||||
(values (open-input-string test-json)
|
(values (open-input-string test-json)
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
(test-assert "crate->guix-package"
|
(test-assert "crate->guix-package"
|
||||||
;; Replace network resources with sample data.
|
;; Replace network resources with sample data.
|
||||||
(mock ((guix http-client) http-fetch
|
(mock ((guix http-client) http-fetch
|
||||||
(lambda (url)
|
(lambda (url . rest)
|
||||||
(match url
|
(match url
|
||||||
("https://crates.io/api/v1/crates/foo"
|
("https://crates.io/api/v1/crates/foo"
|
||||||
(open-input-string test-crate))
|
(open-input-string test-crate))
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
(test-assert "gem->guix-package"
|
(test-assert "gem->guix-package"
|
||||||
;; Replace network resources with sample data.
|
;; Replace network resources with sample data.
|
||||||
(mock ((guix http-client) http-fetch
|
(mock ((guix http-client) http-fetch
|
||||||
(lambda (url)
|
(lambda (url . rest)
|
||||||
(match url
|
(match url
|
||||||
("https://rubygems.org/api/v1/gems/foo.json"
|
("https://rubygems.org/api/v1/gems/foo.json"
|
||||||
(values (open-input-string test-json)
|
(values (open-input-string test-json)
|
||||||
|
|
|
@ -118,7 +118,7 @@ baz > 13.37")
|
||||||
("https://example.com/foo-1.0.0-py2.py3-none-any.whl" #f)
|
("https://example.com/foo-1.0.0-py2.py3-none-any.whl" #f)
|
||||||
(_ (error "Unexpected URL: " url)))))
|
(_ (error "Unexpected URL: " url)))))
|
||||||
(mock ((guix http-client) http-fetch
|
(mock ((guix http-client) http-fetch
|
||||||
(lambda (url)
|
(lambda (url . rest)
|
||||||
(match url
|
(match url
|
||||||
("https://pypi.python.org/pypi/foo/json"
|
("https://pypi.python.org/pypi/foo/json"
|
||||||
(values (open-input-string test-json)
|
(values (open-input-string test-json)
|
||||||
|
@ -181,7 +181,7 @@ baz > 13.37")
|
||||||
(delete-file-recursively "foo-1.0.0.dist-info")))
|
(delete-file-recursively "foo-1.0.0.dist-info")))
|
||||||
(_ (error "Unexpected URL: " url)))))
|
(_ (error "Unexpected URL: " url)))))
|
||||||
(mock ((guix http-client) http-fetch
|
(mock ((guix http-client) http-fetch
|
||||||
(lambda (url)
|
(lambda (url . rest)
|
||||||
(match url
|
(match url
|
||||||
("https://pypi.python.org/pypi/foo/json"
|
("https://pypi.python.org/pypi/foo/json"
|
||||||
(values (open-input-string test-json)
|
(values (open-input-string test-json)
|
||||||
|
|
Loading…
Reference in New Issue