summaryrefslogtreecommitdiffstats
path: root/tests/python
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2016-02-29 09:19:18 +0100
committerChristian Heimes <cheimes@redhat.com>2016-02-29 16:11:08 +0100
commit6c82500627b5c2e0602312faefba97fbe15044b9 (patch)
tree6304ee9a873eb3e04d51b47ea406d1c4c5e63b91 /tests/python
parentbcd8373696d6a1262234dd4d17874ac56107b381 (diff)
downloadpki-6c82500627b5c2e0602312faefba97fbe15044b9.tar.gz
pki-6c82500627b5c2e0602312faefba97fbe15044b9.tar.xz
pki-6c82500627b5c2e0602312faefba97fbe15044b9.zip
Fedora 24 fixes for Python 3.5 and pylint 1.5
Fedora 24 has Python 3.5 instead of Python 3.4. tox.ini now uses python3 to use any Python 3 interpreter. Python 3.5 has unittest.mock in the stdlib. Tests must attempt to import mock from unittest first. Pylint 1.5 has deprecated a couple of old options. Dogtag doesn't use the options anyway. I just removed them from dogtag.pylintrc.
Diffstat (limited to 'tests/python')
-rw-r--r--tests/python/test_authority.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/python/test_authority.py b/tests/python/test_authority.py
index b25816c23..e55b9c82d 100644
--- a/tests/python/test_authority.py
+++ b/tests/python/test_authority.py
@@ -19,7 +19,10 @@
# All rights reserved.
#
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import unittest
import uuid