mirror of
https://github.com/caronc/apprise.git
synced 2025-01-03 20:49:19 +01:00
RHEL9 Support - Test cases to leverage unittest.mock when possible (#658)
This commit is contained in:
parent
782f2e602b
commit
2d5ab59252
@ -1,6 +1,6 @@
|
|||||||
coverage
|
coverage
|
||||||
flake8
|
flake8
|
||||||
mock
|
mock; python_version=='2.7'
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
tox
|
tox
|
||||||
|
@ -60,7 +60,7 @@ Techulus Push, Telegram, Twilio, Twitter, Twist, XBMC, Vonage, Webex Teams}
|
|||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A simple wrapper to many popular notification services used today
|
Summary: A simple wrapper to many popular notification services used today
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/caronc/%{pypi_name}
|
URL: https://github.com/caronc/%{pypi_name}
|
||||||
@ -161,7 +161,12 @@ Requires: python%{python3_pkgversion}-cryptography
|
|||||||
Requires: python%{python3_pkgversion}-yaml
|
Requires: python%{python3_pkgversion}-yaml
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
|
%if 0%{?rhel} >= 9
|
||||||
|
# Do not import python3-mock
|
||||||
|
%else
|
||||||
|
# python-mock switched to unittest.mock
|
||||||
BuildRequires: python%{python3_pkgversion}-mock
|
BuildRequires: python%{python3_pkgversion}-mock
|
||||||
|
%endif
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest
|
BuildRequires: python%{python3_pkgversion}-pytest
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest-runner
|
BuildRequires: python%{python3_pkgversion}-pytest-runner
|
||||||
%endif
|
%endif
|
||||||
@ -183,6 +188,17 @@ rm -f apprise/py3compat/asyncio.py
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} >= 9
|
||||||
|
# Nothing to do under normal circumstances; this line here allows legacy
|
||||||
|
# copies of Apprise to still build against this one
|
||||||
|
find test -type f -name '*.py' -exec \
|
||||||
|
sed -i -e 's|^import mock|from unittest import mock|g' {} \;
|
||||||
|
%else
|
||||||
|
# support python-mock (remain backwards compatible with older distributions)
|
||||||
|
find test -type f -name '*.py' -exec \
|
||||||
|
sed -i -e 's|^from unittest import mock|import mock|g' {} \;
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?with_python2}
|
%if 0%{?with_python2}
|
||||||
%py2_build
|
%py2_build
|
||||||
@ -243,6 +259,9 @@ LANG=C.UTF-8 PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 31 2022 Chris Caron <lead2gold@gmail.com> - 1.0.0-2
|
||||||
|
- Rebuilt for RHEL9 Support
|
||||||
|
|
||||||
* Sat Aug 6 2022 Chris Caron <lead2gold@gmail.com> - 1.0.0-1
|
* Sat Aug 6 2022 Chris Caron <lead2gold@gmail.com> - 1.0.0-1
|
||||||
- Updated to v1.0.0
|
- Updated to v1.0.0
|
||||||
|
|
||||||
|
@ -26,7 +26,14 @@ import re
|
|||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
import requests
|
import requests
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
from json import dumps
|
from json import dumps
|
||||||
from random import choice
|
from random import choice
|
||||||
from string import ascii_uppercase as str_alpha
|
from string import ascii_uppercase as str_alpha
|
||||||
|
@ -29,7 +29,14 @@ import sys
|
|||||||
import six
|
import six
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
from os.path import dirname
|
from os.path import dirname
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
|
||||||
|
@ -26,7 +26,14 @@
|
|||||||
import sys
|
import sys
|
||||||
import six
|
import six
|
||||||
import io
|
import io
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from apprise import NotifyFormat
|
from apprise import NotifyFormat
|
||||||
from apprise import ConfigFormat
|
from apprise import ConfigFormat
|
||||||
|
@ -23,7 +23,14 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from apprise.attachment.AttachBase import AttachBase
|
from apprise.attachment.AttachBase import AttachBase
|
||||||
|
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
from os.path import dirname
|
from os.path import dirname
|
||||||
from os.path import join
|
from os.path import join
|
||||||
from apprise.attachment.AttachBase import AttachBase
|
from apprise.attachment.AttachBase import AttachBase
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import mimetypes
|
import mimetypes
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import re
|
import re
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
from inspect import cleandoc
|
from inspect import cleandoc
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
from apprise.config.ConfigFile import ConfigFile
|
from apprise.config.ConfigFile import ConfigFile
|
||||||
from apprise.plugins.NotifyBase import NotifyBase
|
from apprise.plugins.NotifyBase import NotifyBase
|
||||||
from apprise.AppriseAsset import AppriseAsset
|
from apprise.AppriseAsset import AppriseAsset
|
||||||
|
@ -26,7 +26,14 @@
|
|||||||
import six
|
import six
|
||||||
import time
|
import time
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise.common import ConfigFormat
|
from apprise.common import ConfigFormat
|
||||||
from apprise.config.ConfigHTTP import ConfigHTTP
|
from apprise.config.ConfigHTTP import ConfigHTTP
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from apprise import Apprise
|
from apprise import Apprise
|
||||||
|
@ -27,7 +27,14 @@ import sys
|
|||||||
from json import loads
|
from json import loads
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import apprise
|
import apprise
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import ctypes
|
import ctypes
|
||||||
|
|
||||||
from apprise import AppriseLocale
|
from apprise import AppriseLocale
|
||||||
|
@ -26,7 +26,14 @@
|
|||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import Apprise
|
from apprise import Apprise
|
||||||
|
@ -23,7 +23,14 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from apprise import NotifyType
|
from apprise import NotifyType
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
|
@ -23,7 +23,14 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import json
|
import json
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from apprise import Apprise
|
from apprise import Apprise
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
# Disable logging for a cleaner testing output
|
# Disable logging for a cleaner testing output
|
||||||
import logging
|
import logging
|
||||||
import requests
|
import requests
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
|
|
||||||
import apprise
|
import apprise
|
||||||
from apprise.plugins.NotifyDapnet import DapnetPriority
|
from apprise.plugins.NotifyDapnet import DapnetPriority
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
|
@ -26,7 +26,14 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import smtplib
|
import smtplib
|
||||||
from email.header import decode_header
|
from email.header import decode_header
|
||||||
|
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
from json import dumps
|
from json import dumps
|
||||||
from apprise import Apprise
|
from apprise import Apprise
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -33,7 +33,14 @@ import io
|
|||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
import sys
|
import sys
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import six
|
import six
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -26,7 +26,14 @@
|
|||||||
import re
|
import re
|
||||||
import six
|
import six
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
import apprise
|
import apprise
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
import apprise
|
import apprise
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import pytest
|
import pytest
|
||||||
import apprise
|
import apprise
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from apprise import Apprise
|
from apprise import Apprise
|
||||||
|
@ -23,7 +23,14 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from apprise import NotifyType
|
from apprise import NotifyType
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
import apprise
|
import apprise
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
from helpers import module_reload
|
from helpers import module_reload
|
||||||
|
|
||||||
import apprise
|
import apprise
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import pytest
|
import pytest
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -23,7 +23,14 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import ssl
|
import ssl
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -23,7 +23,14 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import requests
|
import requests
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
import apprise
|
import apprise
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise.plugins.NotifyOpsgenie import OpsgeniePriority
|
from apprise.plugins.NotifyOpsgenie import OpsgeniePriority
|
||||||
import apprise
|
import apprise
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise.plugins.NotifyProwl import ProwlPriority
|
from apprise.plugins.NotifyProwl import ProwlPriority
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import pytest
|
import pytest
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from json import dumps
|
from json import dumps
|
||||||
from apprise import AppriseAttachment
|
from apprise import AppriseAttachment
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import six
|
import six
|
||||||
import requests
|
import requests
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from helpers import AppriseURLTester
|
from helpers import AppriseURLTester
|
||||||
|
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import Apprise
|
from apprise import Apprise
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from json import loads
|
from json import loads
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -23,7 +23,14 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import sys
|
import sys
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
from apprise import Apprise
|
from apprise import Apprise
|
||||||
|
@ -23,7 +23,14 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from json import dumps
|
from json import dumps
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import apprise
|
import apprise
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
|
@ -27,7 +27,14 @@ import os
|
|||||||
import six
|
import six
|
||||||
import sys
|
import sys
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from json import dumps
|
from json import dumps
|
||||||
from json import loads
|
from json import loads
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import pytest
|
import pytest
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
@ -23,7 +23,14 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from json import dumps
|
from json import dumps
|
||||||
from apprise import plugins
|
from apprise import plugins
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
@ -24,7 +24,14 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
try:
|
||||||
|
# Python 3.x
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
# Python 2.7
|
||||||
|
import mock
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import six
|
import six
|
||||||
import types
|
import types
|
||||||
|
Loading…
Reference in New Issue
Block a user