Refactor Test Code for Efficiency and Quality (#1100)

This commit is contained in:
Han Wang
2024-04-21 00:00:31 +01:00
committed by GitHub
parent 1f77254d71
commit 08cb018e11
29 changed files with 188 additions and 218 deletions

View File

@ -163,8 +163,8 @@ def test_plugin_msg91_keywords(mock_post):
obj = Apprise.instantiate(
'msg91://{}@{}/{}?:key=value&:mobiles=ignored'
.format(template, authkey, target))
assert isinstance(obj, NotifyMSG91) is True
assert isinstance(obj.url(), str) is True
assert isinstance(obj, NotifyMSG91)
assert isinstance(obj.url(), str)
# Send Notification
assert obj.send(body=message_contents) is True
@ -192,8 +192,8 @@ def test_plugin_msg91_keywords(mock_post):
# Play with mapping
obj = Apprise.instantiate(
'msg91://{}@{}/{}?:body&:type=cat'.format(template, authkey, target))
assert isinstance(obj, NotifyMSG91) is True
assert isinstance(obj.url(), str) is True
assert isinstance(obj, NotifyMSG91)
assert isinstance(obj.url(), str)
# Send Notification
assert obj.send(body=message_contents) is True