1{ lib
2, buildPythonPackage
3, fetchPypi
4, requests
5, betamax
6, mock
7, pytest
8}:
9
10buildPythonPackage rec {
11 pname = "requests-toolbelt";
12 version = "0.9.1";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0";
17 };
18
19 checkInputs = [ betamax mock pytest ];
20 propagatedBuildInputs = [ requests ];
21
22 checkPhase = ''
23 # disabled tests access the network
24 py.test tests -k "not test_no_content_length_header \
25 and not test_read_file \
26 and not test_reads_file_from_url_wrapper"
27 '';
28
29 meta = {
30 description = "A toolbelt of useful classes and functions to be used with python-requests";
31 homepage = http://toolbelt.rtfd.org;
32 license = lib.licenses.asl20;
33 maintainers = with lib.maintainers; [ matthiasbeyer jgeerds ];
34 };
35}