backport PR to replace a mock import
Mock is deprecated in Fedora.
This commit is contained in:
parent
03cf1aca62
commit
491e0b3137
28
Replace-mock-import-with-compat.mock.patch
Normal file
28
Replace-mock-import-with-compat.mock.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From ddf298097c26a855fa58137dba1931c28c4d22aa Mon Sep 17 00:00:00 2001
|
||||
From: Matt Clay <matt@mystile.com>
|
||||
Date: Fri, 21 Apr 2023 13:00:21 -0700
|
||||
Subject: [PATCH] [stable-2.15] tests: replace a mock import with unittest.mock
|
||||
(#80589) (#80603)
|
||||
|
||||
(cherry picked from commit f4615d69ad2ef1f024ba677ee6a77f49a4b7bfff)
|
||||
|
||||
Co-authored-by: Maxwell G <maxwell@gtmx.me>
|
||||
---
|
||||
test/units/ansible_test/test_validate_modules.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/units/ansible_test/test_validate_modules.py b/test/units/ansible_test/test_validate_modules.py
|
||||
index ed2518d9c5369b..8397db7ddc7035 100644
|
||||
--- a/test/units/ansible_test/test_validate_modules.py
|
||||
+++ b/test/units/ansible_test/test_validate_modules.py
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Tests for validate-modules regexes."""
|
||||
from __future__ import annotations
|
||||
|
||||
-import mock
|
||||
import pathlib
|
||||
import sys
|
||||
+from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
@ -14,6 +14,7 @@ License: GPL-3.0-or-later AND BSD-2-Clause AND PSF-2.0 AND MIT AND Apache-2.0
|
||||
Source0: https://github.com/ansible/ansible/archive/v%{uversion}/%{name}-%{uversion}.tar.gz
|
||||
Source1: build_manpages.py
|
||||
Patch: https://github.com/ansible/ansible/commit/79751ed970f01ff76270f3dbcae04aa87789eb05.patch#/improve-dnf-version-detection.patch
|
||||
Patch: https://github.com/ansible/ansible/commit/ddf298097c26a855fa58137dba1931c28c4d22aa.patch#/Replace-mock-import-with-compat.mock.patch
|
||||
Url: https://ansible.com
|
||||
BuildArch: noarch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user