From 05d01aee6c11cb1edc10d029fc879da1ae387b0e Mon Sep 17 00:00:00 2001 From: Azide Date: Wed, 13 Sep 2023 15:08:26 +0800 Subject: [PATCH] :bug: published_element add is not None --- tests/platforms/test_rss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/platforms/test_rss.py b/tests/platforms/test_rss.py index db06dd2..f8bd103 100644 --- a/tests/platforms/test_rss.py +++ b/tests/platforms/test_rss.py @@ -48,7 +48,7 @@ def update_time_feed_1(): current_time = datetime.now(pytz.timezone("GMT")).strftime("%a, %d %b %Y %H:%M:%S %Z") assert item pubdate_elem = item.find("pubDate") - assert pubdate_elem + assert pubdate_elem is not None pubdate_elem.text = current_time return ET.tostring(root, encoding="unicode") @@ -59,7 +59,7 @@ def update_time_feed_2(): root = ET.fromstring(file) current_time = datetime.now(pytz.timezone("GMT")).strftime("%a, %d %b %Y %H:%M:%S %Z") published_element = root.find(".//{*}published") - assert published_element + assert published_element is not None published_element.text = current_time return ET.tostring(root, encoding="unicode")