Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Commit

Permalink
Apply fix for 'AttributeError: _real_send' when built on Fedora 26
Browse files Browse the repository at this point in the history
  • Loading branch information
ganto committed Jun 11, 2017
1 parent 548aa45 commit 53afa89
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
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.
14 changes: 9 additions & 5 deletions python-mock-services/python-mock-services.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 53afa89

Please sign in to comment.