mirror of
https://github.com/caronc/apprise.git
synced 2025-01-01 03:29:53 +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
|
||||
flake8
|
||||
mock
|
||||
mock; python_version=='2.7'
|
||||
pytest
|
||||
pytest-cov
|
||||
tox
|
||||
|
@ -60,7 +60,7 @@ Techulus Push, Telegram, Twilio, Twitter, Twist, XBMC, Vonage, Webex Teams}
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 1.0.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A simple wrapper to many popular notification services used today
|
||||
License: MIT
|
||||
URL: https://github.com/caronc/%{pypi_name}
|
||||
@ -161,7 +161,12 @@ Requires: python%{python3_pkgversion}-cryptography
|
||||
Requires: python%{python3_pkgversion}-yaml
|
||||
|
||||
%if %{with tests}
|
||||
%if 0%{?rhel} >= 9
|
||||
# Do not import python3-mock
|
||||
%else
|
||||
# python-mock switched to unittest.mock
|
||||
BuildRequires: python%{python3_pkgversion}-mock
|
||||
%endif
|
||||
BuildRequires: python%{python3_pkgversion}-pytest
|
||||
BuildRequires: python%{python3_pkgversion}-pytest-runner
|
||||
%endif
|
||||
@ -183,6 +188,17 @@ rm -f apprise/py3compat/asyncio.py
|
||||
%patch1 -p1
|
||||
%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
|
||||
%if 0%{?with_python2}
|
||||
%py2_build
|
||||
@ -243,6 +259,9 @@ LANG=C.UTF-8 PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version
|
||||
%endif
|
||||
|
||||
%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
|
||||
- Updated to v1.0.0
|
||||
|
||||
|
@ -26,7 +26,14 @@ import re
|
||||
import os
|
||||
import six
|
||||
import requests
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
from json import dumps
|
||||
from random import choice
|
||||
from string import ascii_uppercase as str_alpha
|
||||
|
@ -29,7 +29,14 @@ import sys
|
||||
import six
|
||||
import pytest
|
||||
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 join
|
||||
|
||||
|
@ -26,7 +26,14 @@
|
||||
import sys
|
||||
import six
|
||||
import io
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
from apprise import NotifyFormat
|
||||
from apprise import ConfigFormat
|
||||
|
@ -23,7 +23,14 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
from apprise.attachment.AttachBase import AttachBase
|
||||
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import re
|
||||
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 join
|
||||
from apprise.attachment.AttachBase import AttachBase
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import re
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
import mimetypes
|
||||
from os.path import join
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
from __future__ import print_function
|
||||
import re
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
import json
|
||||
from inspect import cleandoc
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
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.plugins.NotifyBase import NotifyBase
|
||||
from apprise.AppriseAsset import AppriseAsset
|
||||
|
@ -26,7 +26,14 @@
|
||||
import six
|
||||
import time
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise.common import ConfigFormat
|
||||
from apprise.config.ConfigHTTP import ConfigHTTP
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
from apprise import Apprise
|
||||
|
@ -27,7 +27,14 @@ import sys
|
||||
from json import loads
|
||||
import pytest
|
||||
import requests
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import apprise
|
||||
|
||||
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import os
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import ctypes
|
||||
|
||||
from apprise import AppriseLocale
|
||||
|
@ -26,7 +26,14 @@
|
||||
import re
|
||||
import os
|
||||
import sys
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import Apprise
|
||||
|
@ -23,7 +23,14 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
from helpers import AppriseURLTester
|
||||
from apprise import plugins
|
||||
from apprise import NotifyType
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
import os
|
||||
import sys
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
from helpers import AppriseURLTester
|
||||
|
@ -23,7 +23,14 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
import json
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
from helpers import AppriseURLTester
|
||||
|
@ -25,7 +25,14 @@
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
from apprise import Apprise
|
||||
|
@ -25,7 +25,14 @@
|
||||
# Disable logging for a cleaner testing output
|
||||
import logging
|
||||
import requests
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
|
||||
import apprise
|
||||
from apprise.plugins.NotifyDapnet import DapnetPriority
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from helpers import AppriseURLTester
|
||||
|
@ -26,7 +26,14 @@
|
||||
import os
|
||||
import re
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import smtplib
|
||||
from email.header import decode_header
|
||||
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
from json import dumps
|
||||
from apprise import Apprise
|
||||
from apprise import plugins
|
||||
|
@ -33,7 +33,14 @@ import io
|
||||
import os
|
||||
import six
|
||||
import sys
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
import json
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import plugins
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import six
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from helpers import AppriseURLTester
|
||||
from apprise import plugins
|
||||
|
@ -26,7 +26,14 @@
|
||||
import re
|
||||
import six
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import sys
|
||||
import types
|
||||
import apprise
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import sys
|
||||
import types
|
||||
import pytest
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
import apprise
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import sys
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import six
|
||||
import pytest
|
||||
import apprise
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from helpers import AppriseURLTester
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
from apprise import Apprise
|
||||
|
@ -23,7 +23,14 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
from apprise import NotifyType
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
import apprise
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
from helpers import module_reload
|
||||
|
||||
import apprise
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from helpers import AppriseURLTester
|
||||
from apprise import plugins
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
import pytest
|
||||
from apprise import plugins
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import plugins
|
||||
|
@ -23,7 +23,14 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import re
|
||||
import sys
|
||||
import ssl
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import plugins
|
||||
|
@ -23,7 +23,14 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import json
|
||||
import requests
|
||||
import pytest
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
from helpers import AppriseURLTester
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
from helpers import AppriseURLTester
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
import os
|
||||
import json
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
import apprise
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from datetime import datetime
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise.plugins.NotifyOpsgenie import OpsgeniePriority
|
||||
import apprise
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise.plugins.NotifyProwl import ProwlPriority
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import os
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from json import dumps
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import plugins
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import os
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
import pytest
|
||||
from json import dumps
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from json import dumps
|
||||
from apprise import AppriseAttachment
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import six
|
||||
import requests
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
from apprise import plugins
|
||||
from helpers import AppriseURLTester
|
||||
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import plugins
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import plugins
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import os
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import Apprise
|
||||
|
@ -25,7 +25,14 @@
|
||||
import os
|
||||
import sys
|
||||
from json import loads
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import plugins
|
||||
|
@ -23,7 +23,14 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
import sys
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
import json
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from json import dumps
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import plugins
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from apprise import plugins
|
||||
from apprise import Apprise
|
||||
|
@ -23,7 +23,14 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from apprise import plugins
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from json import dumps
|
||||
from apprise import plugins
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import re
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import apprise
|
||||
import socket
|
||||
|
||||
|
@ -27,7 +27,14 @@ import os
|
||||
import six
|
||||
import sys
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from json import dumps
|
||||
from json import loads
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
import pytest
|
||||
from json import dumps
|
||||
|
@ -23,7 +23,14 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import requests
|
||||
from json import dumps
|
||||
from apprise import plugins
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
import os
|
||||
import six
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from json import dumps
|
||||
|
@ -22,7 +22,14 @@
|
||||
# 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
|
||||
# THE SOFTWARE.
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from json import dumps
|
||||
|
@ -24,7 +24,14 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import pytest
|
||||
import mock
|
||||
try:
|
||||
# Python 3.x
|
||||
from unittest import mock
|
||||
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
import mock
|
||||
|
||||
import sys
|
||||
import six
|
||||
import types
|
||||
|
Loading…
Reference in New Issue
Block a user