Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:amosery:branches:openSUSE:Factory
python-httpretty
remove-mock.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File remove-mock.patch of Package python-httpretty
Index: httpretty-1.1.4/tests/functional/test_fakesocket.py =================================================================== --- httpretty-1.1.4.orig/tests/functional/test_fakesocket.py +++ httpretty-1.1.4/tests/functional/test_fakesocket.py @@ -28,7 +28,10 @@ import functools import socket -import mock +try: + from unittest.mock import patch +except ImportError: + from mock import patch class FakeSocket(socket.socket): @@ -60,7 +63,7 @@ def recv(flag, size): recv = functools.partial(recv, fake_socket_interupter_flag) -@mock.patch('httpretty.old_socket', new=FakeSocket) +@patch('httpretty.old_socket', new=FakeSocket) def _test_shorten_response(): u"HTTPretty shouldn't try to read from server when communication is over" from sure import expect @@ -68,7 +71,7 @@ def _test_shorten_response(): fakesocket = httpretty.fakesock.socket(socket.AF_INET, socket.SOCK_STREAM) - with mock.patch.object(fakesocket.truesock, 'recv', recv): + with patch.object(fakesocket.truesock, 'recv', recv): fakesocket.connect(('localhost', 80)) fakesocket._true_sendall('WHATEVER') expect(fakesocket.fd.read()).to.equal(
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor