[Python-modules-team] Bug#906166: flask-restful: Fix failing test test_fr_405 (cherry pick from upstream)

James Page james.page at ubuntu.com
Wed Aug 15 09:26:52 BST 2018


Package: flask-restful
Version: 0.3.6-6
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu cosmic ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * Enable unit test execution:
    - d/rules: Remove override of dh_auto_test.
    - d/p/fix-fr-405.patch: Cherry pick upstream change for failing
      test with newer flask versions.

Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers cosmic
  APT policy: (500, 'cosmic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.17.0-6-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru flask-restful-0.3.6/debian/patches/fix-fr-405.patch flask-restful-0.3.6/debian/patches/fix-fr-405.patch
--- flask-restful-0.3.6/debian/patches/fix-fr-405.patch	1970-01-01 01:00:00.000000000 +0100
+++ flask-restful-0.3.6/debian/patches/fix-fr-405.patch	2018-08-15 09:19:53.000000000 +0100
@@ -0,0 +1,14 @@
+Description: Fix failing test
+Origin: https://github.com/flask-restful/flask-restful/commit/8e89064f0515744f0aa14ccc3852d0b399198773
+
+--- a/tests/test_api.py
++++ b/tests/test_api.py
+@@ -784,7 +784,7 @@ class APITestCase(unittest.TestCase):
+         allow = ', '.join(set(resp.headers.get_all('Allow')))
+         allow = set(method.strip() for method in allow.split(','))
+         self.assertEquals(allow,
+-                          set(['HEAD', 'OPTIONS'] + HelloWorld.methods))
++                          {'HEAD', 'OPTIONS'}.union(HelloWorld.methods))
+ 
+     def test_exception_header_forwarded(self):
+         """Test that HTTPException's headers are extended properly"""
diff -Nru flask-restful-0.3.6/debian/patches/series flask-restful-0.3.6/debian/patches/series
--- flask-restful-0.3.6/debian/patches/series	2018-04-09 15:20:01.000000000 +0100
+++ flask-restful-0.3.6/debian/patches/series	2018-08-15 09:18:56.000000000 +0100
@@ -3,3 +3,4 @@
 0003-Use-local-copies-of-object.inv-for-building-document.patch
 0004-Use-SOURCE_DATE_EPOCH-for-copyright-year-to-make-bui.patch
 support-aniso8601-3.0
+fix-fr-405.patch
diff -Nru flask-restful-0.3.6/debian/rules flask-restful-0.3.6/debian/rules
--- flask-restful-0.3.6/debian/rules	2018-08-11 10:46:45.000000000 +0100
+++ flask-restful-0.3.6/debian/rules	2018-08-15 09:20:51.000000000 +0100
@@ -12,6 +12,3 @@
 override_dh_auto_build:
 	dh_auto_build
 	cd docs; PYTHONPATH=.. http_proxy='127.0.0.1:9' make html
-
-#override_dh_auto_test:
-


More information about the Python-modules-team mailing list