This repository has been archived by the owner on Aug 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply fix for 'AttributeError: _real_send' when built on Fedora 26
- Loading branch information
Showing
2 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
python-mock-services/mock-services-0.3-real_send-does-not-exist-in-MockerCore.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From 714c3cf6b85810d2e4fecff8567dee9625564065 Mon Sep 17 00:00:00 2001 | ||
From: atx <[email protected]> | ||
Date: Sun, 5 Feb 2017 12:37:53 +0100 | ||
Subject: [PATCH] _real_send does not exist in MockerCore | ||
|
||
--- | ||
mock_services/http_mock.py | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/mock_services/http_mock.py b/mock_services/http_mock.py | ||
index a4ed5d3..8b94751 100644 | ||
--- a/mock_services/http_mock.py | ||
+++ b/mock_services/http_mock.py | ||
@@ -25,7 +25,7 @@ def __init__(self, *args, **kwargs): | ||
self._adapter = _adapter | ||
|
||
def is_started(self): | ||
- return self._real_send | ||
+ return self._last_send | ||
|
||
def set_allow_external(self, allow): | ||
"""Set flag to authorize external calls when no matching mock. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,12 @@ | |
|
||
Name: python-%{pkgname} | ||
Version: 0.3 | ||
Release: 4%{?dist} | ||
Release: 5%{?dist} | ||
Summary: Easy way of mocking API Services | ||
License: MIT | ||
URL: https://pypi.python.org/pypi/%{pkgname} | ||
Source0: https://github.com/novafloss/%{pkgname}/archive/%{version}/%{pkgname}-%{version}.tar.gz | ||
Patch0: mock-services-0.3-real_send-does-not-exist-in-MockerCore.patch | ||
BuildArch: noarch | ||
|
||
%description | ||
|
@@ -69,7 +70,10 @@ Python 3 version. | |
%endif | ||
|
||
%prep | ||
%autosetup -n %{pkgname}-%{version} | ||
%setup -n %{pkgname}-%{version} | ||
%if 0%{?fedora} >= 26 | ||
%patch0 -p1 | ||
%endif | ||
|
||
%build | ||
%py2_build | ||
|
@@ -104,13 +108,13 @@ PYTHONPATH=. nosetests-%{python3_version} | |
%endif | ||
|
||
%changelog | ||
* Sun Jun 11 2017 Reto Gantenbein <[email protected]> 0.3-4 | ||
* Sun Jun 11 2017 Reto Gantenbein <[email protected]> - 0.3-4 | ||
- Trigger rebuild to investigate build failure on fc26 | ||
|
||
* Fri Dec 30 2016 Reto Gantenbein <[email protected]> 0.3-3 | ||
* Fri Dec 30 2016 Reto Gantenbein <[email protected]> - 0.3-3 | ||
- Rebuild for Python 3.6 | ||
|
||
* Sun Dec 18 2016 Reto Gantenbein <[email protected]> 0.3-2 | ||
* Sun Dec 18 2016 Reto Gantenbein <[email protected]> - 0.3-2 | ||
- Fix python-requests-mock dependency definition | ||
|
||
* Sun Dec 18 2016 Reto Gantenbein <[email protected]> - 0.3-1 | ||
|