From 9f3c8c8fad9dd5096b3bfc1e48c50bc08f047d08 Mon Sep 17 00:00:00 2001 From: Craig Weber Date: Wed, 8 May 2024 16:35:55 -0400 Subject: [PATCH] Replace mock with unittest.mock From mock's project description[^1]: > mock is now part of the Python standard library, available as unittest.mock in Python 3.3 onwards. [^1]: https://pypi.org/project/mock/#description --- .gitlab-ci.yml | 4 ++-- setup.py | 1 - tests/test_admin_views.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27d8dd1..4c665c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,14 +14,14 @@ head: extends: .python_test image: python:3.11 before_script: - - pip install .['testing'] + - pip install . lts_52: image: python:3.11 extends: .python_test before_script: - - pip install .['testing'] wagtail~=5.2 django~=4.2 + - pip install . wagtail~=5.2 django~=4.2 flake8: stage: lint diff --git a/setup.py b/setup.py index 0461f49..f7d7d91 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,6 @@ "django-enumchoicefield>=1.1.0", "bcp47==0.0.4", ], - extras_require={"testing": ["mock==2.0.0"]}, zip_safe=False, license="BSD License", packages=find_packages(), diff --git a/tests/test_admin_views.py b/tests/test_admin_views.py index 953fc0d..3eeca24 100644 --- a/tests/test_admin_views.py +++ b/tests/test_admin_views.py @@ -6,7 +6,7 @@ from django.template.defaultfilters import filesizeformat from django.test import TestCase, override_settings from django.urls import reverse -from mock import patch +from unittest.mock import patch from wagtail.models import Collection, GroupCollectionPermission from wagtail.test.utils import WagtailTestUtils