summary refs log tree commit diff
path: root/tests/pypi.scm
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2015-01-08 14:41:15 -0600
committerEric Bavier <bavier@member.fsf.org>2015-01-09 10:38:25 -0600
commit694b317c2dfac5f8b284a5831e20d89cc112bd6b (patch)
tree35be0154e39a3d9e7cc6de702263def0e9525640 /tests/pypi.scm
parent1ff2619bc114aface6b7b9d818f7208f9af677df (diff)
downloadguix-694b317c2dfac5f8b284a5831e20d89cc112bd6b.tar.gz
tests: import: Factorize utility function.
* tests/pypi.scm (mock): Move this...
* guix/tests.scm: to here.
Diffstat (limited to 'tests/pypi.scm')
-rw-r--r--tests/pypi.scm9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/pypi.scm b/tests/pypi.scm
index 53c34d9e93..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\": {