2019-05-07 12:53:44 +00:00
|
|
|
{ lib
|
2021-03-12 22:20:19 +00:00
|
|
|
, aiohttp
|
2021-03-07 21:11:56 +00:00
|
|
|
, async_generator
|
2019-05-07 12:53:44 +00:00
|
|
|
, buildPythonPackage
|
2021-03-07 21:11:56 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
2019-05-07 12:53:44 +00:00
|
|
|
, pytest
|
2021-03-07 21:11:56 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, sanic
|
|
|
|
, websockets
|
2019-05-07 12:53:44 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-sanic";
|
2021-05-23 13:15:54 +00:00
|
|
|
version = "1.7.1";
|
2019-05-07 12:53:44 +00:00
|
|
|
|
2021-03-07 21:11:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yunstanford";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-05-23 13:15:54 +00:00
|
|
|
sha256 = "sha256-OtyulpSHUWERtcIRT5j3YtHciIxFiIFYKqtlEd1NSFw=";
|
2019-05-07 12:53:44 +00:00
|
|
|
};
|
|
|
|
|
2021-03-12 22:20:19 +00:00
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
2019-05-07 12:53:44 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-03-12 22:20:19 +00:00
|
|
|
aiohttp
|
2019-05-07 12:53:44 +00:00
|
|
|
async_generator
|
2021-03-07 21:11:56 +00:00
|
|
|
httpx
|
|
|
|
pytest
|
|
|
|
websockets
|
2019-05-07 12:53:44 +00:00
|
|
|
];
|
|
|
|
|
2021-03-07 21:11:56 +00:00
|
|
|
checkInputs = [
|
|
|
|
sanic
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-05-23 13:15:54 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/yunstanford/pytest-sanic/issues/51
|
|
|
|
"test_fixture_sanic_client_get"
|
|
|
|
"test_fixture_sanic_client_post"
|
|
|
|
"test_fixture_sanic_client_put"
|
|
|
|
"test_fixture_sanic_client_delete"
|
|
|
|
"test_fixture_sanic_client_patch"
|
|
|
|
"test_fixture_sanic_client_options"
|
|
|
|
"test_fixture_sanic_client_head"
|
|
|
|
"test_fixture_sanic_client_close"
|
|
|
|
"test_fixture_sanic_client_passing_headers"
|
|
|
|
"test_fixture_sanic_client_context_manager"
|
|
|
|
"test_fixture_test_client_context_manager"
|
|
|
|
];
|
2021-03-07 21:11:56 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "pytest_sanic" ];
|
2019-05-07 12:53:44 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A pytest plugin for Sanic";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/yunstanford/pytest-sanic/";
|
2019-05-07 12:53:44 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|