[python-pylons] Apply a patch to get the test suite working again

Luke Macken lmacken at fedoraproject.org
Sat Oct 12 02:02:11 UTC 2013


commit 9454a7e2a1f604ff1eaa84c7f8c90383d196a767
Author: Luke Macken <lmacken at redhat.com>
Date:   Fri Oct 11 19:59:54 2013 -0600

    Apply a patch to get the test suite working again

 python-pylons-1.0.1-test-nonascii-url.patch |   11 +++++++++++
 python-pylons.spec                          |    6 +++++-
 2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/python-pylons-1.0.1-test-nonascii-url.patch b/python-pylons-1.0.1-test-nonascii-url.patch
new file mode 100644
index 0000000..7c6aa6d
--- /dev/null
+++ b/python-pylons-1.0.1-test-nonascii-url.patch
@@ -0,0 +1,11 @@
+--- Pylons-1.0.1/tests/test_units/test_decorator_validate.py.orig	2013-10-11 19:54:13.666305783 -0600
++++ Pylons-1.0.1/tests/test_units/test_decorator_validate.py	2013-10-11 19:54:42.011683602 -0600
+@@ -100,7 +100,7 @@
+ 
+     def test_network_failed_validation_non_ascii(self):
+         response = self.post_response(action='network', new_network='Росси́я')
+-        assert 'That is not a valid URL' in response
++        assert 'You must provide a full domain name' in response, response
+         assert 'Росси́я' in response
+ 
+     def test_recurse_validated(self):
diff --git a/python-pylons.spec b/python-pylons.spec
index 4437769..89d9b9d 100644
--- a/python-pylons.spec
+++ b/python-pylons.spec
@@ -5,6 +5,8 @@ Summary:        Pylons web framework
 License:        BSD
 URL:            http://www.pylonsproject.org
 Source0:        http://pypi.python.org/packages/source/P/Pylons/Pylons-%{version}.tar.gz
+Patch0:         %{name}-%{version}-test-nonascii-url.patch
+
 BuildRequires:  python2-devel
 BuildRequires:  python-setuptools
 # For the test suite
@@ -48,6 +50,7 @@ website development in Python easy. Several key points:
 
 %prep
 %setup -qn Pylons-%{version}
+%patch0 -p1
 
 %build
 %{__python} setup.py build
@@ -57,7 +60,7 @@ website development in Python easy. Several key points:
 sed -i -e 's|/usr/bin/env python|%{__python}|g' *.py
 
 %check
-#PYTHONPATH=$(pwd) nosetests -v
+PYTHONPATH=$(pwd) nosetests
 
 %files
 %doc CHANGELOG LICENSE README.txt
@@ -68,6 +71,7 @@ sed -i -e 's|/usr/bin/env python|%{__python}|g' *.py
 %changelog
 * Fri Oct 11 2013 Luke Macken <lmacken at redhat.com> - 1.0.1-2
 - Update the requirements (#1018333)
+- Apply a patch to get the test suite working again
 
 * Mon Aug 26 2013 Christopher Meng <rpm at cicku.me> - 1.0.1-1
 - SPEC cleanup.


More information about the scm-commits mailing list