New upstream release - 0.4
Port to autosetup
This commit is contained in:
parent
4849af002a
commit
8c775f8ac4
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
/v0.3.tar.gz
|
||||
/v0.3.1.tar.gz
|
||||
/v0.3.2.tar.gz
|
||||
/kdcproxy-0.4.tar.gz
|
||||
|
@ -1,57 +0,0 @@
|
||||
From d9923b582a31cafce75ddd3a97857fa1794e22ca Mon Sep 17 00:00:00 2001
|
||||
From: Christian Heimes <cheimes@redhat.com>
|
||||
Date: Wed, 4 Jan 2017 15:02:00 +0100
|
||||
Subject: [PATCH] Fix tests
|
||||
|
||||
Python 2's mock is no longer compatible to more recent versions of
|
||||
Python's socket module. Tests are still fine without the autospec
|
||||
feature.
|
||||
|
||||
More recent versions of pytests refuse to load tests because pytest
|
||||
considers webtest.TestApp as a test class with a non-trival __init__.
|
||||
|
||||
Signed-off-by: Christian Heimes <cheimes@redhat.com>
|
||||
---
|
||||
tests.py | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests.py b/tests.py
|
||||
index 836f77b..9679823 100644
|
||||
--- a/tests.py
|
||||
+++ b/tests.py
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
from pyasn1.codec.der import decoder, encoder
|
||||
|
||||
-from webtest import TestApp
|
||||
+from webtest import TestApp as WebTestApp
|
||||
|
||||
import kdcproxy
|
||||
# from kdcproxy import asn1
|
||||
@@ -59,7 +59,7 @@ def setUp(self): # noqa
|
||||
self.await_reply.return_value = b'RESPONSE'
|
||||
self.resolver = self.app._Application__resolver = mock.Mock()
|
||||
self.resolver.lookup.return_value = ["kerberos://k1.kdcproxy.test.:88"]
|
||||
- self.tapp = TestApp(self.app)
|
||||
+ self.tapp = WebTestApp(self.app)
|
||||
|
||||
def post(self, body, expect_errors=False):
|
||||
return self.tapp.post(
|
||||
@@ -79,7 +79,7 @@ def test_get(self):
|
||||
self.assertEqual(r.text, 'Method not allowed (GET).')
|
||||
|
||||
@mock.patch('socket.getaddrinfo', return_value=addrinfo)
|
||||
- @mock.patch('socket.socket', autospec=True)
|
||||
+ @mock.patch('socket.socket')
|
||||
def test_post_asreq(self, m_socket, m_getaddrinfo):
|
||||
response = self.post(KDCProxyCodecTests.asreq1)
|
||||
self.assert_response(response)
|
||||
@@ -92,7 +92,7 @@ def test_post_asreq(self, m_socket, m_getaddrinfo):
|
||||
)
|
||||
|
||||
@mock.patch('socket.getaddrinfo', return_value=addrinfo)
|
||||
- @mock.patch('socket.socket', autospec=True)
|
||||
+ @mock.patch('socket.socket')
|
||||
def test_post_kpasswd(self, m_socket, m_getaddrinfo):
|
||||
response = self.post(KDCProxyCodecTests.kpasswdreq)
|
||||
self.assert_response(response)
|
@ -13,19 +13,17 @@
|
||||
%endif
|
||||
|
||||
Name: python-%{realname}
|
||||
Version: 0.3.2
|
||||
Release: 14%{?dist}
|
||||
Version: 0.4
|
||||
Release: 1%{?dist}
|
||||
Summary: MS-KKDCP (kerberos proxy) WSGI module
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/npmccallum/%{realname}
|
||||
Source0: https://github.com/npmccallum/%{realname}/archive/v%{version}.tar.gz
|
||||
# Fix failing tests
|
||||
# Commited upstream: https://github.com/latchset/kdcproxy/commit/d9923b582a31cafce75ddd3a97857fa1794e22ca
|
||||
Patch0: fix-failing-tests.patch
|
||||
Source0: https://github.com/npmccallum/%{realname}/archive/%{realname}-%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: /usr/bin/tox
|
||||
BuildRequires: git
|
||||
|
||||
%if 0%{?with_python2} > 0
|
||||
BuildRequires: python2-devel
|
||||
@ -82,8 +80,8 @@ minimal configuration.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n %{realname}-%{version}
|
||||
%patch0 -p1
|
||||
%autosetup -S git -n %{realname}-%{version}
|
||||
|
||||
|
||||
%build
|
||||
%if 0%{?with_python2} > 0
|
||||
@ -124,6 +122,10 @@ tox --sitepackages -e py%{python2_version_nodots},py%{python3_version_nodots} ||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Aug 09 2018 Robbie Harwood <rharwood@redhat.com> - 0.4-1
|
||||
- New upstream release - 0.4
|
||||
- Port to autosetup
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
4
sources
4
sources
@ -1,3 +1 @@
|
||||
2cb9cb0a870b9bc83da8993cb24391c3 v0.3.tar.gz
|
||||
668e54c315bc997d85ddcaeb264c9260 v0.3.1.tar.gz
|
||||
c7eb6a0e929af8c955736d5a239d4cdd v0.3.2.tar.gz
|
||||
SHA512 (kdcproxy-0.4.tar.gz) = a2d5fa63e9c9998ce308dd1842bf159d025cdec752b080e441ae514b69356b716848d48e615c5dea30da2ef143cf43bbfd05bc541ce8513fe9d3d141f0de838b
|
||||
|
Loading…
Reference in New Issue
Block a user