more unittesting + bugfixes

This commit is contained in:
Chris Caron
2017-12-10 21:28:00 -05:00
parent 6cca5946e1
commit 82c5a11e5b
22 changed files with 788 additions and 246 deletions

View File

@@ -316,3 +316,13 @@ def test_apprise_asset(tmpdir):
# Restore our permissions
chmod(a.image_path(NotifyType.INFO, NotifyImageSize.XY_256), 0o640)
# Disable all image references
a = AppriseAsset(image_path_mask=False, image_url_mask=False)
# We always return none in these calls now
assert(a.image_raw(NotifyType.INFO, NotifyImageSize.XY_256) is None)
assert(a.image_url(NotifyType.INFO, NotifyImageSize.XY_256) is None)
assert(a.image_path(NotifyType.INFO, NotifyImageSize.XY_256,
must_exist=False) is None)
assert(a.image_path(NotifyType.INFO, NotifyImageSize.XY_256,
must_exist=True) is None)