From 365bf27838d3997c97ab2c4a77905a5e3b20d867 Mon Sep 17 00:00:00 2001 From: Danjela Lura Date: Fri, 19 Jun 2020 14:15:38 +0200 Subject: Fix the test-model-package test Signed-off-by: Christopher Baines --- tests/model-package.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests') 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) -- cgit v1.2.3