diff options
author | Mark H Weaver <mhw@netris.org> | 2015-01-11 09:38:49 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-01-11 09:38:49 -0500 |
commit | 77448857311318fc9cd866afcb85ca98fccdb25b (patch) | |
tree | efed3a71d1f7b2c2cc292e7e4ba1884c4d26a9e4 /tests/pypi.scm | |
parent | 62c155c0bcbc0d71b1bc35e966193b6e8de03246 (diff) | |
parent | 0009ed71ad288358cbc7828954b5e1a3f18fd525 (diff) | |
download | guix-77448857311318fc9cd866afcb85ca98fccdb25b.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/pypi.scm')
-rw-r--r-- | tests/pypi.scm | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/pypi.scm b/tests/pypi.scm index 124c512d54..45cf7cac4f 100644 --- a/tests/pypi.scm +++ b/tests/pypi.scm @@ -20,17 +20,10 @@ #:use-module (guix import pypi) #:use-module (guix base32) #:use-module (guix hash) + #:use-module (guix tests) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) -(define-syntax-rule (mock (module proc replacement) body ...) - (let* ((m (resolve-module 'module)) - (original (module-ref m 'proc))) - (dynamic-wind - (lambda () (module-set! m 'proc replacement)) - (lambda () body ...) - (lambda () (module-set! m 'proc original))))) - (define test-json "{ \"info\": { @@ -60,7 +53,7 @@ (test-assert "pypi->guix-package" ;; Replace network resources with sample data. - (mock ((guix import pypi) url-fetch + (mock ((guix import utils) url-fetch (lambda (url file-name) (with-output-to-file file-name (lambda () |