From af8af0f3d7ed48e783bf91503435d43736152713 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sat, 26 Jul 2014 18:22:47 +0400 Subject: [PATCH] Fix tests on aptly mirror edit. #63 --- system/t04_mirror/edit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/t04_mirror/edit.py b/system/t04_mirror/edit.py index bb7a95df..e3991442 100644 --- a/system/t04_mirror/edit.py +++ b/system/t04_mirror/edit.py @@ -1,3 +1,4 @@ +import re from lib import BaseTest @@ -10,7 +11,7 @@ class EditMirror1Test(BaseTest): def check(self): self.check_output() - self.check_cmd_output("aptly mirror show wheezy-main", "mirror_show") + self.check_cmd_output("aptly mirror show wheezy-main", "mirror_show", match_prepare=lambda s: re.sub(r"Last update: [0-9:+A-Za-z -]+\n", "", s)) class EditMirror2Test(BaseTest): @@ -30,7 +31,7 @@ class EditMirror3Test(BaseTest): def check(self): self.check_output() - self.check_cmd_output("aptly mirror show wheezy-main", "mirror_show") + self.check_cmd_output("aptly mirror show wheezy-main", "mirror_show", match_prepare=lambda s: re.sub(r"Last update: [0-9:+A-Za-z -]+\n", "", s)) class EditMirror4Test(BaseTest):