From 8e34ae4bfb9b35bdefa23f25e53d1d5ee2544baf Mon Sep 17 00:00:00 2001 From: sigui Date: Sun, 22 Mar 2020 01:18:13 +0800 Subject: [PATCH] fix test error --- fix_http_test.patch | 32 ++++++++++++++++++++++++++++++++ python-suds.spec | 9 ++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 fix_http_test.patch diff --git a/fix_http_test.patch b/fix_http_test.patch new file mode 100644 index 0000000..d92ce92 --- /dev/null +++ b/fix_http_test.patch @@ -0,0 +1,32 @@ +diff -up jurko-suds-94664ddd46a6/tests/test_transport_http.py.httptestfix jurko-suds-94664ddd46a6/tests/test_transport_http.py +--- jurko-suds-94664ddd46a6/tests/test_transport_http.py.httptestfix 2015-07-27 05:08:20.000000000 -0400 ++++ jurko-suds-94664ddd46a6/tests/test_transport_http.py 2016-01-09 23:29:22.749940293 -0500 +@@ -120,6 +120,9 @@ class MockFP: + def readline(): + raise MustNotBeCalled + ++ def close(self): ++ pass ++ + + class MockURLOpenerSaboteur: + """ +@@ -295,12 +298,18 @@ def test_sending_using_network_sockets(s + self.__mocker.mock_sent_data += data + def settimeout(self, *args, **kwargs): + pass ++ def setsockopt(self, level, optname, value): ++ pass + + class MockSocketReader(CountedMock): + def __init__(self): + super(MockSocketReader, self).__init__() + def readline(self, *args, **kwargs): + raise MyException ++ def close(self): ++ pass ++ def flush(self): ++ pass + + # Setup. + host = "an-easily-recognizable-host-name-214894932" diff --git a/python-suds.spec b/python-suds.spec index 7d463ed..da9ef0a 100644 --- a/python-suds.spec +++ b/python-suds.spec @@ -1,10 +1,11 @@ Name: python-suds Version: 0.7 -Release: 1 +Release: 2 Summary: A python SOAP client License: LGPLv3+ URL: https://bitbucket.org/jurko/suds Source0: https://bitbucket.org/jurko/suds/get/94664ddd46a6.tar.bz2 +Patch0: fix_http_test.patch BuildArch: noarch %description @@ -32,6 +33,9 @@ for Python licensed under LGPL. %prep %setup -c -q mv jurko-suds-94664ddd46a6 python2 +cd python2 +%patch0 -p1 +cd - cp -a python2 python3 %build @@ -69,5 +73,8 @@ cd - %{python3_sitelib}/* %changelog +* Sun Mar 22 2020 sunguoshuai - 0.7-2 +- Fix http test error. + * Thu Feb 13 2020 Ruijun Ge - 0.7-1 - init package