From 4c1b5cabbe7bd4adea5f7a6d573eb996865075fe Mon Sep 17 00:00:00 2001
From: Chris Caron
Date: Fri, 6 Oct 2023 18:11:44 -0400
Subject: [PATCH] complete coverage of what is there
---
apprise/conversion.py | 2 +-
test/test_conversion.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/apprise/conversion.py b/apprise/conversion.py
index 891714336d..898f80075a 100644
--- a/apprise/conversion.py
+++ b/apprise/conversion.py
@@ -308,7 +308,7 @@ def handle_starttag(self, tag, attrs):
self._preserver_cr = True
elif tag == 'a':
- for name, link in attrs:
+ for name, link in attrs: # pragma: no branch
if name == 'href':
self._link = '(' + link + ')'
# Take an early exit for speed (in case there are more
diff --git a/test/test_conversion.py b/test/test_conversion.py
index c09eb86e8a..406db664d9 100644
--- a/test/test_conversion.py
+++ b/test/test_conversion.py
@@ -107,6 +107,11 @@ def to_html(body):
"my link") == \
"test my link"
+ # a with missing href entry
+ assert to_html("test "
+ "my link") == \
+ "test my link"
+
#
missing
assert to_html("line 1 bold
"
" my link"