[python-pylons] Fix test_langs failure (rhbz#715777)

dmalcolm dmalcolm at fedoraproject.org
Tue Dec 6 15:50:42 UTC 2011


commit 45e4af0b775bb15cdf8cefa2348f501f825fec2c
Author: David Malcolm <dmalcolm at redhat.com>
Date:   Tue Dec 6 10:49:42 2011 -0500

    Fix test_langs failure (rhbz#715777)

 fix-test_langs.patch |    9 +++++++++
 python-pylons.spec   |   14 +++++++++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/fix-test_langs.patch b/fix-test_langs.patch
new file mode 100644
index 0000000..7cff82d
--- /dev/null
+++ b/fix-test_langs.patch
@@ -0,0 +1,9 @@
+diff -up Pylons-1.0/tests/test_units/test_basic_app.py.fix-test_langs Pylons-1.0/tests/test_units/test_basic_app.py
+--- Pylons-1.0/tests/test_units/test_basic_app.py.fix-test_langs	2011-12-06 10:41:16.777048557 -0500
++++ Pylons-1.0/tests/test_units/test_basic_app.py	2011-12-06 10:42:20.977044166 -0500
+@@ -91,4 +91,4 @@ class TestJsonifyDecorator(object):
+     def test_langs(self):
+         response = self.app.get(url(controller='i18nc', action='langs'), headers={
+                 'Accept-Language':'fr;q=0.6, en;q=0.1, ja;q=0.3'})
+-        assert "['fr', 'ja', 'en', 'en-us']" in response
++        assert "['fr', 'ja', 'en-us']" in response
diff --git a/python-pylons.spec b/python-pylons.spec
index 43a7ade..f73dc16 100644
--- a/python-pylons.spec
+++ b/python-pylons.spec
@@ -2,13 +2,21 @@
 
 Name: python-pylons
 Version: 1.0
-Release: 3%{?dist}
+Release: 4%{?dist}
 Summary: Pylons web framework
 
 Group: Development/Languages
 License: BSD
 URL: http://www.pylonshq.com/
 Source0: http://pypi.python.org/packages/source/P/Pylons/Pylons-%{version}.tar.gz
+
+# Fix failing test:
+#  tests.test_units.test_basic_app.TestJsonifyDecorator.test_langs
+# Adapted from
+#   https://github.com/Pylons/pylons/commit/0789e367113f75c41170ba2fbf8250a0390e633f
+# (rhbz#715777)
+Patch1: fix-test_langs.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 BuildRequires: python-setuptools-devel
@@ -56,6 +64,7 @@ website development in Python easy. Several key points:
 %prep
 %setup -q -n Pylons-%{version}
 
+%patch1 -p1
 
 %build
 %{__python} setup.py build
@@ -81,6 +90,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Tue Dec  6 2011 David Malcolm <dmalcolm at redhat.com> - 1.0-4
+- fix test_langs failure (rhbz#715777)
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list