1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, tornado
5, requests
6, httplib2
7, sure
8, nose
9, nose-exclude
10, coverage
11, rednose
12, nose-randomly
13, six
14, mock
15}:
16
17buildPythonPackage rec {
18 pname = "httpretty";
19 version = "0.9.7";
20
21 src = fetchPypi {
22 inherit pname version;
23 sha256 = "66216f26b9d2c52e81808f3e674a6fb65d4bf719721394a1a9be926177e55fbe";
24 };
25
26 propagatedBuildInputs = [ six ];
27
28 checkInputs = [ nose sure coverage mock rednose
29 # Following not declared in setup.py
30 nose-randomly requests tornado httplib2 nose-exclude
31 ];
32
33 __darwinAllowLocalNetworking = true;
34
35 # Those flaky tests are failing intermittently on all platforms
36 NOSE_EXCLUDE = stdenv.lib.concatStringsSep "," [
37 "tests.functional.test_httplib2.test_callback_response"
38 "tests.functional.test_requests.test_streaming_responses"
39 "tests.functional.test_httplib2.test_callback_response"
40 "tests.functional.test_requests.test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2"
41 ];
42
43 meta = with stdenv.lib; {
44 homepage = "https://httpretty.readthedocs.org/";
45 description = "HTTP client request mocking tool";
46 license = licenses.mit;
47 };
48}