mirror of
https://github.com/caronc/apprise.git
synced 2025-08-13 18:17:12 +02:00
attachment code hardening + 100% test coverage
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user