mirror of
https://github.com/caronc/apprise-api.git
synced 2025-08-18 02:19:41 +02:00
Reworked mocking of NamedTemporaryFile() (#8)
This commit is contained in:
@@ -168,8 +168,8 @@ class NotifyTests(SimpleTestCase):
|
||||
'body': 'test message'
|
||||
}
|
||||
|
||||
with patch('tempfile._TemporaryFileWrapper') as mock_ntf:
|
||||
mock_ntf.side_effect = OSError()
|
||||
with patch('tempfile.NamedTemporaryFile') as mock_ntf:
|
||||
mock_ntf.side_effect = OSError
|
||||
# we won't be able to write our retrieved configuration
|
||||
# to disk for processing; we'll get a 500 error
|
||||
response = self.client.post(
|
||||
|
Reference in New Issue
Block a user