diff --git a/README.rst b/README.rst index e9a3ad26..973a89ad 100644 --- a/README.rst +++ b/README.rst @@ -63,27 +63,28 @@ Install the required PIP packages with the command ## Executing The test suite allows for overriding the target server and user parameters via the following arguments: - ---url default="https://localhost" ---user default="admin" ---pass This is the password for the user defined above. ---skipverify This is for allowing the version of PyDriver to not match the version of Swimlane. + :: + pytest + --url default="https://localhost" + --user default="admin" + --pass This is the password for the user defined above. + --skipverify This is for allowing the version of PyDriver to not match the version of Swimlane. To run a specific test and skip the version verification: -pytest driver_tests/test_app_adaptor.py --skipverify +:: + pytest driver_tests/test_app_adaptor.py --skipverify To run all the tests against 10.20.30.40: - -pytest --url "https://10.20.30.40" - + :: + pytest --url "https://10.20.30.40" .. NOTE:: All of the data created for testing purposes is cleaned up. No preset data is needed beyond the base user. - These tests are Python 2 and 3 compatible. + These tests are Python 3.6+ compatible. Issues ------ diff --git a/requirements.txt b/requirements.txt index f00aeb94..c168fb50 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ -cachetools==4.2.4; python_version == '3.6' -cachetools==5.3.3; python_version >= '3.7' -certifi>=2017 +cachetools>=4.2.4 +certifi>=20i7 pendulum>=2.1.2 pyjwt>=2.4.0 pyuri>=0.3,<0.4 diff --git a/setup.py b/setup.py index f750aa4a..d9f06fbd 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,7 @@ def parse_requirements(requirement_file): author="Swimlane", author_email="info@swimlane.com", url="https://github.com/swimlane/swimlane-python", + python_requires=">=3.6", packages=find_packages(exclude=('tests', 'tests.*')), description="Python driver for the Swimlane API", long_description=long_description, @@ -29,8 +30,6 @@ def parse_requirements(requirement_file): "License :: OSI Approved :: GNU Affero General Public License v3", "Development Status :: 5 - Production/Stable", "Programming Language :: Python", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", diff --git a/tests/adapters/test_app_adapter.py b/tests/adapters/test_app_adapter.py index be3e0681..6da51259 100644 --- a/tests/adapters/test_app_adapter.py +++ b/tests/adapters/test_app_adapter.py @@ -1,4 +1,4 @@ -import mock +import unittest.mock as mock import pytest diff --git a/tests/adapters/test_app_revision_adapter.py b/tests/adapters/test_app_revision_adapter.py index 31fbefdb..7a491c96 100644 --- a/tests/adapters/test_app_revision_adapter.py +++ b/tests/adapters/test_app_revision_adapter.py @@ -1,6 +1,6 @@ import math -import mock +import unittest.mock as mock from swimlane.core.resources.app_revision import AppRevision diff --git a/tests/adapters/test_helper_adapter.py b/tests/adapters/test_helper_adapter.py index 237b35b3..212c972c 100644 --- a/tests/adapters/test_helper_adapter.py +++ b/tests/adapters/test_helper_adapter.py @@ -1,4 +1,4 @@ -import mock +import unittest.mock as mock app_id = '123' record_id = '456' diff --git a/tests/adapters/test_record_adapter.py b/tests/adapters/test_record_adapter.py index 83d8c2e7..04ce7479 100644 --- a/tests/adapters/test_record_adapter.py +++ b/tests/adapters/test_record_adapter.py @@ -1,6 +1,6 @@ import numbers -import mock +import unittest.mock as mock import pytest import six diff --git a/tests/adapters/test_record_revision_adapter.py b/tests/adapters/test_record_revision_adapter.py index 2b330203..bb302cfa 100644 --- a/tests/adapters/test_record_revision_adapter.py +++ b/tests/adapters/test_record_revision_adapter.py @@ -1,4 +1,4 @@ -import mock +import unittest.mock as mock from swimlane.core.resources.record_revision import RecordRevision diff --git a/tests/adapters/test_report_adapter.py b/tests/adapters/test_report_adapter.py index 0116488b..738d1b95 100644 --- a/tests/adapters/test_report_adapter.py +++ b/tests/adapters/test_report_adapter.py @@ -1,4 +1,4 @@ -import mock +import unittest.mock as mock from swimlane.core.resources.report import Report diff --git a/tests/adapters/test_task_adapter.py b/tests/adapters/test_task_adapter.py index f0f75f60..3467ddc0 100644 --- a/tests/adapters/test_task_adapter.py +++ b/tests/adapters/test_task_adapter.py @@ -1,6 +1,6 @@ import json import pytest -import mock +import unittest.mock as mock from requests.models import Response from swimlane.core.adapters import TaskAdapter from swimlane.core.resources.task import Task diff --git a/tests/adapters/test_usergroup_adapters.py b/tests/adapters/test_usergroup_adapters.py index e8a62ea2..08922121 100644 --- a/tests/adapters/test_usergroup_adapters.py +++ b/tests/adapters/test_usergroup_adapters.py @@ -1,4 +1,4 @@ -import mock +import unittest.mock as mock import pytest from swimlane.core.resources.usergroup import Group, User diff --git a/tests/conftest.py b/tests/conftest.py index 3bc6f8b5..d7516337 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,7 @@ import json from pathlib import Path from shutil import copy as cp -import mock +import unittest.mock as mock import pytest from swimlane.core.client import SwimlaneJwtAuth, Swimlane from swimlane.core.resources.app import App diff --git a/tests/fields/test_attachment.py b/tests/fields/test_attachment.py index 885326f5..9e942547 100644 --- a/tests/fields/test_attachment.py +++ b/tests/fields/test_attachment.py @@ -1,7 +1,7 @@ from datetime import datetime from io import BytesIO -import mock +import unittest.mock as mock import pytest from swimlane.core.fields.attachment import AttachmentCursor from swimlane.core.resources.attachment import Attachment diff --git a/tests/fields/test_comment.py b/tests/fields/test_comment.py index 4d6800df..07049406 100644 --- a/tests/fields/test_comment.py +++ b/tests/fields/test_comment.py @@ -1,6 +1,6 @@ from datetime import datetime -import mock +import unittest.mock as mock from swimlane.core.fields.comment import CommentCursor from swimlane.core.resources.comment import Comment diff --git a/tests/fields/test_history.py b/tests/fields/test_history.py index 0bb1cb72..25b3e898 100644 --- a/tests/fields/test_history.py +++ b/tests/fields/test_history.py @@ -1,4 +1,4 @@ -import mock +import unittest.mock as mock import pytest import pendulum diff --git a/tests/fields/test_reference.py b/tests/fields/test_reference.py index d5f052b2..c6095343 100644 --- a/tests/fields/test_reference.py +++ b/tests/fields/test_reference.py @@ -1,4 +1,4 @@ -import mock +import unittest.mock as mock import pytest from swimlane.core.fields.reference import ReferenceCursor diff --git a/tests/resources/test_record.py b/tests/resources/test_record.py index 9a076cc5..9d3d6575 100644 --- a/tests/resources/test_record.py +++ b/tests/resources/test_record.py @@ -1,6 +1,6 @@ import json import pendulum -import mock +import unittest.mock as mock import pytest from requests import Response from swimlane.core.fields.reference import ReferenceCursor diff --git a/tests/resources/test_record_revision.py b/tests/resources/test_record_revision.py index f8836788..053f2ae5 100644 --- a/tests/resources/test_record_revision.py +++ b/tests/resources/test_record_revision.py @@ -1,4 +1,4 @@ -import mock +import unittest.mock as mock import pendulum import pytest diff --git a/tests/resources/test_report.py b/tests/resources/test_report.py index 747ad4b3..10b88475 100644 --- a/tests/resources/test_report.py +++ b/tests/resources/test_report.py @@ -1,4 +1,4 @@ -import mock +import unittest.mock as mock import pytest from swimlane.core.resources.report import report_factory diff --git a/tests/resources/test_usergroups.py b/tests/resources/test_usergroups.py index e051b795..4fb3187f 100644 --- a/tests/resources/test_usergroups.py +++ b/tests/resources/test_usergroups.py @@ -1,6 +1,6 @@ import pytest from mock import patch -import mock +import unittest.mock as mock import copy from swimlane.core.cache import ResourcesCache diff --git a/tests/test_cache.py b/tests/test_cache.py index ae93cfda..9be067cc 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -2,7 +2,7 @@ import copy -import mock +import unittest.mock as mock import pytest from swimlane.core.cache import ResourcesCache, check_cache diff --git a/tests/test_client.py b/tests/test_client.py index 9d63d5cd..ce39f1cc 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,5 +1,5 @@ """Tests for custom Swimlane errors""" -import mock +import unittest.mock as mock import pytest from requests import HTTPError diff --git a/tests/test_utils.py b/tests/test_utils.py index a58f6a85..0fbc110d 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -2,7 +2,7 @@ import string import sys -import mock +import unittest.mock as mock import pytest from pkg_resources import DistributionNotFound