Skip to content
Snippets Groups Projects
Commit e7c81625 authored by Kevin Daudt's avatar Kevin Daudt :computer:
Browse files

community/py3-httplib2: fix failing test for python3.9

parent 7154cf77
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,9 @@ license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pytest-cov py3-pytest-timeout py3-mock"
source="https://files.pythonhosted.org/packages/source/h/httplib2/httplib2-$pkgver.tar.gz"
source="https://files.pythonhosted.org/packages/source/h/httplib2/httplib2-$pkgver.tar.gz
fix-test-inject-space-after-bpo-43882.patch
"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-httplib2" # Backwards compatibility
......@@ -33,4 +35,7 @@ package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="9193a0e8e9a58a3f0e9b27fdf827932482a47b88af297af6e5f004164ca0b72feeff513b8191bf7c48d6714070a1390ae54eb8a2c6840f54f2580889c7837c7f httplib2-0.19.0.tar.gz"
sha512sums="
9193a0e8e9a58a3f0e9b27fdf827932482a47b88af297af6e5f004164ca0b72feeff513b8191bf7c48d6714070a1390ae54eb8a2c6840f54f2580889c7837c7f httplib2-0.19.0.tar.gz
88a9106f1005b2a2234c4fe20c3e271122732d25dce08e9f4f355701854fbfb176ad638a4cfee807bbc4cb063bd6913775a0d6b6c6724cb7948d430f985ae4c7 fix-test-inject-space-after-bpo-43882.patch
"
From 08d6993b69256fbc6c0b1c615c24910803c4d610 Mon Sep 17 00:00:00 2001
From: Sergey Shepelev <temotor@gmail.com>
Date: Thu, 13 May 2021 19:09:52 +0300
Subject: [PATCH] tests: test_inject_space failed after bpo-43882 fix
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/httplib2/httplib2/issues/193
Co-authored-by: Michał Górny <mgorny@gentoo.org>
---
tests/test_http.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/test_http.py b/tests/test_http.py
index 65bac01..5bc6774 100644
--- a/tests/test_http.py
+++ b/tests/test_http.py
@@ -735,4 +735,11 @@ def test_inject_space():
response, content = http.request(danger_url, "GET")
assert response.status == 200
req = tests.HttpRequest.from_bytes(content)
- assert req.uri == "/?q=%20HTTP/1.1%0D%0Aignore-http:"
+ expect = (
+ # new behavior after bpo-43882 fix
+ # https://github.com/httplib2/httplib2/issues/193
+ "/?q=%20HTTP/1.1ignore-http:",
+ # old behavior
+ "/?q=%20HTTP/1.1%0D%0Aignore-http:",
+ )
+ assert req.uri in expect
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment