From 7e60466c7bbfc257d86481c6a6e3e10d0dcd32c8 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sun, 1 Mar 2015 22:14:37 +0300 Subject: [PATCH] Fix system test. --- system/t04_mirror/create.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/t04_mirror/create.py b/system/t04_mirror/create.py index 98412b88..77986642 100644 --- a/system/t04_mirror/create.py +++ b/system/t04_mirror/create.py @@ -249,8 +249,11 @@ class CreateMirror21Test(BaseTest): def removeSHA512(s): return re.sub(r"SHA512: .+\n", "", s) + def removeDates(s): + return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s) + self.check_output() - self.check_cmd_output("aptly mirror show mirror21", "mirror_show", match_prepare=removeSHA512) + self.check_cmd_output("aptly mirror show mirror21", "mirror_show", match_prepare=lambda s: removeSHA512(removeDates(s))) class CreateMirror22Test(BaseTest):