]> gitweb.michael.orlitzky.com - djbdns-logparse.git/commitdiff
bin/djbdns-logparse.py: more doctests for handle_tinydns_log().
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 15 Sep 2022 23:01:16 +0000 (19:01 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 15 Sep 2022 23:01:16 +0000 (19:01 -0400)
bin/djbdns-logparse.py

index 33fc69d391277a699132ca9b82bd4afba2aefb36..d97a812867ae83ec48fbc0b4f5364083f6457480 100755 (executable)
@@ -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)