From cfcf4da7fab046cf4dad47b499fa44abbc8f62b8 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Tue, 9 Apr 2019 16:14:42 +0300 Subject: Tests: added "name" argument for search_in_log(). --- test/unit/applications/proto.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/unit') diff --git a/test/unit/applications/proto.py b/test/unit/applications/proto.py index 17dfed35..16007757 100644 --- a/test/unit/applications/proto.py +++ b/test/unit/applications/proto.py @@ -10,6 +10,6 @@ class TestApplicationProto(TestControl): def date_to_sec_epoch(self, date, template='%a, %d %b %Y %H:%M:%S %Z'): return time.mktime(time.strptime(date, template)) - def search_in_log(self, pattern): - with open(self.testdir + '/unit.log', 'r', errors='ignore') as f: + def search_in_log(self, pattern, name='unit.log'): + with open(self.testdir + '/' + name, 'r', errors='ignore') as f: return re.search(pattern, f.read()) -- cgit