mirror of
https://github.com/caronc/apprise.git
synced 2025-08-09 16:35:07 +02:00
Added support for recent CPython and PyPy versions; Droped Python v2.7 Support (#680)
This commit is contained in:
@ -24,14 +24,7 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import os
|
||||
import six
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from helpers import module_reload
|
||||
|
||||
@ -77,7 +70,7 @@ def test_plugin_macosx_general(mock_macver, mock_system, mock_popen, tmpdir):
|
||||
assert isinstance(obj, apprise.plugins.NotifyMacOSX) is True
|
||||
|
||||
# Test url() call
|
||||
assert isinstance(obj.url(), six.string_types) is True
|
||||
assert isinstance(obj.url(), str) is True
|
||||
|
||||
# test notifications
|
||||
assert obj.notify(title='title', body='body',
|
||||
@ -96,7 +89,7 @@ def test_plugin_macosx_general(mock_macver, mock_system, mock_popen, tmpdir):
|
||||
obj = apprise.Apprise.instantiate(
|
||||
'macosx://_/?image=False', suppress_exceptions=False)
|
||||
assert isinstance(obj, apprise.plugins.NotifyMacOSX) is True
|
||||
assert isinstance(obj.url(), six.string_types) is True
|
||||
assert isinstance(obj.url(), str) is True
|
||||
assert obj.notify(title='title', body='body',
|
||||
notify_type=apprise.NotifyType.INFO) is True
|
||||
|
||||
@ -105,7 +98,7 @@ def test_plugin_macosx_general(mock_macver, mock_system, mock_popen, tmpdir):
|
||||
'macosx://_/?sound=default', suppress_exceptions=False)
|
||||
assert isinstance(obj, apprise.plugins.NotifyMacOSX) is True
|
||||
assert obj.sound == 'default'
|
||||
assert isinstance(obj.url(), six.string_types) is True
|
||||
assert isinstance(obj.url(), str) is True
|
||||
assert obj.notify(title='title', body='body',
|
||||
notify_type=apprise.NotifyType.INFO) is True
|
||||
|
||||
|
Reference in New Issue
Block a user