1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, httpbin 5, pytest 6, pytestCheckHook 7, pythonOlder 8, requests 9, six 10}: 11 12buildPythonPackage rec { 13 pname = "pytest-httpbin"; 14 version = "1.0.2"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "kevin1024"; 21 repo = "pytest-httpbin"; 22 rev = "v${version}"; 23 hash = "sha256-S4ThQx4H3UlKhunJo35esPClZiEn7gX/Qwo4kE1QMTI="; 24 }; 25 26 buildInputs = [ 27 pytest 28 ]; 29 30 propagatedBuildInputs = [ 31 httpbin 32 six 33 ]; 34 35 preCheck = '' 36 # Remove assertion that doesn't hold for Flask 2.1.0 37 substituteInPlace tests/test_server.py \ 38 --replace "assert response.headers['Location'].startswith('https://')" "" 39 ''; 40 41 checkInputs = [ 42 pytestCheckHook 43 requests 44 ]; 45 46 pythonImportsCheck = [ 47 "pytest_httpbin" 48 ]; 49 50 meta = with lib; { 51 description = "Test your HTTP library against a local copy of httpbin.org"; 52 homepage = "https://github.com/kevin1024/pytest-httpbin"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ ]; 55 }; 56}