attachment code hardening + 100% test coverage

This commit is contained in:
Chris Caron
2019-11-11 11:34:25 -05:00
parent 717910e969
commit 002cebfaa3
9 changed files with 143 additions and 13 deletions

View File

@ -140,6 +140,11 @@ def test_apprise_attachment():
assert len(aa) == 0
assert not aa
# if instantiating attachments from the class, it will throw a TypeError
# if attachments couldn't be loaded
with pytest.raises(TypeError):
AppriseAttachment('garbage://')
# Garbage in produces garbage out
assert aa.add(None) is False
assert aa.add(object()) is False