From 8b4269bc1e167a3a69e9fb28724d25d02d127efb Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Sat, 23 Mar 2019 10:03:13 +1000 Subject: [PATCH] pythonPackages.aioresponses: init at 0.6.0 --- .../python-modules/aioresponses/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/aioresponses/default.nix diff --git a/pkgs/development/python-modules/aioresponses/default.nix b/pkgs/development/python-modules/aioresponses/default.nix new file mode 100644 index 000000000000..55120ad58038 --- /dev/null +++ b/pkgs/development/python-modules/aioresponses/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, pbr +, aiohttp +, ddt +, asynctest +, pytest +}: + +buildPythonPackage rec { + pname = "aioresponses"; + version = "0.6.0"; + disabled = pythonOlder "3.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "0ii1jiwb8qa2y8cqa1zqn7mjax9l8bpf16k4clv616mxw1l0bvs6"; + }; + + nativeBuildInputs = [ + pbr + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + asynctest + ddt + pytest + ]; + + # Skip a test which makes requests to httpbin.org + checkPhase = '' + pytest -k "not test_address_as_instance_of_url_combined_with_pass_through" + ''; + + meta = { + description = "A helper to mock/fake web requests in python aiohttp package"; + homepage = https://github.com/pnuckowski/aioresponses; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ rvl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d3ec3961f7e2..b9bc41f381d4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -921,6 +921,8 @@ in { aioprocessing = callPackage ../development/python-modules/aioprocessing { }; + aioresponses = callPackage ../development/python-modules/aioresponses { }; + aiorpcx = callPackage ../development/python-modules/aiorpcx { }; aiounifi = callPackage ../development/python-modules/aiounifi { };