Apprise and AppriseConfig truth value support added (#155)

This commit is contained in:
Chris Caron
2019-09-28 14:19:55 -04:00
committed by GitHub
parent 011fbc9b5f
commit 1047f36c6e
4 changed files with 44 additions and 0 deletions

View File

@ -68,6 +68,10 @@ def test_apprise():
# no items
assert(len(a) == 0)
# Apprise object can also be directly tested with 'if' keyword
# No entries results in a False response
assert(not a)
# Create an Asset object
asset = AppriseAsset(theme='default')
@ -85,6 +89,10 @@ def test_apprise():
# 2 servers loaded
assert(len(a) == 2)
# Apprise object can also be directly tested with 'if' keyword
# At least one entry results in a True response
assert(a)
# We can retrieve our URLs this way:
assert(len(a.urls()) == 2)