14
0

Accepting request 974870 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/974870
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-smpplib?expand=0&rev=5
This commit is contained in:
2022-05-04 13:11:13 +00:00
committed by Git OBS Bridge
3 changed files with 33 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
diff -upr python-smpplib-2.2.1.orig/smpplib/tests/test_client.py python-smpplib-2.2.1/smpplib/tests/test_client.py
--- python-smpplib-2.2.1.orig/smpplib/tests/test_client.py 2022-05-04 09:38:34.127959320 +0200
+++ python-smpplib-2.2.1/smpplib/tests/test_client.py 2022-05-04 09:38:34.147959444 +0200
@@ -1,6 +1,6 @@
import warnings
import pytest
-from mock import Mock, call
+from unittest.mock import Mock, call
from smpplib.client import Client
from smpplib.smpp import make_pdu
diff -upr python-smpplib-2.2.1.orig/smpplib/tests/test_gsm.py python-smpplib-2.2.1/smpplib/tests/test_gsm.py
--- python-smpplib-2.2.1.orig/smpplib/tests/test_gsm.py 2022-05-04 09:38:34.127959320 +0200
+++ python-smpplib-2.2.1/smpplib/tests/test_gsm.py 2022-05-04 09:38:34.147959444 +0200
@@ -1,6 +1,6 @@
# -*- coding: utf8 -*-
-import mock
+from unittest import mock
from pytest import mark, raises
from smpplib import consts

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed May 4 07:55:32 UTC 2022 - pgajdos@suse.com
- added patches
fix https://github.com/python-smpplib/python-smpplib/issues/200
+ python-smpplib-no-mock.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 22 11:07:55 UTC 2021 - Martin Hauke <mardnh@gmx.de> Mon Nov 22 11:07:55 UTC 2021 - Martin Hauke <mardnh@gmx.de>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-smpplib # spec file for package python-smpplib
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2022 SUSE LLC
# Copyright (c) 2016-2021, Martin Hauke <mardnh@gmx.de> # Copyright (c) 2016-2021, Martin Hauke <mardnh@gmx.de>
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@@ -27,12 +27,13 @@ Group: Development/Languages/Python
URL: https://pypi.org/project/smpplib/ URL: https://pypi.org/project/smpplib/
#Git-Clone: https://github.com/python-smpplib/python-smpplib.git #Git-Clone: https://github.com/python-smpplib/python-smpplib.git
Source: https://github.com/python-smpplib/python-smpplib/archive/%{version}.tar.gz#/smpplib-%{version}.tar.gz Source: https://github.com/python-smpplib/python-smpplib/archive/%{version}.tar.gz#/smpplib-%{version}.tar.gz
# https://github.com/python-smpplib/python-smpplib/issues/200
Patch0: python-smpplib-no-mock.patch
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six} BuildRequires: %{python_module six}
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module mock}
# /SECTION # /SECTION
BuildRequires: fdupes BuildRequires: fdupes
Requires: python-six Requires: python-six
@@ -47,6 +48,7 @@ allows you to send and receive SMS to an SMS gateway or SMSC.
%prep %prep
%setup -q -n python-smpplib-%{version} %setup -q -n python-smpplib-%{version}
%patch0 -p1
%build %build
%python_build %python_build