[python-pyramid] Apply a patch to fix a unit test

Luke Macken lmacken at fedoraproject.org
Thu Aug 28 16:11:32 UTC 2014


commit 003ec4b9dffe878045a61dbadccfc9e07bc9fb17
Author: Luke Macken <lmacken at redhat.com>
Date:   Thu Aug 28 10:10:39 2014 -0600

    Apply a patch to fix a unit test

 python-pyramid-xml-mimetype.patch |   11 +++++++++++
 python-pyramid.spec               |    3 +++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/python-pyramid-xml-mimetype.patch b/python-pyramid-xml-mimetype.patch
new file mode 100644
index 0000000..7be8b03
--- /dev/null
+++ b/python-pyramid-xml-mimetype.patch
@@ -0,0 +1,11 @@
+--- pyramid-1.5.1.orig/pyramid/tests/test_response.py	2014-08-27 21:16:28.972378071 -0600
++++ pyramid-1.5.1/pyramid/tests/test_response.py	2014-08-27 21:17:01.592432632 -0600
+@@ -53,7 +53,7 @@
+     def test_without_content_type(self):
+         for suffix, content_type in (
+             ('txt', 'text/plain; charset=UTF-8'),
+-            ('xml', 'application/xml; charset=UTF-8'),
++            ('xml', 'text/xml; charset=UTF-8'),
+             ('pdf', 'application/pdf')
+         ):
+             path = self._getPath(suffix)
diff --git a/python-pyramid.spec b/python-pyramid.spec
index efeb211..05afe3e 100644
--- a/python-pyramid.spec
+++ b/python-pyramid.spec
@@ -13,6 +13,8 @@ Group:          Development/Libraries
 License:        BSD
 URL:            http://pylonsproject.com
 Source0:        http://pypi.python.org/packages/source/p/pyramid/%{modname}-%{version}.tar.gz
+# https://github.com/Pylons/pyramid/issues/1405
+Patch0:         %{name}-xml-mimetype.patch
 BuildArch:      noarch
 
 BuildRequires:  python2-devel
@@ -129,6 +131,7 @@ fun, more predictable, and more productive.
 
 %prep
 %setup -q -n pyramid-%{version}
+%patch0 -p1 -b .mimetype
 
 # Force that a certain version of webob is imported and not the older one.
 awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"WebOb>=1.2.1\", \"PasteDeploy>=1.5.0\", \"WebTest==1.3.4\", \"zope.interface>=4.0.2\"]; import pkg_resources"}1' setup.py > setup.py.tmp


More information about the scm-commits mailing list