From 2f9e50c2425bc838923982440b4506542e1317f6 Mon Sep 17 00:00:00 2001 From: koushik-kiran-kumar Date: Tue, 25 Jun 2024 17:10:39 +0530 Subject: [PATCH] fix: requirements --- Makefile | 2 +- docs/index.rst | 4 ---- test-requirements.txt | 1 + tests/adapters/test_app_adapter.py | 2 +- tests/adapters/test_app_revision_adapter.py | 2 +- tests/adapters/test_helper_adapter.py | 2 +- tests/adapters/test_record_adapter.py | 2 +- tests/adapters/test_record_revision_adapter.py | 2 +- tests/adapters/test_report_adapter.py | 2 +- tests/adapters/test_task_adapter.py | 2 +- tests/adapters/test_usergroup_adapters.py | 2 +- tests/conftest.py | 2 +- tests/fields/test_attachment.py | 2 +- tests/fields/test_comment.py | 2 +- tests/fields/test_history.py | 2 +- tests/fields/test_reference.py | 2 +- tests/resources/test_record.py | 2 +- tests/resources/test_record_revision.py | 2 +- tests/resources/test_report.py | 2 +- tests/resources/test_usergroups.py | 2 +- tests/test_cache.py | 2 +- tests/test_client.py | 2 +- tests/test_utils.py | 2 +- 23 files changed, 22 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 6ef49ca5..764abdb8 100644 --- a/Makefile +++ b/Makefile @@ -14,4 +14,4 @@ release: python setup.py sdist bdist_wheel upload -r swimlane build-offline-installer: - python2.7 offline_installer/build_installer.py + python3 offline_installer/build_installer.py diff --git a/docs/index.rst b/docs/index.rst index 4a599ec2..af107d63 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -50,10 +50,6 @@ Install/upgrade to latest release:: pip install -U swimlane -Install/upgrade to latest release for platform v2.x:: - - pip install -U "swimlane>=2,<3" - Offline Installer ^^^^^^^^^^^^^^^^^ diff --git a/test-requirements.txt b/test-requirements.txt index fc3734b8..cdf6caac 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,5 @@ faker +mock pytest>=6.2.5 pytest-pythonpath tox diff --git a/tests/adapters/test_app_adapter.py b/tests/adapters/test_app_adapter.py index 6da51259..be3e0681 100644 --- a/tests/adapters/test_app_adapter.py +++ b/tests/adapters/test_app_adapter.py @@ -1,4 +1,4 @@ -import unittest.mock as mock +import mock import pytest diff --git a/tests/adapters/test_app_revision_adapter.py b/tests/adapters/test_app_revision_adapter.py index 7a491c96..31fbefdb 100644 --- a/tests/adapters/test_app_revision_adapter.py +++ b/tests/adapters/test_app_revision_adapter.py @@ -1,6 +1,6 @@ import math -import unittest.mock as mock +import 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 212c972c..237b35b3 100644 --- a/tests/adapters/test_helper_adapter.py +++ b/tests/adapters/test_helper_adapter.py @@ -1,4 +1,4 @@ -import unittest.mock as mock +import mock app_id = '123' record_id = '456' diff --git a/tests/adapters/test_record_adapter.py b/tests/adapters/test_record_adapter.py index 04ce7479..83d8c2e7 100644 --- a/tests/adapters/test_record_adapter.py +++ b/tests/adapters/test_record_adapter.py @@ -1,6 +1,6 @@ import numbers -import unittest.mock as mock +import mock import pytest import six diff --git a/tests/adapters/test_record_revision_adapter.py b/tests/adapters/test_record_revision_adapter.py index bb302cfa..2b330203 100644 --- a/tests/adapters/test_record_revision_adapter.py +++ b/tests/adapters/test_record_revision_adapter.py @@ -1,4 +1,4 @@ -import unittest.mock as mock +import 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 738d1b95..0116488b 100644 --- a/tests/adapters/test_report_adapter.py +++ b/tests/adapters/test_report_adapter.py @@ -1,4 +1,4 @@ -import unittest.mock as mock +import 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 3467ddc0..f0f75f60 100644 --- a/tests/adapters/test_task_adapter.py +++ b/tests/adapters/test_task_adapter.py @@ -1,6 +1,6 @@ import json import pytest -import unittest.mock as mock +import 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 08922121..e8a62ea2 100644 --- a/tests/adapters/test_usergroup_adapters.py +++ b/tests/adapters/test_usergroup_adapters.py @@ -1,4 +1,4 @@ -import unittest.mock as mock +import mock import pytest from swimlane.core.resources.usergroup import Group, User diff --git a/tests/conftest.py b/tests/conftest.py index d7516337..3bc6f8b5 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 unittest.mock as mock +import 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 9e942547..885326f5 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 unittest.mock as mock +import 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 07049406..4d6800df 100644 --- a/tests/fields/test_comment.py +++ b/tests/fields/test_comment.py @@ -1,6 +1,6 @@ from datetime import datetime -import unittest.mock as mock +import 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 25b3e898..0bb1cb72 100644 --- a/tests/fields/test_history.py +++ b/tests/fields/test_history.py @@ -1,4 +1,4 @@ -import unittest.mock as mock +import mock import pytest import pendulum diff --git a/tests/fields/test_reference.py b/tests/fields/test_reference.py index c6095343..d5f052b2 100644 --- a/tests/fields/test_reference.py +++ b/tests/fields/test_reference.py @@ -1,4 +1,4 @@ -import unittest.mock as mock +import 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 9d3d6575..9a076cc5 100644 --- a/tests/resources/test_record.py +++ b/tests/resources/test_record.py @@ -1,6 +1,6 @@ import json import pendulum -import unittest.mock as mock +import 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 053f2ae5..f8836788 100644 --- a/tests/resources/test_record_revision.py +++ b/tests/resources/test_record_revision.py @@ -1,4 +1,4 @@ -import unittest.mock as mock +import mock import pendulum import pytest diff --git a/tests/resources/test_report.py b/tests/resources/test_report.py index 10b88475..747ad4b3 100644 --- a/tests/resources/test_report.py +++ b/tests/resources/test_report.py @@ -1,4 +1,4 @@ -import unittest.mock as mock +import 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 4fb3187f..e051b795 100644 --- a/tests/resources/test_usergroups.py +++ b/tests/resources/test_usergroups.py @@ -1,6 +1,6 @@ import pytest from mock import patch -import unittest.mock as mock +import mock import copy from swimlane.core.cache import ResourcesCache diff --git a/tests/test_cache.py b/tests/test_cache.py index 9be067cc..ae93cfda 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -2,7 +2,7 @@ import copy -import unittest.mock as mock +import mock import pytest from swimlane.core.cache import ResourcesCache, check_cache diff --git a/tests/test_client.py b/tests/test_client.py index ce39f1cc..9d63d5cd 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,5 +1,5 @@ """Tests for custom Swimlane errors""" -import unittest.mock as mock +import mock import pytest from requests import HTTPError diff --git a/tests/test_utils.py b/tests/test_utils.py index 0fbc110d..a58f6a85 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -2,7 +2,7 @@ import string import sys -import unittest.mock as mock +import mock import pytest from pkg_resources import DistributionNotFound