diff options
author | Andrew Lewis <nerf@judo.za.org> | 2024-01-01 16:01:50 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2024-01-01 16:01:50 +0200 |
commit | 1fa1fe96cd429562657952f55a4b44ed90cf144c (patch) | |
tree | 8e944e1bc4d32f7055f68ddc1b37ef7348218e9b /test/functional/lib/rspamd.py | |
parent | ecd96adf48982e99e3144fa0fdf74b83661fa544 (diff) | |
download | rspamd-1fa1fe96cd429562657952f55a4b44ed90cf144c.tar.gz rspamd-1fa1fe96cd429562657952f55a4b44ed90cf144c.zip |
[Test] Some more tests for logging
Diffstat (limited to 'test/functional/lib/rspamd.py')
-rw-r--r-- | test/functional/lib/rspamd.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/lib/rspamd.py b/test/functional/lib/rspamd.py index 49c21a449..3976ca949 100644 --- a/test/functional/lib/rspamd.py +++ b/test/functional/lib/rspamd.py @@ -24,6 +24,15 @@ def Check_JSON(j): assert 'error' not in d return d +def check_json_log(fn): + line_count = 0 + f = open(fn, 'r') + for l in f.readlines(): + d = demjson.decode(l, strict=True) + assert len(d) > 0 + line_count = line_count + 1 + assert line_count > 0 + def cleanup_temporary_directory(directory): shutil.rmtree(directory) |