mirror of
https://github.com/caronc/apprise.git
synced 2025-08-09 08:25:07 +02:00
Refactored base64 attachment handling (#1191)
This commit is contained in:
@ -196,6 +196,12 @@ def test_plugin_sendgrid_attachments(mock_post, mock_get):
|
||||
mock_post.reset_mock()
|
||||
mock_get.reset_mock()
|
||||
|
||||
# Try again in a use case where we can't access the file
|
||||
with mock.patch("os.path.isfile", return_value=False):
|
||||
assert obj.notify(
|
||||
body='body', title='title', notify_type=NotifyType.INFO,
|
||||
attach=attach) is False
|
||||
|
||||
# Try again in a use case where we can't access the file
|
||||
with mock.patch("builtins.open", side_effect=OSError):
|
||||
assert obj.notify(
|
||||
|
Reference in New Issue
Block a user