Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions pkgs/development/python-modules/httpbin/default.nix
Original file line number Diff line number Diff line change
@@ -1,33 +1,65 @@
{ lib
, brotlipy
, buildPythonPackage
, decorator
, fetchPypi
, flask
, flask-limiter
, markupsafe
, decorator
, itsdangerous
, markupsafe
, raven
, six
, brotlipy
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "httpbin";
version = "0.7.0";
format = "setuptools";

src = fetchPypi {
inherit pname version;
sha256 = "1yldvf3585zcwj4vxvfm4yr9wwlz3pa2mx2pazqz8x8mr687gcyb";
hash = "sha256-y7N3kMkVdfTxV1f0KtQdn3KesifV7b6J5OwXVIbbjfo=";
};

propagatedBuildInputs = [ brotlipy flask flask-limiter markupsafe decorator itsdangerous raven six ];
propagatedBuildInputs = [
brotlipy
flask
flask-limiter
markupsafe
decorator
itsdangerous
raven
six
];

checkInputs = [
pytestCheckHook
];

pytestFlagsArray = [
"test_httpbin.py"
];

disabledTests = [
# Tests seems to be outdated
"test_anything"
"test_get"
"test_redirect_n_equals_to_1"
"test_redirect_n_higher_than_1"
"test_redirect_to_post"
"test_relative_redirect_n_equals_to_1"
"test_relative_redirect_n_higher_than_1"
];

# No tests
doCheck = false;
pythonImportsCheck = [
"httpbin"
];

meta = with lib; {
description = "HTTP Request and Response Service";
homepage = "https://github.com/kennethreitz/httpbin";
description = "HTTP Request & Response Service";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}
49 changes: 30 additions & 19 deletions pkgs/development/python-modules/pytest-httpbin/default.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
{ buildPythonPackage
, lib
, fetchPypi
, pytest
{ lib
, buildPythonPackage
, fetchFromGitHub
, httpbin
, pytest
, pytestCheckHook
, requests
, six
}:

buildPythonPackage rec {
pname = "pytest-httpbin";
version = "1.0.0";
version = "1.0.1";

src = fetchPypi {
inherit pname version;
sha256 = "0wlvw5qgkax7f0i5ks1562s37h2hdmn5yxnp1rajcc2289zm9knq";
src = fetchFromGitHub {
owner = "kevin1024";
repo = "pytest-httpbin";
rev = "v${version}";
hash = "sha256-Vngd8Vum96+rdG8Nz1+aHrO6WZjiAz+0CeIovaH8N+s=";
};

checkInputs = [ pytest ];
buildInputs = [
pytest
];

propagatedBuildInputs = [ httpbin six ];
propagatedBuildInputs = [
httpbin
six
];

checkPhase = ''
py.test
'';
checkInputs = [
pytestCheckHook
requests
];

# https://github.com/kevin1024/pytest-httpbin/pull/51
doCheck = false;
pythonImportsCheck = [
"pytest_httpbin"
];

meta = {
description = "Easily test your HTTP library against a local copy of httpbin.org";
meta = with lib; {
description = "Test your HTTP library against a local copy of httpbin.org";
homepage = "https://github.com/kevin1024/pytest-httpbin";
license = lib.licenses.mit;
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}