aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanjela Lura <danielaluraa@gmail.com>2020-06-19 14:15:38 +0200
committerChristopher Baines <mail@cbaines.net>2020-06-19 16:03:32 +0100
commit365bf27838d3997c97ab2c4a77905a5e3b20d867 (patch)
treeb000b6a4e61eaf08eb673e358340403c0b655c41 /tests
parenta3ac33c0e1463239fe9612d7798fd3419ac3c7bc (diff)
downloaddata-service-365bf27838d3997c97ab2c4a77905a5e3b20d867.tar
data-service-365bf27838d3997c97ab2c4a77905a5e3b20d867.tar.gz
Fix the test-model-package test
Signed-off-by: Christopher Baines <mail@cbaines.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/model-package.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/model-package.scm b/tests/model-package.scm
index 0f2c796..3999230 100644
--- a/tests/model-package.scm
+++ b/tests/model-package.scm
@@ -45,6 +45,12 @@
(list mock-inferior-package-foo
mock-inferior-package-foo-2))
+(mock
+ ((guix-data-service model package-metadata)
+ inferior-packages->translated-package-descriptions-and-synopsis
+ (lambda (inferior inferior-package)
+ (cons `(("en_US.utf8" . "Fake synopsis"))
+ `(("en_US.utf8" . "Fake description")))))
(with-mock-inferior-packages
(lambda ()
(use-modules (guix-data-service model package)
@@ -63,6 +69,7 @@
(test-assert "inferior-packages->package-ids works once"
(let ((package-metadata-ids (inferior-packages->package-metadata-ids
conn
+ ""
mock-inferior-packages
(test-license-set-ids conn))))
(match (inferior-packages->package-ids
@@ -78,6 +85,7 @@
(lambda (conn)
(let ((package-metadata-ids (inferior-packages->package-metadata-ids
conn
+ ""
mock-inferior-packages
(test-license-set-ids conn))))
(test-equal
@@ -91,6 +99,6 @@
(zip (map mock-inferior-package-name mock-inferior-packages)
(map mock-inferior-package-version mock-inferior-packages)
package-metadata-ids)))))
- #:always-rollback? #t)))))
+ #:always-rollback? #t))))))
(test-end)