From e3c052b082c6c6183e0f299a1a0d73021f25f88d Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 15 Sep 2022 19:01:16 -0400 Subject: [PATCH] bin/djbdns-logparse.py: more doctests for handle_tinydns_log(). --- bin/djbdns-logparse.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/djbdns-logparse.py b/bin/djbdns-logparse.py index 33fc69d..d97a812 100755 --- a/bin/djbdns-logparse.py +++ b/bin/djbdns-logparse.py @@ -225,8 +225,13 @@ def handle_tinydns_log(line : str) -> bool: -------- >>> line = "2022-09-14 21:04:40.206516500 7f000001:9d61:be69 - 0001 www.example.com" - >>> _ = handle_tinydns_log(line) + >>> handle_tinydns_log(line) 2022-09-14 21:04:40.206516500 dropped query (no authority) from 127.0.0.1:40289 (id 48745): a www.example.com + True + + >>> line = "this line is nonsense" + >>> handle_tinydns_log(line) + False """ match = tinydns_log_re.match(line) -- 2.43.2