mitmproxy: fix tests

This commit is contained in:
Jörg Thalheim 2017-08-28 07:27:59 +01:00
parent 3b6eb933cc
commit 27ac74daa5
2 changed files with 29 additions and 6 deletions

View File

@ -13,14 +13,25 @@ python3Packages.buildPythonPackage rec {
};
patches = [
# Bump pyopenssl dependency
# https://github.com/mitmproxy/mitmproxy/pull/2252
# fix tests
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/mitmproxy/mitmproxy/pull/2252.patch";
sha256 = "1smld21df79249qbh412w8gi2agcf4zjhxnlawy19yjl1fk2h67c";
url = "https://github.com/mitmproxy/mitmproxy/commit/b3525570929ba47c10d9d08696876c39487f7000.patch";
sha256 = "111fld5gqdii7rs1jhqaqrxgbyhfn6qd0y7l15k4npamsnvdnv20";
})
# bump pyOpenSSL
(fetchpatch {
url = https://github.com/mitmproxy/mitmproxy/commit/6af72160bf98b58682b8f9fc5aabf51928d2b1d3.patch;
sha256 = "1q4ml81pq9c8j9iscq8janbxf4s37w3bqskbs6r30yqzy63v54f2";
})
# https://github.com/mitmproxy/mitmproxy/commit/3d7cde058b7e6242d93b9bc9d3e17520ffb578a5
./tornado-4.6.patch
];
checkPhase = ''
export HOME=$(mktemp -d)
LC_CTYPE=en_US.UTF-8 python setup.py pytest
'';
propagatedBuildInputs = with python3Packages; [
blinker click certifi construct cryptography
cssutils editorconfig h2 html2text hyperframe
@ -29,8 +40,9 @@ python3Packages.buildPythonPackage rec {
urwid watchdog brotlipy sortedcontainers
];
# Tests fail due to an error with a decorator
doCheck = false;
buildInputs = with python3Packages; [
beautifulsoup4 flask pytz pytest pytestrunner protobuf3_2
];
meta = with stdenv.lib; {
description = "Man-in-the-middle proxy";

View File

@ -0,0 +1,11 @@
--- mitmproxy-v2.0.2-src.org/setup.py 2017-08-28 07:31:51.727424688 +0100
+++ mitmproxy-v2.0.2-src/setup.py 2017-08-28 07:35:55.608919302 +0100
@@ -78,7 +78,7 @@
"pyperclip>=1.5.22, <1.6",
"requests>=2.9.1, <3",
"ruamel.yaml>=0.13.2, <0.14",
- "tornado>=4.3, <4.5",
+ "tornado>=4.3, <4.6",
"urwid>=1.3.1, <1.4",
"watchdog>=0.8.3, <0.9",
"brotlipy>=0.5.1, <0.7",