14
0

Accepting request 998100 from devel:languages:python

- Add patch remove-mock.patch:
  * Use unittest.mock, rather than mock.

OBS-URL: https://build.opensuse.org/request/show/998100
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-moban-ansible?expand=0&rev=2
This commit is contained in:
2022-08-19 15:56:31 +00:00
committed by Git OBS Bridge
3 changed files with 24 additions and 8 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 19 06:53:34 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch remove-mock.patch:
* Use unittest.mock, rather than mock.
-------------------------------------------------------------------
Thu Sep 24 08:40:44 UTC 2020 - pgajdos@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-moban-ansible
# spec file
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -34,12 +34,11 @@ Version: 0.0.2
Release: 0
Summary: Ansible filters, tests and utility functions for moban users
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/moremoban/moban-ansible
Source: https://files.pythonhosted.org/packages/source/m/moban-ansible/moban-ansible-%{version}.tar.gz
# https://github.com/moremoban/moban-ansible/pull/2
Patch0: python-moban-ansible-remove-nose.patch
BuildRequires: %{python_module devel}
Patch0: python-moban-ansible-remove-nose.patch
Patch1: remove-mock.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -49,7 +48,6 @@ BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module moban >= 0.8.1}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module mock}
%endif
# /SECTION
%python_subpackages
@@ -58,8 +56,7 @@ BuildRequires: %{python_module mock}
Ansible filters, tests and utility functions for moban users
%prep
%setup -q -n moban-ansible-%{version}
%patch0 -p1
%autosetup -p1 -n moban-ansible-%{version}
%if !%{with test}
%build

13
remove-mock.patch Normal file
View File

@@ -0,0 +1,13 @@
Index: moban-ansible-0.0.2/tests/utils.py
===================================================================
--- moban-ansible-0.0.2.orig/tests/utils.py
+++ moban-ansible-0.0.2/tests/utils.py
@@ -2,7 +2,7 @@ import os
import sys
from textwrap import dedent
-from mock import patch
+from unittest.mock import patch
import unittest
from moban.main import main