diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-04-09 16:14:42 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-04-09 16:14:42 +0300 |
commit | cfcf4da7fab046cf4dad47b499fa44abbc8f62b8 (patch) | |
tree | f72275383065c5946c3fd6675f1c869f3e844a5f | |
parent | 8c7411415a0ff8dcfd9bd8fa2d440046afd140af (diff) | |
download | unit-cfcf4da7fab046cf4dad47b499fa44abbc8f62b8.tar.gz unit-cfcf4da7fab046cf4dad47b499fa44abbc8f62b8.tar.bz2 |
Tests: added "name" argument for search_in_log().
Diffstat (limited to '')
-rw-r--r-- | test/unit/applications/proto.py | 4 |
1 files changed, 2 insertions, 2 deletions
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()) |